Workload identity federation removes stored cloud keys from pipelines, but a trust setting that checks only the issuer lets any workload on a shared issuer, such as every GitHub or GitLab.com project in the world, request your credentials. The security of federation lives in a handful of fields: the issuer, the audience, and the subject or claim conditions. Each cloud names and enforces those fields differently. This cheat sheet puts the setting names, audience values and subject condition patterns for AWS, Google Cloud and Microsoft Azure side by side, then lists claim values for common CI providers and the misconfigurations to look for. It is for platform and DevOps engineers who already understand the concept; for the architecture and rollout, see the Workload Identity Federation Guide. Platforms are listed alphabetically.
This is an independent guide from NHI Mgmt Group, based on the public documentation of AWS IAM, Google Cloud IAM and Microsoft Entra, as of November 2026. It is not sponsored or reviewed by any of these vendors. Product features change, so confirm settings against each vendor's current documentation.
Key takeaways
- Issuer alone is never enough: GitHub Actions, GitLab.com and HCP Terraform use one issuer for all customers, so every trust must also pin your organisation, repository or workspace.
- Pin the audience: AWS checks
audagainst the provider's audience list, Google Cloud against allowed audiences, and Entra against exactly one audience value, usuallyapi://AzureADTokenExchange. - Prefer immutable IDs: AWS and Google Cloud documentation both recommend numeric IDs such as
repository_idandrepository_owner_idover names, which can be reclaimed after a rename or deletion. - Bind production to a protected environment or branch: a subject ending
:environment:productionor:ref:refs/heads/mainis far tighter thanrepo:org/repo:*. - Watch format changes: GitHub applies an immutable subject format, containing owner and repository IDs, to repositories created, renamed or transferred after 15 July 2026 (older repositories keep the previous format unless they opt in), so exact-match subjects written for the old format will stop matching.
How to use this template
- Find your cloud section for the exact setting names, then the CI provider table for the claim values to pin.
- Replace placeholders such as
[ORG],[REPO],[PROJECT_NUMBER]and[POOL_ID]with your own values. Never copy example IDs. - Start narrow: write the tightest condition that works (one repository, one protected branch or environment), and widen only with a recorded reason.
- Review existing trusts against the misconfigurations table. See the Workload Identity Federation Trust Review Checklist for a full review routine.
- Troubleshooting errors such as audience mismatch or "no matching federated identity record" is covered in the Multi-Cloud Workload Identity Troubleshooting Guide.
AWS
AWS federation uses an IAM OIDC identity provider plus a role trust policy that allows sts:AssumeRoleWithWebIdentity.
| Setting | Where | Value or rule |
|---|---|---|
| Provider URL | IAM OIDC identity provider | Must begin https://, case-sensitive, no port, no query parameters, unique per account. GitHub: https://token.actions.githubusercontent.com |
| Audience (client ID) | IAM OIDC identity provider | At least one, up to 100. Must match the token's aud; if the token carries azp, STS uses azp as the audience. GitHub to AWS convention: sts.amazonaws.com |
| Thumbprints | IAM OIDC identity provider | One to five. AWS validates the JWKS certificate against trusted root CAs and uses the thumbprint only when the certificate is not CA-signed, cannot be retrieved, or TLS 1.3 is required |
| Principal | Role trust policy | {"Federated": "arn:aws:iam::[ACCOUNT]:oidc-provider/[HOST]"}; one principal per role |
| Audience condition | Role trust policy | StringEquals on [HOST]:aud |
| Subject condition | Role trust policy | StringEquals (exact) or StringLike (wildcard) on [HOST]:sub. For GitHub, IAM requires the sub key and rejects a value that is only *, ? or null |
| Provider-specific keys | Role trust policy | GitHub: repository_id, repository_owner_id, job_workflow_ref, ref, environment, workflow, actor, enterprise_id. GitLab keys such as namespace_id and project_id apply to GitLab.com only |
Tight GitHub pattern: StringEquals on token.actions.githubusercontent.com:aud = sts.amazonaws.com, plus either sub = repo:[ORG]/[REPO]:environment:production or the immutable-ID form AWS shows, repository_id = [ID] with ref = refs/heads/main. AWS labels repo:[ORG]/* as the broadest option and not recommended. See How to audit AWS IAM Roles Anywhere and OIDC identity providers.
Google Cloud
Google Cloud federation uses a workload identity pool containing one or more providers, with attribute mappings and a Common Expression Language (CEL) attribute condition, and grants roles to federated principals.
| Setting | Where | Value or rule |
|---|---|---|
| Pool and provider IDs | Workload identity pool | Fixed after creation; the gcp- prefix is reserved |
| Issuer URI | OIDC provider | GitHub https://token.actions.githubusercontent.com/; GitLab.com https://gitlab.com; HCP Terraform https://app.terraform.io; Azure DevOps from the service connection's federation details |
| Allowed audiences | OIDC provider | Default audience is the provider resource name //iam.googleapis.com/projects/[PROJECT_NUMBER]/locations/global/workloadIdentityPools/[POOL_ID]/providers/[PROVIDER_ID]. Azure DevOps uses application ID fb60f99c-7a34-4190-8149-302f77469936 |
| Attribute mapping | OIDC provider | google.subject is required, maximum 127 characters (GitHub and GitLab: assertion.sub; HCP Terraform: assertion.terraform_workspace_id). Custom: attribute.[NAME]=assertion.[CLAIM] |
| Attribute condition | OIDC provider | CEL expression that must be true; each claim used must be mapped. Google states that a condition restricting your organisation, group or tenant must be added for GitHub, GitLab.com and HCP Terraform |
| Principal (one identity) | IAM binding | principal://iam.googleapis.com/projects/[PROJECT_NUMBER]/locations/global/workloadIdentityPools/[POOL_ID]/subject/[SUBJECT] |
| Principal set (by attribute) | IAM binding | principalSet://.../workloadIdentityPools/[POOL_ID]/attribute.[NAME]/[VALUE]; avoid the whole-pool form /[POOL_ID]/* |
| Access model | IAM binding | Direct resource access (Google's recommended default where APIs allow; HCP Terraform uses impersonation) or service account impersonation via roles/iam.workloadIdentityUser |
Tight GitHub pattern: map attribute.repository_id=assertion.repository_id and attribute.repository_owner_id=assertion.repository_owner_id; condition assertion.repository_owner_id=='[OWNER_ID]' && assertion.ref=='refs/heads/main'; bind roles to the principalSet for attribute.repository_id/[ID]. Google recommends the numeric ID claims because names can be reclaimed. See How to move GKE workloads from keys to Workload Identity Federation.
Microsoft Azure
Microsoft Entra ID federation uses a federated identity credential (FIC) on an app registration or a user-assigned managed identity.
| Setting | Where | Value or rule |
|---|---|---|
issuer | FIC | Must exactly match the token's issuer; up to 600 characters; leading or trailing whitespace breaks the exchange |
subject | FIC | Must exactly match the token's sub; up to 600 characters. Use exact values: wildcard patterns go in a flexible FIC instead |
audiences | FIC | Exactly one value; Microsoft recommends api://AzureADTokenExchange |
name | FIC | 3 to 120 URL-friendly characters, starting alphanumeric; immutable |
| Uniqueness and limit | App or managed identity | Issuer plus subject must be unique; up to 20 FICs per app or user-assigned managed identity |
claimsMatchingExpression | Flexible FIC (preview as of November 2026) | Operators matches (with * and ?), eq, and; subject must be null; languageVersion 1. For GitHub, must match sub plus at least one of repository_id or repository_owner_id. Supported issuers: GitHub, GitLab, Terraform Cloud |
| Signing algorithm | Issuer | Microsoft documents RS256 as the supported signing algorithm |
Tight GitHub pattern: one FIC per deployment target with issuer https://token.actions.githubusercontent.com, subject repo:[ORG]/[REPO]:environment:production and audience api://AzureADTokenExchange. Microsoft notes that a wrong subject still saves successfully and only fails at token exchange, and that a newly created FIC can return AADSTS70021 until it replicates. Azure Policy can deny FIC creation on managed identities where federation should not be used. See How to audit Entra workload identity federated credentials and the AKS Workload Identity Guide.
Claim conditions per CI provider
CI providers are listed alphabetically. Values are as documented by each provider in November 2026.
| CI provider | Issuer | Default sub format | Immutable claims to pin | Notes |
|---|---|---|---|---|
| Azure DevOps | Shown in the service connection's workload identity federation details | Service connection specific; longer than 127 characters, so Google maps assertion.sub.split('/sc/')[1] | oid (Google condition example: application object ID) | Service connections create the Entra FIC; copy issuer and subject from the connection |
| GitHub Actions | https://token.actions.githubusercontent.com | repo:[ORG]/[REPO]:environment:[ENV], ...:ref:refs/heads/[BRANCH], ...:ref:refs/tags/[TAG] or ...:pull_request; immutable form repo:[OWNER]@[OWNER_ID]/[REPO]@[REPO_ID]:... | repository_id, repository_owner_id; also job_workflow_ref, environment, runner_environment | Job needs id-token: write. Default aud is the owner URL unless set. Subject template customisable via include_claim_keys; update cloud conditions first |
| GitLab.com | https://gitlab.com | project_path:[GROUP]/[PROJECT]:ref_type:[TYPE]:ref:[BRANCH] | namespace_id, project_id; also ref_protected, environment_protected, deployment_tier | Token requested per job in id_tokens with one aud; RS256; expires with the job timeout, or after 5 minutes if none is set |
| HCP Terraform | https://app.terraform.io | Workspace and run based; AWS requires the trust policy to evaluate app.terraform.io:sub | terraform_organization_id, terraform_workspace_id | Google maps google.subject to the workspace ID |
For branch and environment scoping in more depth, see How to Scope CI OIDC Trust to Branch and Environment and the GitHub Actions OIDC Federation Hardening Guide.
Common misconfigurations
| Misconfiguration | Why it matters | Fix |
|---|---|---|
| No organisation or repository condition on a shared issuer | Any customer of that CI service can mint an accepted token | AWS: pin sub or repository_owner_id; Google Cloud: attribute condition on owner or namespace ID; Azure: exact subject or flexible FIC with an ID claim |
Wildcard to the whole organisation (repo:[ORG]/*) | Any repository, including new or low-trust ones, can deploy to production | One trust per repository and environment |
| Pull request runs trusted for deploy roles | Code from forks or unreviewed branches gets cloud access | Match only protected branches or environments with required reviewers |
| Name-based conditions only | Deleted or renamed organisations and repositories can be re-registered by others | Add repository_id, repository_owner_id, namespace_id or project_id |
Google whole-pool binding (/[POOL_ID]/*) | Every identity accepted by every provider in the pool gets the role | Bind to a principalSet by attribute, or one principal |
| Broad audience | Tokens minted for another service can be replayed | Use the cloud-specific audience only |
| Subject format changed upstream | GitHub immutable subjects or a custom template stop matching exact conditions, causing outages and rushed widening | Prefer ID claims; update trusts before changing templates |
| Over-privileged target role | Tight trust does not limit what the role can do | Least privilege per pipeline stage; separate plan and apply roles |
Monitor the exchanges as well as the settings: AWS CloudTrail records AssumeRoleWithWebIdentity, Google Cloud records Security Token Service token exchanges in Cloud Audit Logs, and Entra records service principal sign-ins. Alert on new or changed providers and FICs, and on exchanges from subjects not seen before. The trust settings in this sheet map to NIST SP 800-53 Rev 5 IA-5 Authenticator Management and AC-6 Least Privilege. See the Top 10 Workload Identity Mistakes.
Practitioner checklist
- List every OIDC provider, workload identity pool and FIC across all clouds, with owner and purpose.
- Confirm every trust on a shared issuer pins your organisation, group or tenant.
- Pin the audience to the cloud-specific value on every trust.
- Add immutable ID claims (repository, owner, namespace, project or workspace IDs) wherever the cloud supports them.
- Restrict production roles to protected branches or environments; never trust pull request subjects for deploy roles.
- Replace Google whole-pool bindings with attribute-scoped principal sets.
- Check GitHub repositories created, renamed or transferred since 15 July 2026 for the immutable subject format.
- Alert on provider and FIC changes and on first-seen subjects in token exchange logs.
Standards and references
- AWS: Create a role for OpenID Connect federation
- AWS: Create an OpenID Connect identity provider in IAM
- AWS: IAM and AWS STS condition context keys
- Google Cloud: Configure Workload Identity Federation with deployment pipelines
- Microsoft Learn: Important considerations and restrictions for federated identity credentials
- Microsoft Learn: Flexible federated identity credentials
- GitHub Docs: OpenID Connect reference
- GitLab Docs: OpenID Connect (OIDC) authentication using ID tokens
Related NHI Mgmt Group resources: Workload Identity Federation Guide · Cross-cloud workload identity federation · Workload Identity Federation Trust Review Checklist · Cloud Workload Identity Guide