Skip to content
Least Privilege Principle

Least privilege for third-party identities in Google Cloud means restricted domains, cross-project controls and federation with narrow bindings

Third-party identities in Google Cloud are the external users, cross-project service accounts and federated partner identities that reach your resources. Google's documentation, read 16 Nov 2026, covers domain-restricted sharing, cross-project service account use and Workload Identity Federation. This guide gives the controls, steps and measures.

Open the calculator ยท All guides

Outside parties reach Google Cloud as external principals, cross-project service accounts or federated identities

Domain-restricted sharing limits which identities can be granted IAM roles in your organization. Google says that when it is active, only principals that belong to allowed domains or organizations can be granted roles, and that for organizations created on or after 3 May 2024 the iam.allowedPolicyMemberDomains constraint is enforced by default with your domain as the only allowed value.

Service accounts cross project boundaries in two ways. A service account in one project can be attached to a resource in another project, which Google gates with the iam.disableCrossProjectServiceAccountUsage constraint, enforced by default at project level. A service account can also be granted permission to impersonate service accounts elsewhere.

Federation covers partners and external systems that already have an identity provider. Google says Workload Identity Federation can grant access to federated identities from AWS, Azure, GitHub, GitLab, OIDC and SAML providers and others, without service account keys.

Google documents lateral movement insights, attribute conditions and narrow impersonation bindings

Google describes lateral movement as a service account in one project having permission to impersonate a service account in another, which can chain across projects. IAM recommender provides lateral movement insights that identify those roles, and Google states that attaching a service account across projects is not lateral movement because it grants no impersonation permission.

For federated partners, Google's best practices say to use attribute conditions when federating with multi-tenant identity providers, to avoid granting roles/iam.workloadIdentityUser to all pool members, to use a dedicated service account for each application and to use a unique google.subject mapping so each external identity can be traced in audit logs.

Google also advises a single provider per pool, one pool per environment, and the pool provider URL as the audience. A partner that needs a separate relationship should get a separate pool, so removing the partner is one deletion.

When enabling cross-project service account use, Google discourages undoing the change in production and warns that resources might stop working, so plan the exit before the entry. Read the first 90 days for ordering this against other work.

Steps to bring third-party access in Google Cloud to least privilege

  • List allow policy members from outside your domains, using Policy Analyzer, and the owner of each relationship.
  • Review the domain-restricted sharing setting and keep your own domain as the only allowed value unless a named partner domain is required.
  • List projects where cross-project service account use is enabled and the service accounts used across projects.
  • Open lateral movement insights and remove impersonation roles that cross projects without a reason.
  • Give each partner its own workload identity pool, with an attribute condition that admits only the partner's expected identities.
  • Bind partner identities to a dedicated service account with predefined roles, or grant roles directly to the federated principal.
  • Replace any service account key given to a partner with federation.
  • Set an end date for each relationship and remove the pool or binding on that date.

Settings and roles to avoid for third parties

Setting or roleDocumented reason (Google, read 16 Nov 2026)Use instead
Allowing arbitrary domains in sharing policyGoogle says only principals in allowed domains can be granted roles when the restriction is active.Your domain plus named partner domains.
Service account keys issued to a partnerGoogle says keys are powerful credentials and federation removes their burden.Workload Identity Federation.
roles/iam.workloadIdentityUser to all pool membersGoogle says to avoid it and bind specific external identities.Subject or attribute bindings.
Federating a multi-tenant provider without an attribute conditionGoogle says to use attribute conditions with GitHub and other multi-tenant providers.A condition naming your tenant or repository.
Cross-project impersonation roles with no ownerGoogle says they can chain impersonation across projects.Remove after reviewing lateral movement insights.
roles/editor on a shared service accountGoogle says default service accounts hold Editor and sharing them is very risky.A dedicated account with predefined roles.

Measure external principals, cross-project grants and used permissions

Count external principals with roles, the share with a named owner and an end date, and the count of service accounts with cross-project impersonation. For each service account that serves a partner, compare the permissions in its roles with those used in the last 90 days.

A partner that appears in the allow policy but has no recorded activity is access nobody uses. Privilege creep explains how this builds over contracts, and the glossary defines the terms.

Related guides: AWS third-party identities and Azure third-party identities.

Sources

  1. Google Cloud: Restrict identities with domain-restricted sharing, read 16 Nov 2026
  2. Google Cloud IAM: Attach service accounts to resources, read 16 Nov 2026
  3. Google Cloud IAM: Best practices for using service accounts, read 16 Nov 2026
  4. Google Cloud IAM: Workload Identity Federation, read 16 Nov 2026
  5. Google Cloud IAM: Best practices for using Workload Identity Federation, read 16 Nov 2026
  6. Google Cloud IAM: Role recommendations overview, read 16 Nov 2026
  7. Google Cloud IAM: Best practices for managing service account keys, read 16 Nov 2026

Last reviewed 16 Nov 2026.