PlaybookLast checked 16 October 2026 with AI-assisted research. Editor: Akshay Dubey.Corrections logEditorial policy
On this page
  1. The same concepts in three clouds
  2. Provider behaviours that create risk
  3. Controls and acceptance criteria
  4. Federation for workloads outside the cloud
  5. Organisation scope: accounts, subscriptions and projects
  6. How this maps to the OWASP NHI Top 10
  7. FAQ
  8. Sources

Cloud workload identity governance means treating AWS IAM roles, Azure managed identities and service principals, and Google Cloud service accounts as inventoried identities with named owners, using credentials the platform issues for short periods instead of stored keys, and federating workloads that run outside the cloud. The three providers name the parts differently; the governance questions are the same.

This page maps those parts across AWS, Microsoft Azure and Google Cloud, lists the provider behaviours that most often create unowned or over-powered identities, and gives controls with acceptance criteria. Provider facts are from official documentation read on 10 October 2026. Controls and criteria are our suggestion, not provider requirements.

The same concepts in three clouds

The identity is the role, managed identity, service principal or service account. Access keys, client secrets, certificates and service account keys are credentials those identities hold.

ConceptAWSMicrosoft Azure / EntraGoogle Cloud
Workload identityIAM role: an identity with permissions and no standard long-term credentials; assuming it gives temporary credentials for a sessionManaged identity (system-assigned or user-assigned); service principal of an app registration. Entra groups applications, service principals and managed identities as workload identitiesService account: user-managed, default service accounts created when some services are enabled, and Google-managed service agents
Stored credential to avoidIAM user access keysClient secrets and certificates on app registrationsUser-managed service account keys, which never expire by default
Short-lived credentialSTS temporary credentials; for AssumeRoleWithWebIdentity, 15 minutes up to the role maximum (1 to 12 hours), default one hourManaged identity credentials are handled by Azure and are not accessible to youShort-lived access tokens, which expire after one hour by default
Workloads outside the cloudIAM OIDC identity provider with AssumeRoleWithWebIdentity; IAM Roles AnywhereWorkload identity federation: a federated identity credential on a user-assigned managed identity or app registrationWorkload Identity Federation: pools and providers, attribute mappings and attribute conditions
Kubernetes workloadsIRSA or EKS Pod IdentityWorkload identity federation for Kubernetes clustersWorkload Identity Federation for GKE
Unused-identity signalIAM last accessed information; IAM Access Analyzer unused access findings (charged)Absence from service principal and managed identity sign-in logs (our method)Service account insights for accounts not authenticated in 90 days (Pre-GA)

Provider behaviours that create risk

Each of these is documented by the provider. The governance consequence in each item is our reading.

  • Stored keys that do not expire. Google states that user-managed service account keys never expire by default and are a security risk if not managed correctly. An organisation policy (constraints/iam.serviceAccountKeyExpiryHours) can set expiry for new keys; existing keys are not affected. AWS recommends temporary credentials through IAM roles for workloads and, where access keys are unavoidable, using last-used information to update and remove them safely. OWASP lists long-lived secrets as NHI7.
  • Code execution equals identity. Microsoft notes that if a user can install or run code on a resource, that user has access to all the managed identities assigned to it. Granting a person a role that can deploy code to a resource with a powerful managed identity grants them that identity's permissions in effect.
  • Broad defaults. Google documents that the default Compute Engine and App Engine service accounts are granted the Editor role on the project when created, and recommends disabling that automatic grant. Check the organisation policy that controls it in your estate.
  • Leftovers after deletion. Microsoft states that role assignments are not deleted automatically when a system-assigned or user-assigned managed identity is deleted, and that a user-assigned identity must be deleted manually when no longer required, even if nothing uses it.
  • Federation trust that is too wide. OWASP NHI6 warns that trusting a public OIDC provider such as GitHub without restricting the sub claim can let any user on that platform assume the role. AWS IAM now rejects a GitHub trust policy whose sub condition is missing or only a wildcard, but only when the policy is created or updated.

Controls and acceptance criteria

Each row gives the check in each cloud and an acceptance criterion that an internal or external auditor can test from records. The criteria are our suggestion.

ControlAWS checkAzure checkGoogle Cloud checkAcceptance criterion
Workloads use platform-issued, short-lived credentialsIAM credential report: IAM users with active access keysApp registrations with client secrets or certificatesgcloud iam service-accounts keys list --managed-by=user per accountNo stored keys for workloads that can use roles, managed identities or attached service accounts; each remaining key has an owner, an exception record and an expiry date
Federation trust is pinnedTrust policy has exact sub and aud conditionsFederated identity credential issuer, subject and audience match exactly (case-sensitive for standard credentials; flexible credentials, in preview, allow patterns and must be reviewed as such)Provider has an attribute condition restricting accepted identitiesNo trust accepts a whole platform, organisation or repository wildcard without a recorded exception
Every identity has an ownerTags on the roleTags on the managed identity; owners on the app registrationLabels or a register entry per service accountNamed person plus owning team for 100% of in-scope identities; a team name alone fails
Least privilege is measuredIAM Access Analyzer policy generation or unused permission findingsRole assignments reviewed against useIAM recommender and policy insightsGranted versus used permissions reviewed at a set interval; see NHI least privilege
Unused identities are removedRole last used; unused access findingsSign-in log absence; orphaned role assignmentsService account insights (90 days)Identities unused for 90 days have an owner decision on record within 30 days
Leak response is configuredAWS applies AWSCompromisedKeyQuarantineV3 to an IAM user whose credentials are exposed; a runbook covers what to do nextEntra ID Protection "Leaked Credentials" detection for workload identitiesconstraints/iam.serviceAccountKeyExposureResponse set to DISABLE_KEY (the default since 16 June 2024 unless the organisation opted out)Each provider setting is confirmed and recorded; see monitoring and detection
Environments are separatedSeparate accounts per environmentSeparate subscriptions per environmentSeparate projects per environmentNo non-production identity has a role in a production account, subscription or project (OWASP NHI8)

Federation for workloads outside the cloud

CI/CD pipelines, on-premises servers and workloads in another cloud are where stored keys survive longest, because there is no attached role to fall back on. All three providers support federation for them:

  • AWS. Register the external issuer as an IAM OIDC identity provider and let the workload call AssumeRoleWithWebIdentity. The call does not need AWS credentials and returns an access key ID, secret access key and session token. CloudTrail records the token subject in subjectFromWebIdentityToken. IAM Roles Anywhere delivers temporary credentials to workloads outside AWS that use certificates.
  • Microsoft Entra. Add a federated identity credential to a user-assigned managed identity or an app registration. Microsoft lists GitHub Actions, Kubernetes clusters, Google Cloud, AWS and other platforms as supported sources.
  • Google Cloud. Create a workload identity pool and provider for AWS, Microsoft Entra ID, GitHub, GitLab, Kubernetes, Okta, AD FS, Terraform or any OIDC or SAML 2.0 provider. Google recommends granting roles to the federated identity directly on resources; impersonating a service account is the alternative. Google warns that granting access to all identities in a pool can incur risk.

Federation removes the stored key. It does not remove the need to review the trust configuration and the permissions of the role or account behind it. The workload identity federation page has a trust configuration checklist; GitHub Actions to AWS with OIDC works through one case end to end.

Organisation scope: accounts, subscriptions and projects

Inventories fail most often at the edge of the organisation, not inside a well-run account. In our view, forgotten accounts, subscriptions and projects are where forgotten identities live. Run discovery across every AWS account in the organisation, every Azure subscription and the Entra tenant, and every Google Cloud project, and record which you queried. Commands for each are on the NHI discovery queries page. Reconcile the result against authentication events, as described in the discovery methodology.

How this maps to the OWASP NHI Top 10

The mapping is ours, not a statement by OWASP.

OWASP riskCloud formControl above
NHI1 Improper OffboardingUnused roles, managed identities and service accounts; role assignments left after deletionUnused identities are removed
NHI2 Secret LeakageAccess keys, client secrets and service account keys in code or imagesShort-lived credentials; leak response
NHI5 Overprivileged NHIDefault Editor grants; broad managed policiesLeast privilege is measured
NHI6 Insecure Cloud Deployment ConfigurationsFederation trust without subject restrictionFederation trust is pinned
NHI7 Long-Lived SecretsKeys that never expireShort-lived credentials
NHI8 Environment IsolationTest identities with production rolesEnvironments are separated

Frequently asked questions

What are workload identities in AWS, Azure and Google Cloud?

In AWS they are IAM roles, which have no long-term credentials and issue temporary ones when assumed. In Azure they are managed identities and the service principals of app registrations. In Google Cloud they are service accounts. Access keys, client secrets and service account keys are credentials these identities hold, not identities.

Do Google Cloud service account keys expire?

Not by default. Google documents that a user-managed service account key never expires unless an organisation policy using constraints/iam.serviceAccountKeyExpiryHours sets an expiry for newly created keys. Existing keys are not affected, so they need an inventory and a removal plan.

What happens to Azure role assignments when a managed identity is deleted?

Microsoft states that role assignments are not deleted automatically when a system-assigned or user-assigned managed identity is deleted, and should be removed manually. User-assigned identities must themselves be deleted manually when no longer needed.

How should CI/CD pipelines authenticate to the cloud?

Through federation rather than stored keys: an IAM OIDC identity provider with AssumeRoleWithWebIdentity in AWS, a federated identity credential in Microsoft Entra, or a workload identity pool in Google Cloud. Pin the trust to the specific repository, branch or environment that needs access.

Is a managed identity risk-free because it has no secret?

No. It has no stored secret to leak, but Microsoft notes that anyone who can install or run code on the resource has access to all identities assigned to it. It still needs an owner, least-privilege role assignments and removal when the resource is retired.

How do you govern Azure service principals?

Treat each service principal as an identity with a named owner and owning team. Prefer managed identities or federated identity credentials over client secrets and certificates on app registrations, review role assignments against use, and export service principal sign-in logs. Entra ID Protection detects risk on single-tenant, non-Microsoft SaaS and multitenant apps; managed identities are not in scope.

What is the difference between an Azure managed identity and a service principal?

Microsoft documentation describes a managed identity as a special type of service principal that eliminates the need for developers to manage credentials. A service principal is the local instance of an application object in one tenant and authenticates with a credential someone manages: a federated credential, a certificate or a client secret. Entra counts applications, service principals and managed identities as workload identities, and in our view each needs a named owner and periodic review.

Sources

From the publisher

HumanAudit, which publishes this site, is preparing the NHI Governance pack: an NHI policy, ownership register, lifecycle procedures and one control set mapped, as our interpretation, to PCI DSS v4.0.1, ISO/IEC 27001:2022, NIS2 and DORA. Planned for March 2027; not yet on sale, and no price has been published.

Monthly change log

Know when the NHI landscape changes.

One email a month from this reference: new deals, standards status changes and corrections. No sponsored content. Unsubscribe from any email.

We first email you a link to confirm. Privacy policy.