Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
En este documento, se describe cómo crear etiquetas seguras, adjuntarlas a un clúster de Dataproc y, luego, usarlas para proteger las redes del clúster.
Beneficios de usar etiquetas seguras
Las etiquetas seguras tienen diferencias clave con las etiquetas de red, como el control de acceso de Identity and Access Management, la herencia de etiquetas y la vinculación a una sola red de VPC, lo que produce los siguientes beneficios clave:
Seguridad y control de acceso mejorados
Las etiquetas seguras resuelven los problemas de seguridad inherentes a las etiquetas de red, ya que proporcionan acceso controlado por IAM. A diferencia de las etiquetas de red, que puede modificar un usuario con acceso al clúster, las etiquetas seguras impiden la modificación no autorizada de las etiquetas y los cambios no deseados resultantes en las reglas de firewall.
El uso de etiquetas seguras en las políticas de IAM permite el control de acceso condicional, lo que fortalece la seguridad, ya que otorga o deniega roles según la presencia de etiquetas.
Administración simplificada del firewall
Las políticas de firewall de red globales y regionales admiten etiquetas seguras. Esta compatibilidad simplifica la administración del firewall en Dataproc en redes compartidas.
A diferencia de las reglas de firewall de VPC, las políticas de firewall de red mejoradas con etiquetas seguras permiten agrupar y actualizar simultáneamente varias reglas de manera eficiente, todo ello regido por los controles de acceso de IAM. En comparación con las reglas de firewall de VPC que utilizan etiquetas de red, las etiquetas seguras proporcionan capacidades mejoradas de seguridad y administración dentro de las políticas de firewall de red.
Herencia jerárquica de recursos para una administración eficiente
Las etiquetas seguras se heredan de los recursos superiores dentro de la jerarquía Google Cloud .
Esta herencia simplifica la administración, ya que te permite definir etiquetas en un nivel superior (por ejemplo, a nivel de la organización) para que se propaguen automáticamente a los recursos secundarios, como las carpetas y los proyectos. Esto permite un etiquetado coherente en toda tu organización. Para obtener más información, consulta Herencia de etiquetas.
Administración de redes mejorada en las VPC compartidas y con intercambio de tráfico
Las etiquetas de red identifican orígenes o destinos en las reglas de firewall dentro de una red de VPC especificada. Cuando se usan para especificar una fuente para una regla de entrada en una política de firewall de red, las etiquetas de seguridad identifican las fuentes de tráfico en la red de VPC del clúster de Dataproc y en las redes de VPC de intercambio de tráfico. Cuando se usan etiquetas seguras para especificar objetivos para reglas de entrada o salida, identifican objetivos solo dentro de su propia red de VPC.
Solo puedes adjuntar etiquetas seguras a un clúster en el momento de la creación.
No se admite la actualización ni el borrado de etiquetas seguras.
Roles requeridos
Para obtener los permisos que necesitas para crear y adjuntar etiquetas seguras a un clúster de Dataproc, pídele a tu administrador que te otorgue los siguientes roles de IAM en las etiquetas de Resource Manager:
Para adjuntar una etiqueta segura a un clúster de Dataproc, primero debes crear una etiqueta de Resource Manager con una clave especificada y uno o más valores.
Adjunta etiquetas seguras al clúster de Dataproc
Crea un clúster de Dataproc y especifica el par de etiquetas TAG_KEY:TAG_VALUE seguras.
Google Cloud CLI
Para crear un clúster de Dataproc y agregarle una etiqueta segura, ejecuta el comando gcloud Dataproc clusters create con la marca --resource-manager-tags.
gcloud dataproc clusters create CLUSTER_NAME \
--region REGION \
--resource-manager-tags=TAG_KEY=TAG_VALUE
TAG_KEY y TAG_VALUE: La clave y un valor de la etiqueta de Resource Manager que creaste.
Puedes especificar una lista separada por comas para adjuntar varias etiquetas seguras que contengan la misma clave con diferentes valores, o bien diferentes claves y valores.
REST
Para crear un clúster de Dataproc y agregarle una etiqueta segura, incluye el campo resourceManagerTags como parte de una solicitud clusters.create.
A continuación, se muestra un ejemplo del cuerpo JSON de una solicitud cluster.create que incluye la vinculación de una etiqueta segura "TAG_KEY":"TAG_VALUE" al clúster:
PROJECT_ID: Es el ID de tu proyecto, que se encuentra en la sección Project info del Google Cloud panel de la consola.
CLUSTER_NAME es el nombre del clúster nuevo.
TAG_KEY y TAG_VALUE: La clave y un valor de la etiqueta de Resource Manager que creaste.
Puedes especificar varias etiquetas seguras que contengan la misma clave con diferentes valores o diferentes claves y valores.
Usa etiquetas seguras para las redes de clústeres
Después de adjuntar etiquetas seguras a un clúster, úsalas para configurar la red del clúster:
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (UTC)"],[[["\u003cp\u003eSecure tags on Dataproc clusters enhance security by using IAM-controlled access, unlike network tags, preventing unauthorized modifications to firewall rules.\u003c/p\u003e\n"],["\u003cp\u003eSecure tags simplify firewall management by enabling the efficient grouping and updating of multiple rules across shared networks via network firewall policies, all governed by IAM access controls.\u003c/p\u003e\n"],["\u003cp\u003eSecure tags inherit from parent resources in the Google Cloud hierarchy, allowing for organization-wide consistency in tagging by propagating tags from higher levels to child resources.\u003c/p\u003e\n"],["\u003cp\u003eAttaching secure tags to a Dataproc cluster must be done at the time of cluster creation and requires the \u003ccode\u003eTag Administrator\u003c/code\u003e and \u003ccode\u003eTag Viewer\u003c/code\u003e IAM roles.\u003c/p\u003e\n"],["\u003cp\u003eSecure tags can be utilized to configure cluster networking, including defining firewall rules and conditionally granting or denying IAM roles.\u003c/p\u003e\n"]]],[],null,["This document describes how to create secure tags, attach them to a\nDataproc cluster, and then use the tags to secure cluster networking.\n| **Note:** In this document, [Resource Manager tags](/resource-manager/docs/tags/tags-overview) attached to Dataproc clusters are called `secure tags`.\n\nBenefits of using secure tags\n\nSecure tags have key differences from\n[network tags](/vpc/docs/add-remove-network-tags),\nincluding Identity and Access Management access control, tag inheritance,\nand single VPC network binding, which produce the following key benefits:\n\n\u003cbr /\u003e\n\nEnhanced access control and security Secure tags resolve the security issues inherent with network tags by providing IAM controlled access. Unlike network tags, which can be modified by a user with cluster access, secure tags prevent unauthorized modification of tags and the resulting unwanted changes to firewall rules.\u003cbr /\u003e\n\nUsing secure tags in IAM policies enable\n[conditional access control](/iam/docs/conditions-overview), strengthening\nsecurity by granting or denying roles based on the presence of tags.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nSimplified firewall management The [global](/firewall/docs/network-firewall-policies) and [regional](/firewall/docs/regional-firewall-policies) network firewall policies support secure tags. This support simplifies firewall management in Dataproc across shared networks.\n\n\u003cbr /\u003e\n\nUnlike VPC firewall rules, network firewall policies that are enhanced by secure\ntags enable efficient grouping and simultaneous updating of multiple rules, all\ngoverned by IAM access controls. Compared to VPC firewall rules\nthat utilize network tags, secure tags provide enhanced security and management\ncapabilities within network firewall policies.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nHierarchical resource inheritance for efficient management Secure tags inherit from parent resources within the Google Cloud hierarchy. This inheritance simplifies management by letting you define tags at a higher level---for example, at the organization level---so that they automatically propagate to child resources, such as folders and projects. This enables consistent tagging across your organization. For more information, see [Tag inheritance](/resource-manager/docs/tags/tags-overview#inheritance).\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nImproved network management across shared and peered VPCs Network tags identify sources or targets in firewall rules within a specified VPC network. Secure tags, when used to specify a source for an ingress rule in a network firewall policy, identify traffic sources in both the Dataproc cluster VPC network and peered VPC networks. When secure tags are used to specify targets for ingress or egress rules, they identify targets only within their own VPC network.\n\n\u003cbr /\u003e\n\nTo learn more about the differences between Resource Manager tags and network tags,\nsee\n[Comparison of Tags and network tags](/firewall/docs/tags-firewalls-overview#differences).\n\nTo learn more about the differences between Resource Manager tags and labels,\nsee\n[Tags and labels](/resource-manager/docs/tags/tags-overview#tags_and_labels).\n\nLimitations\n\n- You can attach secure tags to a cluster only at the time of cluster creation.\n- Updation and deletion of secure tags aren't supported.\n\nRequired roles\n\n\nTo get the permissions that\nyou need to create and attach secure tags to a Dataproc cluster,\n\nask your administrator to grant you the\nfollowing IAM roles on Resource Manager tags:\n\n- Create tags: [Tag Administrator](/iam/docs/roles-permissions/resourcemanager#resourcemanager.tagAdmin) (`roles/resourcemanager.tagAdmin`)\n- Attach tags to a custer: [Tag Viewer](/iam/docs/roles-permissions/resourcemanager#resourcemanager.tagViewer) (`roles/resourcemanager.tagViewer`)\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nYou might also be able to get\nthe required permissions through [custom\nroles](/iam/docs/creating-custom-roles) or other [predefined\nroles](/iam/docs/roles-overview#predefined).\n\nCreate a secure tag\n\nTo attach a secure tag to a Dataproc cluster, you must first\n[create a Resource Manager tag](/resource-manager/docs/tags/tags-creating-and-managing#creating)\nwith a specified key and one or more values.\n\nAttach secure tags to the Dataproc cluster\n\nCreate a Dataproc cluster, specifying the secure tag\n\u003cvar translate=\"no\"\u003eTAG_KEY\u003c/var\u003e`:`\u003cvar translate=\"no\"\u003eTAG_VALUE\u003c/var\u003e pair. \n\nGoogle Cloud CLI\n\nTo create a Dataproc cluster and add a secure tag to the\ncluster, run the\n[gcloud Dataproc clusters create](/sdk/gcloud/reference/dataproc/clusters/create)\ncommand with the `--resource-manager-tags` flag. \n\n gcloud dataproc clusters create \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e \\\n --region \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e \\\n --resource-manager-tags=\u003cvar translate=\"no\"\u003eTAG_KEY\u003c/var\u003e=\u003cvar translate=\"no\"\u003eTAG_VALUE\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e: the name of the new cluster.\n\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the\n [Compute Engine region](/compute/docs/regions-zones#available)\n in which to locate the cluster.\n\n- \u003cvar translate=\"no\"\u003eTAG_KEY\u003c/var\u003e and \u003cvar translate=\"no\"\u003eTAG_VALUE\u003c/var\u003e: the key and a value of\n the [Resource Manager tag that you created](#create-a-secure-tag).\n You can specify a comma-separated list to attach multiple secure\n tags comprised of the same key with different values, or different keys\n and values.\n\nREST\n\nTo create a Dataproc cluster and add a secure tag to the\ncluster, include the\n[`resourceManagerTags`](/dataproc/docs/reference/rest/v1/ClusterConfig#GceClusterConfig.FIELDS.resource_manager_tags)\nfield as part of a\n[clusters.create](/dataproc/docs/reference/rest/v1/projects.regions.clusters/create)\nrequest.\n\nThe following is an sample JSON body of a `cluster.create` request that\nincludes attaching a `\"`\u003cvar translate=\"no\"\u003eTAG_KEY\u003c/var\u003e`\":\"`\u003cvar translate=\"no\"\u003eTAG_VALUE\u003c/var\u003e`\"`\nsecure tag to the cluster: \n\n {\n \"clusterName\": \"\u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e\",\n \"config\": {\n \"gceClusterConfig\": {\n \"resourceManagerTags\": {\n \"\u003cvar translate=\"no\"\u003eTAG_KEY\u003c/var\u003e\": \"\u003cvar translate=\"no\"\u003eTAG_VALUE\u003c/var\u003e\"\n }\n }\n }\n }\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: your project ID that is listed in the\n **Project info** section in the Google Cloud console\n [Dashboard](https://console.cloud.google.com/home/dashboard).\n\n- \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e: the name of the new cluster.\n\n- \u003cvar translate=\"no\"\u003eTAG_KEY\u003c/var\u003e and \u003cvar translate=\"no\"\u003eTAG_VALUE\u003c/var\u003e: the key and a value of\n the [Resource Manager tag that you created](#create-a-secure-tag).\n You can specify multiple secure tags comprised of the same key with\n different values or different keys and values.\n\nUse secure tags for cluster networking\n\nAfter attaching secure tags to a cluster, use secure tags to configure\ncluster networking:\n\n- Use secure tags to [define firewall rules](/dataproc/docs/concepts/configuring-clusters/network#firewall_requirements).\n- Use secure tags to [conditionally grant or deny](/iam/docs/conditions-overview) the IAM [Tag Administrator TAG viewer roles](#required-roles) needed to create and attach secure tags to a cluster.\n\nWhat's next\n\n- Learn more about [tags](/resource-manager/docs/tags/tags-overview).\n- Learn more about [network tags](/vpc/docs/add-remove-network-tags)."]]