Access control with IAM

AI Platform Pipelines depends on Identity and Access Management (IAM) roles to authorize users, groups, and services when machine learning (ML) pipelines access Google Cloud resources.

This document describes the roles required to:

Learn more about IAM concepts and how IAM works.

Roles required to set up AI Platform Pipelines

To deploy AI Platform Pipelines, you must be granted the Viewer (roles/viewer) and Kubernetes Engine Admin (roles/container.admin) roles on the project. The Viewer role provides read access to all resources within a project. The Kubernetes Engine Admin role provides full access to Kubernetes clusters and Kubernetes API objects.

To follow the principle of least privilege, set up your AI Platform Pipelines cluster to use granular access. To set up your cluster with granular access, you must also be granted the Service Account Admin (roles/iam.serviceAccountAdmin) role on the project. The Service Account Admin role provides access to create and configure IAM service accounts.

Learn more about granting access to IAM roles.

Role Permissions
Viewer (roles/viewer) Permissions for read-only actions that do not affect state, such as viewing (but not modifying) existing resources or data within a project.

(roles/container.admin)

Provides access to full management of clusters and their Kubernetes API objects.

To set a service account on nodes, you must also have the Service Account User role (roles/iam.serviceAccountUser) on the user-managed service account that your nodes will use.

Lowest-level resources where you can grant this role:

  • Project

container.*

  • container.apiServices.create
  • container.apiServices.delete
  • container.apiServices.get
  • container.apiServices.getStatus
  • container.apiServices.list
  • container.apiServices.update
  • container.apiServices.updateStatus
  • container.auditSinks.create
  • container.auditSinks.delete
  • container.auditSinks.get
  • container.auditSinks.list
  • container.auditSinks.update
  • container.backendConfigs.create
  • container.backendConfigs.delete
  • container.backendConfigs.get
  • container.backendConfigs.list
  • container.backendConfigs.update
  • container.bindings.create
  • container.bindings.delete
  • container.bindings.get
  • container.bindings.list
  • container.bindings.update
  • container.certificateSigningRequests.approve
  • container.certificateSigningRequests.create
  • container.certificateSigningRequests.delete
  • container.certificateSigningRequests.get
  • container.certificateSigningRequests.getStatus
  • container.certificateSigningRequests.list
  • container.certificateSigningRequests.update
  • container.certificateSigningRequests.updateStatus
  • container.clusterRoleBindings.create
  • container.clusterRoleBindings.delete
  • container.clusterRoleBindings.get
  • container.clusterRoleBindings.list
  • container.clusterRoleBindings.update
  • container.clusterRoles.bind
  • container.clusterRoles.create
  • container.clusterRoles.delete
  • container.clusterRoles.escalate
  • container.clusterRoles.get
  • container.clusterRoles.list
  • container.clusterRoles.update
  • container.clusters.connect
  • container.clusters.create
  • container.clusters.createTagBinding
  • container.clusters.delete
  • container.clusters.deleteTagBinding
  • container.clusters.get
  • container.clusters.getCredentials
  • container.clusters.impersonate
  • container.clusters.list
  • container.clusters.listEffectiveTags
  • container.clusters.listTagBindings
  • container.clusters.update
  • container.componentStatuses.get
  • container.componentStatuses.list
  • container.configMaps.create
  • container.configMaps.delete
  • container.configMaps.get
  • container.configMaps.list
  • container.configMaps.update
  • container.controllerRevisions.create
  • container.controllerRevisions.delete
  • container.controllerRevisions.get
  • container.controllerRevisions.list
  • container.controllerRevisions.update
  • container.cronJobs.create
  • container.cronJobs.delete
  • container.cronJobs.get
  • container.cronJobs.getStatus
  • container.cronJobs.list
  • container.cronJobs.update
  • container.cronJobs.updateStatus
  • container.csiDrivers.create
  • container.csiDrivers.delete
  • container.csiDrivers.get
  • container.csiDrivers.list
  • container.csiDrivers.update
  • container.csiNodeInfos.create
  • container.csiNodeInfos.delete
  • container.csiNodeInfos.get
  • container.csiNodeInfos.list
  • container.csiNodeInfos.update
  • container.csiNodes.create
  • container.csiNodes.delete
  • container.csiNodes.get
  • container.csiNodes.list
  • container.csiNodes.update
  • container.customResourceDefinitions.create
  • container.customResourceDefinitions.delete
  • container.customResourceDefinitions.get
  • container.customResourceDefinitions.getStatus
  • container.customResourceDefinitions.list
  • container.customResourceDefinitions.update
  • container.customResourceDefinitions.updateStatus
  • container.daemonSets.create
  • container.daemonSets.delete
  • container.daemonSets.get
  • container.daemonSets.getStatus
  • container.daemonSets.list
  • container.daemonSets.update
  • container.daemonSets.updateStatus
  • container.deployments.create
  • container.deployments.delete
  • container.deployments.get
  • container.deployments.getScale
  • container.deployments.getStatus
  • container.deployments.list
  • container.deployments.rollback
  • container.deployments.update
  • container.deployments.updateScale
  • container.deployments.updateStatus
  • container.endpointSlices.create
  • container.endpointSlices.delete
  • container.endpointSlices.get
  • container.endpointSlices.list
  • container.endpointSlices.update
  • container.endpoints.create
  • container.endpoints.delete
  • container.endpoints.get
  • container.endpoints.list
  • container.endpoints.update
  • container.events.create
  • container.events.delete
  • container.events.get
  • container.events.list
  • container.events.update
  • container.frontendConfigs.create
  • container.frontendConfigs.delete
  • container.frontendConfigs.get
  • container.frontendConfigs.list
  • container.frontendConfigs.update
  • container.horizontalPodAutoscalers.create
  • container.horizontalPodAutoscalers.delete
  • container.horizontalPodAutoscalers.get
  • container.horizontalPodAutoscalers.getStatus
  • container.horizontalPodAutoscalers.list
  • container.horizontalPodAutoscalers.update
  • container.horizontalPodAutoscalers.updateStatus
  • container.hostServiceAgent.use
  • container.ingresses.create
  • container.ingresses.delete
  • container.ingresses.get
  • container.ingresses.getStatus
  • container.ingresses.list
  • container.ingresses.update
  • container.ingresses.updateStatus
  • container.initializerConfigurations.create
  • container.initializerConfigurations.delete
  • container.initializerConfigurations.get
  • container.initializerConfigurations.list
  • container.initializerConfigurations.update
  • container.jobs.create
  • container.jobs.delete
  • container.jobs.get
  • container.jobs.getStatus
  • container.jobs.list
  • container.jobs.update
  • container.jobs.updateStatus
  • container.leases.create
  • container.leases.delete
  • container.leases.get
  • container.leases.list
  • container.leases.update
  • container.limitRanges.create
  • container.limitRanges.delete
  • container.limitRanges.get
  • container.limitRanges.list
  • container.limitRanges.update
  • container.localSubjectAccessReviews.create
  • container.localSubjectAccessReviews.list
  • container.managedCertificates.create
  • container.managedCertificates.delete
  • container.managedCertificates.get
  • container.managedCertificates.list
  • container.managedCertificates.update
  • container.mutatingWebhookConfigurations.create
  • container.mutatingWebhookConfigurations.delete
  • container.mutatingWebhookConfigurations.get
  • container.mutatingWebhookConfigurations.list
  • container.mutatingWebhookConfigurations.update
  • container.namespaces.create
  • container.namespaces.delete
  • container.namespaces.finalize
  • container.namespaces.get
  • container.namespaces.getStatus
  • container.namespaces.list
  • container.namespaces.update
  • container.namespaces.updateStatus
  • container.networkPolicies.create
  • container.networkPolicies.delete
  • container.networkPolicies.get
  • container.networkPolicies.list
  • container.networkPolicies.update
  • container.nodes.create
  • container.nodes.delete
  • container.nodes.get
  • container.nodes.getStatus
  • container.nodes.list
  • container.nodes.proxy
  • container.nodes.update
  • container.nodes.updateStatus
  • container.operations.get
  • container.operations.list
  • container.persistentVolumeClaims.create
  • container.persistentVolumeClaims.delete
  • container.persistentVolumeClaims.get
  • container.persistentVolumeClaims.getStatus
  • container.persistentVolumeClaims.list
  • container.persistentVolumeClaims.update
  • container.persistentVolumeClaims.updateStatus
  • container.persistentVolumes.create
  • container.persistentVolumes.delete
  • container.persistentVolumes.get
  • container.persistentVolumes.getStatus
  • container.persistentVolumes.list
  • container.persistentVolumes.update
  • container.persistentVolumes.updateStatus
  • container.petSets.create
  • container.petSets.delete
  • container.petSets.get
  • container.petSets.list
  • container.petSets.update
  • container.petSets.updateStatus
  • container.podDisruptionBudgets.create
  • container.podDisruptionBudgets.delete
  • container.podDisruptionBudgets.get
  • container.podDisruptionBudgets.getStatus
  • container.podDisruptionBudgets.list
  • container.podDisruptionBudgets.update
  • container.podDisruptionBudgets.updateStatus
  • container.podPresets.create
  • container.podPresets.delete
  • container.podPresets.get
  • container.podPresets.list
  • container.podPresets.update
  • container.podSecurityPolicies.create
  • container.podSecurityPolicies.delete
  • container.podSecurityPolicies.get
  • container.podSecurityPolicies.list
  • container.podSecurityPolicies.update
  • container.podSecurityPolicies.use
  • container.podTemplates.create
  • container.podTemplates.delete
  • container.podTemplates.get
  • container.podTemplates.list
  • container.podTemplates.update
  • container.pods.attach
  • container.pods.create
  • container.pods.delete
  • container.pods.evict
  • container.pods.exec
  • container.pods.get
  • container.pods.getLogs
  • container.pods.getStatus
  • container.pods.initialize
  • container.pods.list
  • container.pods.portForward
  • container.pods.proxy
  • container.pods.update
  • container.pods.updateStatus
  • container.priorityClasses.create
  • container.priorityClasses.delete
  • container.priorityClasses.get
  • container.priorityClasses.list
  • container.priorityClasses.update
  • container.replicaSets.create
  • container.replicaSets.delete
  • container.replicaSets.get
  • container.replicaSets.getScale
  • container.replicaSets.getStatus
  • container.replicaSets.list
  • container.replicaSets.update
  • container.replicaSets.updateScale
  • container.replicaSets.updateStatus
  • container.replicationControllers.create
  • container.replicationControllers.delete
  • container.replicationControllers.get
  • container.replicationControllers.getScale
  • container.replicationControllers.getStatus
  • container.replicationControllers.list
  • container.replicationControllers.update
  • container.replicationControllers.updateScale
  • container.replicationControllers.updateStatus
  • container.resourceQuotas.create
  • container.resourceQuotas.delete
  • container.resourceQuotas.get
  • container.resourceQuotas.getStatus
  • container.resourceQuotas.list
  • container.resourceQuotas.update
  • container.resourceQuotas.updateStatus
  • container.roleBindings.create
  • container.roleBindings.delete
  • container.roleBindings.get
  • container.roleBindings.list
  • container.roleBindings.update
  • container.roles.bind
  • container.roles.create
  • container.roles.delete
  • container.roles.escalate
  • container.roles.get
  • container.roles.list
  • container.roles.update
  • container.runtimeClasses.create
  • container.runtimeClasses.delete
  • container.runtimeClasses.get
  • container.runtimeClasses.list
  • container.runtimeClasses.update
  • container.scheduledJobs.create
  • container.scheduledJobs.delete
  • container.scheduledJobs.get
  • container.scheduledJobs.list
  • container.scheduledJobs.update
  • container.scheduledJobs.updateStatus
  • container.secrets.create
  • container.secrets.delete
  • container.secrets.get
  • container.secrets.list
  • container.secrets.update
  • container.selfSubjectAccessReviews.create
  • container.selfSubjectAccessReviews.list
  • container.selfSubjectRulesReviews.create
  • container.serviceAccounts.create
  • container.serviceAccounts.createToken
  • container.serviceAccounts.delete
  • container.serviceAccounts.get
  • container.serviceAccounts.list
  • container.serviceAccounts.update
  • container.services.create
  • container.services.delete
  • container.services.get
  • container.services.getStatus
  • container.services.list
  • container.services.proxy
  • container.services.update
  • container.services.updateStatus
  • container.statefulSets.create
  • container.statefulSets.delete
  • container.statefulSets.get
  • container.statefulSets.getScale
  • container.statefulSets.getStatus
  • container.statefulSets.list
  • container.statefulSets.update
  • container.statefulSets.updateScale
  • container.statefulSets.updateStatus
  • container.storageClasses.create
  • container.storageClasses.delete
  • container.storageClasses.get
  • container.storageClasses.list
  • container.storageClasses.update
  • container.storageStates.create
  • container.storageStates.delete
  • container.storageStates.get
  • container.storageStates.getStatus
  • container.storageStates.list
  • container.storageStates.update
  • container.storageStates.updateStatus
  • container.storageVersionMigrations.create
  • container.storageVersionMigrations.delete
  • container.storageVersionMigrations.get
  • container.storageVersionMigrations.getStatus
  • container.storageVersionMigrations.list
  • container.storageVersionMigrations.update
  • container.storageVersionMigrations.updateStatus
  • container.subjectAccessReviews.create
  • container.subjectAccessReviews.list
  • container.thirdPartyObjects.create
  • container.thirdPartyObjects.delete
  • container.thirdPartyObjects.get
  • container.thirdPartyObjects.list
  • container.thirdPartyObjects.update
  • container.thirdPartyResources.create
  • container.thirdPartyResources.delete
  • container.thirdPartyResources.get
  • container.thirdPartyResources.list
  • container.thirdPartyResources.update
  • container.tokenReviews.create
  • container.updateInfos.create
  • container.updateInfos.delete
  • container.updateInfos.get
  • container.updateInfos.list
  • container.updateInfos.update
  • container.validatingWebhookConfigurations.create
  • container.validatingWebhookConfigurations.delete
  • container.validatingWebhookConfigurations.get
  • container.validatingWebhookConfigurations.list
  • container.validatingWebhookConfigurations.update
  • container.volumeAttachments.create
  • container.volumeAttachments.delete
  • container.volumeAttachments.get
  • container.volumeAttachments.getStatus
  • container.volumeAttachments.list
  • container.volumeAttachments.update
  • container.volumeAttachments.updateStatus
  • container.volumeSnapshotClasses.create
  • container.volumeSnapshotClasses.delete
  • container.volumeSnapshotClasses.get
  • container.volumeSnapshotClasses.list
  • container.volumeSnapshotClasses.update
  • container.volumeSnapshotContents.create
  • container.volumeSnapshotContents.delete
  • container.volumeSnapshotContents.get
  • container.volumeSnapshotContents.getStatus
  • container.volumeSnapshotContents.list
  • container.volumeSnapshotContents.update
  • container.volumeSnapshotContents.updateStatus
  • container.volumeSnapshots.create
  • container.volumeSnapshots.delete
  • container.volumeSnapshots.get
  • container.volumeSnapshots.getStatus
  • container.volumeSnapshots.list
  • container.volumeSnapshots.update
  • container.volumeSnapshots.updateStatus

recommender.containerDiagnosisInsights.*

  • recommender.containerDiagnosisInsights.get
  • recommender.containerDiagnosisInsights.list
  • recommender.containerDiagnosisInsights.update

recommender.containerDiagnosisRecommendations.*

  • recommender.containerDiagnosisRecommendations.get
  • recommender.containerDiagnosisRecommendations.list
  • recommender.containerDiagnosisRecommendations.update

recommender.locations.*

  • recommender.locations.get
  • recommender.locations.list

recommender.networkAnalyzerGkeConnectivityInsights.*

  • recommender.networkAnalyzerGkeConnectivityInsights.get
  • recommender.networkAnalyzerGkeConnectivityInsights.list
  • recommender.networkAnalyzerGkeConnectivityInsights.update

recommender.networkAnalyzerGkeIpAddressInsights.*

  • recommender.networkAnalyzerGkeIpAddressInsights.get
  • recommender.networkAnalyzerGkeIpAddressInsights.list
  • recommender.networkAnalyzerGkeIpAddressInsights.update

resourcemanager.projects.get

resourcemanager.projects.list

(roles/iam.serviceAccountAdmin)

Create and manage service accounts.

Lowest-level resources where you can grant this role:

  • Service Account

iam.serviceAccounts.create

iam.serviceAccounts.createTagBinding

iam.serviceAccounts.delete

iam.serviceAccounts.deleteTagBinding

iam.serviceAccounts.disable

iam.serviceAccounts.enable

iam.serviceAccounts.get

iam.serviceAccounts.getIamPolicy

iam.serviceAccounts.list

iam.serviceAccounts.listEffectiveTags

iam.serviceAccounts.listTagBindings

iam.serviceAccounts.setIamPolicy

iam.serviceAccounts.undelete

iam.serviceAccounts.update

resourcemanager.projects.get

resourcemanager.projects.list

Roles required to run AI Platform Pipelines with a user-managed service account

The Pods on a Google Kubernetes Engine (GKE) cluster authenticate to Google Cloud using the GKE cluster's service account. To make AI Platform Pipelines easier to set up and use, GKE clusters created by AI Platform Pipelines use the default Compute Engine service account with the https://www.googleapis.com/auth/cloud-platform access scope. This access scope provides full access to the Google Cloud resources and APIs that you have enabled in your project, which may provide the workloads on your cluster excessive access to Google Cloud.

To assign granular permissions to the workloads that run on your AI Platform Pipelines cluster, create a service account for your cluster and grant this service account access to the following roles on the project:

  • Monitoring Viewer: The Monitoring Viewer (roles/monitoring.viewer) role provides read access to monitoring data and configurations.
  • Monitoring Metric Writer: The Monitoring Metric Writer (roles/monitoring.metricWriter) role provides write access so your cluster can write metrics.
  • Logs Writer: The Logs Writer (roles/logging.logWriter) role lets your cluster write log entries.
  • Storage Object Viewer: If you plan to create custom container images for your pipelines that are stored in Container Registry, grant your AI Platform Pipelines cluster access to the Storage Object Viewer (roles/storage.objectViewer) role on the project.

You must also grant your service account access to any Google Cloud resources or APIs that your ML pipelines use.

Role Title Description Permissions

(roles/monitoring.viewer)

Provides read-only access to get and list information about all monitoring data and configurations.

Lowest-level resources where you can grant this role:

  • Project

cloudnotifications.activities.list

monitoring.alertPolicies.get

monitoring.alertPolicies.list

monitoring.dashboards.get

monitoring.dashboards.list

monitoring.groups.get

monitoring.groups.list

monitoring.metricDescriptors.get

monitoring.metricDescriptors.list

monitoring.monitoredResourceDescriptors.*

  • monitoring.monitoredResourceDescriptors.get
  • monitoring.monitoredResourceDescriptors.list

monitoring.notificationChannelDescriptors.*

  • monitoring.notificationChannelDescriptors.get
  • monitoring.notificationChannelDescriptors.list

monitoring.notificationChannels.get

monitoring.notificationChannels.list

monitoring.services.get

monitoring.services.list

monitoring.slos.get

monitoring.slos.list

monitoring.snoozes.get

monitoring.snoozes.list

monitoring.timeSeries.list

monitoring.uptimeCheckConfigs.get

monitoring.uptimeCheckConfigs.list

opsconfigmonitoring.resourceMetadata.list

resourcemanager.projects.get

resourcemanager.projects.list

stackdriver.projects.get

stackdriver.resourceMetadata.list

(roles/monitoring.metricWriter)

Provides write-only access to metrics. This provides exactly the permissions needed by the Cloud Monitoring agent and other systems that send metrics.

Lowest-level resources where you can grant this role:

  • Project

monitoring.metricDescriptors.create

monitoring.metricDescriptors.get

monitoring.metricDescriptors.list

monitoring.monitoredResourceDescriptors.*

  • monitoring.monitoredResourceDescriptors.get
  • monitoring.monitoredResourceDescriptors.list

monitoring.timeSeries.create

(roles/logging.logWriter)

Provides the permissions to write log entries.

Lowest-level resources where you can grant this role:

  • Project

logging.logEntries.create

logging.logEntries.route

(roles/storage.objectViewer)

Grants access to view objects and their metadata, excluding ACLs. Can also list the objects in a bucket.

Lowest-level resources where you can grant this role:

  • Bucket

resourcemanager.projects.get

resourcemanager.projects.list

storage.folders.get

storage.folders.list

storage.managedFolders.get

storage.managedFolders.list

storage.objects.get

storage.objects.list

Roles required to access AI Platform Pipelines as a user

To access an AI Platform Pipelines cluster, each user must be granted the Kubernetes Engine Cluster Viewer (roles/container.clusterViewer) role and the Service Account User Role for the Google Kubernetes Engine cluster's service account.

Role Title Description Permissions

(roles/container.clusterViewer)

Provides access to get and list GKE clusters.

container.clusters.get

container.clusters.list

resourcemanager.projects.get

resourcemanager.projects.list

Continue to the next section to learn how to grant users access to the Kubernetes Engine Cluster Viewer role and the Service Account User Role.

Grant a user access to AI Platform Pipelines

Use the following instructions to grant a user account access to your AI Platform Pipelines cluster.

  1. Open AI Platform Pipelines in the Google Cloud console.

    Go to AI Platform Pipelines

  2. Find your AI Platform Pipelines cluster. Take note of the Cluster and Zone for use in subsequent steps.

  3. Open a Cloud Shell session.

    Open Cloud Shell

    Cloud Shell opens in a frame at the bottom of the Google Cloud console. Use Cloud Shell to complete the rest of this process.

  4. Run the following command to set the default Google Cloud project for this Cloud Shell session.

    gcloud config set project PROJECT_ID
    

    Replace PROJECT_ID with your Google Cloud project ID.

  5. Run the following command to find the service account that your GKE cluster uses.

    gcloud container clusters describe CLUSTER_NAME --zone ZONE \
    --format="flattened(nodePools[].config.serviceAccount)"
    

    Replace the following:

    • CLUSTER_NAME: The name of your GKE cluster.
    • ZONE: The zone that your cluster was created in.

    The response might indicate that your cluster uses a service account named default. This value refers to the default service account for Compute Engine. Run the following command to find the full name of this service account.

    gcloud iam service-accounts list \
    --filter "compute@developer.gserviceaccount.com"
    

    Learn more about the Compute Engine default service account.

  6. Grant your user account the Service Account User role on your GKE cluster's service account.

    gcloud iam service-accounts add-iam-policy-binding \
    SERVICE_ACCOUNT_NAME \
    --member=user:USERNAME \
    --role=roles/iam.serviceAccountUser
    

    Replace the following:

    • SERVICE_ACCOUNT_NAME: The name of your GKE cluster's service account, which you found in the previous step. Service account names are formatted like *@*.gserviceaccount.com.
    • USERNAME: Your username on Google Cloud.
  7. Grant your user account access to the GKE Cluster Viewer role on the project.

    gcloud projects add-iam-policy-binding PROJECT_ID \
    --member user:USERNAME --role roles/container.clusterViewer
    

    Replace the following:

    • PROJECT_ID: The ID of your Google Cloud project.
    • USERNAME: Your username on Google Cloud.