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.
| Concept | AWS | Microsoft Azure / Entra | Google Cloud |
|---|---|---|---|
| Workload identity | IAM role: an identity with permissions and no standard long-term credentials; assuming it gives temporary credentials for a session | Managed identity (system-assigned or user-assigned); service principal of an app registration. Entra groups applications, service principals and managed identities as workload identities | Service account: user-managed, default service accounts created when some services are enabled, and Google-managed service agents |
| Stored credential to avoid | IAM user access keys | Client secrets and certificates on app registrations | User-managed service account keys, which never expire by default |
| Short-lived credential | STS temporary credentials; for AssumeRoleWithWebIdentity, 15 minutes up to the role maximum (1 to 12 hours), default one hour | Managed identity credentials are handled by Azure and are not accessible to you | Short-lived access tokens, which expire after one hour by default |
| Workloads outside the cloud | IAM OIDC identity provider with AssumeRoleWithWebIdentity; IAM Roles Anywhere | Workload identity federation: a federated identity credential on a user-assigned managed identity or app registration | Workload Identity Federation: pools and providers, attribute mappings and attribute conditions |
| Kubernetes workloads | IRSA or EKS Pod Identity | Workload identity federation for Kubernetes clusters | Workload Identity Federation for GKE |
| Unused-identity signal | IAM 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
subclaim can let any user on that platform assume the role. AWS IAM now rejects a GitHub trust policy whosesubcondition 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.
| Control | AWS check | Azure check | Google Cloud check | Acceptance criterion |
|---|---|---|---|---|
| Workloads use platform-issued, short-lived credentials | IAM credential report: IAM users with active access keys | App registrations with client secrets or certificates | gcloud iam service-accounts keys list --managed-by=user per account | No 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 pinned | Trust policy has exact sub and aud conditions | Federated 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 identities | No trust accepts a whole platform, organisation or repository wildcard without a recorded exception |
| Every identity has an owner | Tags on the role | Tags on the managed identity; owners on the app registration | Labels or a register entry per service account | Named person plus owning team for 100% of in-scope identities; a team name alone fails |
| Least privilege is measured | IAM Access Analyzer policy generation or unused permission findings | Role assignments reviewed against use | IAM recommender and policy insights | Granted versus used permissions reviewed at a set interval; see NHI least privilege |
| Unused identities are removed | Role last used; unused access findings | Sign-in log absence; orphaned role assignments | Service account insights (90 days) | Identities unused for 90 days have an owner decision on record within 30 days |
| Leak response is configured | AWS applies AWSCompromisedKeyQuarantineV3 to an IAM user whose credentials are exposed; a runbook covers what to do next | Entra ID Protection "Leaked Credentials" detection for workload identities | constraints/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 separated | Separate accounts per environment | Separate subscriptions per environment | Separate projects per environment | No 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 insubjectFromWebIdentityToken. 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 risk | Cloud form | Control above |
|---|---|---|
| NHI1 Improper Offboarding | Unused roles, managed identities and service accounts; role assignments left after deletion | Unused identities are removed |
| NHI2 Secret Leakage | Access keys, client secrets and service account keys in code or images | Short-lived credentials; leak response |
| NHI5 Overprivileged NHI | Default Editor grants; broad managed policies | Least privilege is measured |
| NHI6 Insecure Cloud Deployment Configurations | Federation trust without subject restriction | Federation trust is pinned |
| NHI7 Long-Lived Secrets | Keys that never expire | Short-lived credentials |
| NHI8 Environment Isolation | Test identities with production roles | Environments 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
- AWS IAM User Guide, IAM roles, Amazon Web Services, accessed 10 Oct 2026
- AWS IAM User Guide, Security best practices in IAM, Amazon Web Services, accessed 10 Oct 2026
- AWS STS API Reference, AssumeRoleWithWebIdentity, Amazon Web Services, accessed 10 Oct 2026
- AWS IAM User Guide, Create a role for OpenID Connect federation, Amazon Web Services, accessed 10 Oct 2026
- AWS IAM User Guide, Logging IAM and AWS STS API calls with AWS CloudTrail, Amazon Web Services, accessed 16 Oct 2026
- AWS IAM User Guide, IAM Access Analyzer findings, Amazon Web Services, accessed 16 Oct 2026
- AWS Managed Policy Reference, AWSCompromisedKeyQuarantineV3, Amazon Web Services, accessed 16 Oct 2026
- Amazon EKS User Guide, EKS Pod Identities, Amazon Web Services, accessed 16 Oct 2026
- Microsoft Learn, What are managed identities for Azure resources?, Microsoft, accessed 10 Oct 2026
- Microsoft Learn, Managed identity best practice recommendations, Microsoft, accessed 10 Oct 2026
- Microsoft Learn, Workload identity federation, Microsoft, accessed 16 Oct 2026
- Microsoft Learn, Securing workload identities with ID Protection, Microsoft, accessed 10 Oct 2026
- Google Cloud, Service accounts overview, Google Cloud, accessed 10 Oct 2026
- Google Cloud, Service account credentials, Google Cloud, accessed 10 Oct 2026
- Google Cloud, Workload Identity Federation, Google Cloud, accessed 16 Oct 2026
- Google Cloud, Find unused service accounts, Google Cloud, accessed 10 Oct 2026
- Google Cloud blog, Automatically disabling leaked service account keys: what you need to know, Google Cloud, 15 May 2024
- OWASP Non-Human Identities Top 10 (2025), OWASP Foundation, 2025
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.