[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-27。"],[[["\u003cp\u003eSecuring your Dataproc environment involves implementing best practices for network security, Identity and Access Management (IAM), encryption, and secure cluster configurations.\u003c/p\u003e\n"],["\u003cp\u003eNetwork security measures include deploying Dataproc in a private Virtual Private Cloud (VPC), using private IPs, configuring firewall rules, implementing VPC Network Peering, and enabling the Component Gateway.\u003c/p\u003e\n"],["\u003cp\u003eIdentity and Access Management practices include isolating permissions with separate service accounts, adhering to the principle of least privilege, enforcing role-based access control (RBAC), and regularly reviewing IAM permissions.\u003c/p\u003e\n"],["\u003cp\u003eEncryption involves encrypting data at rest using Cloud Key Management Service (KMS) or Customer Managed Encryption Keys (CMEK), encrypting data in transit with SSL/TLS, and using secure practices for sensitive data.\u003c/p\u003e\n"],["\u003cp\u003eSecure cluster configuration involves using Kerberos authentication, enabling OS Login, segregating staging and temp buckets on Google Cloud Storage (GCS), utilizing Secret Manager, and leveraging custom organizational constraints.\u003c/p\u003e\n"]]],[],null,["# Dataproc security best practices\n\nSecuring your Dataproc environment is crucial for protecting\nsensitive data and preventing unauthorized access.\nThis document outlines key best practices to enhance your\nDataproc security posture, including recommendations for\nnetwork security, Identity and Access Management, encryption, and secure cluster configuration.\n\nNetwork security\n----------------\n\n- **Deploy Dataproc in a private VPC** . Create a dedicated\n [Virtual Private Cloud](/vpc/docs/overview) for your Dataproc clusters,\n isolating them from other networks and the public internet.\n\n- **Use private IPs**. To protect your Dataproc clusters\n from exposure to the public internet, use private IP addresses\n for enhanced security and isolation.\n\n- **Configure firewall rules** . Implement strict [firewall rules](/firewall/docs/using-firewalls) to control traffic to and from your\n Dataproc clusters. Allow only necessary ports and protocols.\n\n- **Use network peering** . For enhanced isolation, establish\n [VPC Network Peering](/vpc/docs/vpc-peering) between your\n Dataproc VPC and other sensitive VPCs for controlled\n communication.\n\n- **Enable Component Gateway** . Enable the [Dataproc\n Component Gateway](/dataproc/docs/concepts/accessing/dataproc-gateways) when you\n create clusters to securely access Hadoop ecosystem UIs, such as like the YARN,\n HDFS, or Spark server UI, instead of opening the firewall ports.\n\nIdentity and Access Management\n------------------------------\n\n- **Isolate permissions** . Use different [data plane service accounts](/dataproc/docs/concepts/configuring-clusters/service-accounts#VM_service_account)\n for different clusters. Assign to service accounts only the permissions\n that clusters need to run their workloads.\n\n- **Avoid relying on the Google Compute Engine (GCE) default service account** .\n Don't use the [default service account](/compute/docs/access/service-accounts#default_service_account) for your clusters.\n\n- **Adhere to the principle of least privilege** . Grant only the [minimum\n necessary permissions](/iam/docs/using-iam-securely#least_privilege) to\n Dataproc service accounts and users.\n\n- **Enforce role-based access control (RBAC)** . Consider setting [IAM permissions](/iam/docs/roles-overview) for each cluster.\n\n- **Use custom roles** . Create fine-grained [custom IAM roles](/iam/docs/creating-custom-roles) tailored to\n specific job functions within your Dataproc environment.\n\n- **Review regularly**. Regularly audit IAM permissions and roles to identify\n and remove any excessive or unused privileges.\n\nEncryption\n----------\n\n- **Encrypt data at rest** . For data encryption at rest, use the\n [Cloud Key Management Service](/kms/docs/key-management-service) (KMS) or\n [Customer Managed Encryption Keys](/dataproc/docs/concepts/configuring-clusters/customer-managed-encryption) (CMEK).\n Additionally, use organizational policies to enforce data encryption at rest\n for cluster creation.\n\n- **Encrypt data in transit** . Enable SSL/TLS for communication between\n Dataproc components (by enabling [Hadoop Secure Mode](/dataproc/docs/concepts/configuring-clusters/security)) and external services.\n This protects data in motion.\n\n- **Beware of sensitive data**. Exercise caution when storing and passing\n sensitive data like PII or passwords. Where required, use encryption and\n secrets management solutions.\n\nSecure cluster configuration\n----------------------------\n\n- **Authenticate using Kerberos** . To prevent unauthorized access to cluster\n resources, implement Hadoop Secure Mode using [Kerberos](https://web.mit.edu/kerberos/#what_is) authentication. For\n more information, see [Secure multi-tenancy through Kerberos](/dataproc/docs/concepts/configuring-clusters/security).\n\n- **Use a strong root principal password and secure KMS-based storage**. For\n clusters that use Kerberos, Dataproc automatically configures\n security hardening features for all open source components running in the cluster.\n\n- **Enable OS login** . Enable [OS Login](/compute/docs/oslogin/set-up-oslogin)\n for added security when managing cluster nodes using SSH.\n\n- **Segregate staging and temp buckets on Google Cloud Storage (GCS)** . To\n ensure permission isolation, segregate [staging and temp buckets](/dataproc/docs/concepts/configuring-clusters/staging-bucket) for each\n Dataproc cluster.\n\n- **Use Secret Manager to store credentials** . The [Secret Manager](/dataproc/docs/guides/hadoop-google-secret-manager-credential-provider) can\n safeguard your sensitive data, such as your API keys, passwords, and certificates.\n Use it to manage, access, and audit your secrets across Google Cloud.\n\n- **Use custom organizational constraints** . You can use a [custom organization\n policy](/resource-manager/docs/organization-policy/overview#custom-organization-policies)\n to allow or deny specific operations on Dataproc clusters.\n For example, if a request to create or update a cluster fails to satisfy custom\n constraint validation as set by your organization policy, the request fails and\n an error is returned to the caller.\n\nWhat's next\n-----------\n\nLearn more about other Dataproc security features:\n\n- [Secure multi-tenancy through service accounts](/dataproc/docs/concepts/iam/sa-multi-tenancy)\n- [Set up a Confidential VM with inline memory encryption](/dataproc/docs/concepts/configuring-clusters/confidential-compute)\n- [Activate an authorization service on each cluster VM](/dataproc/docs/concepts/configuring-clusters/ranger-plugin)"]]