Skip to main content
Keyless Cloud Authentication: Ending Static Credentials Across AWS, GCP, and Azure

Keyless Cloud Authentication: Ending Static Credentials Across AWS, GCP, and Azure

KU
· Founder & Chief Editor
• 8 min read•Updated •

Long-lived access keys are the credential that keeps leaking. This is the map to keyless auth, how workload identity federation and OIDC replace static secrets everywhere, and where to start.

Key takeaways

  • Keyless authentication replaces stored cloud keys with short-lived tokens.
  • A workload gets a signed OIDC token from its own platform, such as GitHub Actions or Kubernetes, and exchanges it for temporary credentials through AWS IAM OIDC federation, GCP Workload Identity Federation, or Entra ID federated credentials.
  • Start with CI, then delete the old keys.

Keyless cloud authentication means no workload stores a cloud key. The workload asks its own platform (GitHub Actions, a Kubernetes API server) for a signed OIDC token, and the cloud trades that token for credentials that expire within the hour. AWS calls it OIDC federation, GCP calls it Workload Identity Federation, Azure calls it federated identity credentials. Start with CI.

Verified against

aws-actions/configure-aws-credentials v6.3.0, google-github-actions/auth v3, Azure/login v3.1.0, against the GitHub Actions OIDC reference, AWS IAM OIDC provider docs, Google Cloud Workload Identity Federation docs and Microsoft Entra workload identity federation docs. Checked October 2026.

Why static credentials keep losing

A static credential has three properties that make it dangerous: it is long-lived (often never rotated), it is a bearer secret (whoever holds it is trusted), and it is copyable (it exists in more than one place the moment you use it). An access key committed to a repo, a service account JSON pasted into a CI variable that got logged, a token in a chat message: each is a standing invitation that may go unnoticed for months. Attackers know this. Microsoft's write-up of Storm-3068 stealing Kubernetes credentials through Azure DevOps is the pattern in miniature: find the stored secret, reuse it elsewhere.

Rotation schedules, secret scanners and vaulting shrink the blast radius but leave the root cause in place. The reason you would ever need to detect and rotate a leaked cloud credential is that one existed to leak.

The core mechanism: trade a secret for a token

Every keyless setup has four moving parts:

  1. An identity provider (IdP) that signs tokens: GitHub Actions (https://token.actions.githubusercontent.com), a Kubernetes API server, Google, Entra ID.
  2. A trust relationship on the target cloud: "accept tokens from this issuer, for these subjects, with this audience."
  3. A token, a short-lived JWT whose iss, sub and aud claims describe the workload.
  4. A role the token may assume, scoped by least privilege.

Nothing is stored. The sub claim is where the security lives: repo:my-org/my-repo:ref:refs/heads/main means "this repo, this branch," and the trust policy should match it as narrowly as you can.

AWS, end to end, from GitHub Actions

Create the OIDC provider once per account. AWS verifies GitHub's JWKS endpoint against its library of trusted root CAs, so you no longer need to compute a thumbprint for GitHub:

Terminal
aws iam create-open-id-connect-provider \
    --url https://token.actions.githubusercontent.com \
    --client-id-list sts.amazonaws.com

Then a role whose trust policy pins the audience and the subject:

trust-policy.json
{
  "Version": "2012-10-17",
  "Statement": [{
    "Effect": "Allow",
    "Principal": { "Federated": "arn:aws:iam::123456789012:oidc-provider/token.actions.githubusercontent.com" },
    "Action": "sts:AssumeRoleWithWebIdentity",
    "Condition": {
      "StringEquals": { "token.actions.githubusercontent.com:aud": "sts.amazonaws.com" },
      "StringLike": { "token.actions.githubusercontent.com:sub": "repo:my-org/my-repo:ref:refs/heads/main" }
    }
  }]
}

The workflow needs id-token: write, or it cannot request a token at all:

.github/workflows/deploy.yml
permissions:
  id-token: write
  contents: read
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: aws-actions/configure-aws-credentials@v6.3.0
        with:
          role-to-assume: arn:aws:iam::123456789012:role/gha-deploy
          aws-region: eu-west-1
      - run: aws sts get-caller-identity

The action defaults the audience to sts.amazonaws.com and the session to one hour. The deeper walk-through, including environment-scoped subjects, is in OIDC federation from GitHub Actions to AWS. For workloads outside any CI or cloud, IAM Roles Anywhere does the same job against an X.509 trust anchor.

GCP and Azure: same shape, different nouns

GCP uses a workload identity pool plus a provider with an attribute mapping (google.subject is required) and an attribute condition, a CEL expression that rejects tokens that don't match. Always set the condition; a pool that accepts any GitHub repo is a pool that accepts an attacker's repo.

Terminal
gcloud iam workload-identity-pools create github --location=global
gcloud iam workload-identity-pools providers create-oidc my-repo \
    --location=global --workload-identity-pool=github \
    --issuer-uri=https://token.actions.githubusercontent.com \
    --attribute-mapping="google.subject=assertion.sub,attribute.repository=assertion.repository" \
    --attribute-condition="assertion.repository=='my-org/my-repo'"

Google recommends granting roles to the federated principal directly and falling back to service account impersonation (roles/iam.workloadIdentityUser) only for APIs that don't support direct access. The full migration is in GCP Workload Identity Federation: replacing service account keys.

Azure attaches a federated identity credential to a user-assigned managed identity or app registration. Issuer, subject and audience must match the token case-sensitively:

Terminal
az identity federated-credential create --name github-main \
    --identity-name deploy-uami --resource-group rg-ci \
    --issuer https://token.actions.githubusercontent.com \
    --subject repo:my-org/my-repo:ref:refs/heads/main \
    --audiences api://AzureADTokenExchange

Details live in Azure Workload Identity Federation without secrets, and the multi-provider trust topology in cross-cloud identity federation patterns. GitLab, Buildkite and generic CI follow the same recipe, covered in OIDC federation beyond GitHub.

Inside Kubernetes, and the secrets that won't federate

Pods should not carry mounted cloud keys either. Kubernetes issues projected service account tokens, audience-scoped OIDC tokens that federate to AWS, GCP and Azure IAM. Service-to-service auth inside the cluster belongs to SPIFFE and SPIRE or mutual TLS, not shared API keys.

Database passwords and third-party API keys still need a secret somewhere. Make those short-lived and brokered: HashiCorp Vault issues dynamic, time-boxed credentials, and on Kubernetes you either run Vault as the secrets backend or sync with the External Secrets Operator. The principle underneath is short-lived credentials via STS and dynamic secrets.

The error strings, and what each one means

Error textCauseFix
Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variableWorkflow lacks id-token: writeAdd the permissions block at workflow or job level
Not authorized to perform sts:AssumeRoleWithWebIdentityTrust policy sub or aud doesn't match the tokenCompare the token's claims to the policy; check the new sub format below
No OpenIDConnect provider found in your account for https://token.actions.githubusercontent.comProvider missing, or role in a different accountCreate the provider in the role's account
AADSTS70021: No matching federated identity record found for presented assertionAzure subject/issuer/audience mismatch, often case or branchRecreate the credential with the exact sub
The given credential is rejected by the attribute conditionGCP CEL condition doesn't match the tokenFix the condition or the repo/branch claim

One change catches people in 2026: GitHub repositories created after July 15, 2026 emit an immutable sub that includes owner and repo IDs, repo:my-org@123456/my-repo@456789:ref:refs/heads/main. A trust policy written for the old name-only form returns the sts:AssumeRoleWithWebIdentity error above. Renamed or transferred repos move to the new format too.

A migration playbook

  1. Inventory. Find every long-lived credential. On AWS, the credential report lists each user's access key status and last use:

    Terminal
    aws iam generate-credential-report
    aws iam get-credential-report --query Content --output text | base64 -d | cut -d, -f1,9,10,11
    

    On GCP, gcloud iam service-accounts keys list --iam-account=SA_EMAIL --managed-by=user shows user-managed keys.

  2. Start with CI. Highest risk, lowest effort. Convert one pipeline, confirm it, template it. Pair it with GitHub Actions security hardening, because a federated role is only as safe as the workflows allowed to assume it.

  3. Federate workloads with projected tokens and workload identity federation.

  4. Broker the rest through Vault or a cloud secrets manager with short TTLs, under a zero trust posture that never treats network location as identity, including on AWS with IAM Identity Center.

  5. Delete the old keys and alarm on new ones. A fresh static key should page someone.

Where this breaks

Federation moves the trust boundary; it doesn't remove it. A wildcard sub such as repo:my-org/* lets any repo in the org, including a forked-and-merged one, assume the role. Self-hosted IdPs need a public discovery document and JWKS, which air-gapped clusters may not have. Some SaaS tools and legacy SDKs still only accept access keys. And a compromised workflow can still use its token for its full lifetime, so scope roles as if the token will leak.

Questions people ask

What is keyless authentication in the cloud?

Keyless authentication means a workload never stores a long-lived cloud key. It proves its identity to its own platform, receives a signed OIDC token, and exchanges that token with AWS STS, Google's Security Token Service or Entra ID for temporary credentials scoped to one role. The cloud trusts the issuer and checks claims like sub and aud instead of checking a shared secret.

Is OIDC federation more secure than access keys?

Yes, for almost every CI and workload case. There is no stored secret to leak, credentials expire on their own (one hour by default in configure-aws-credentials), and the trust policy can restrict access to one repository, branch or environment. The remaining risk is a too-broad trust condition, so pin the sub claim as narrowly as your workflows allow.

Do I still need a secrets manager if I use workload identity federation?

Usually yes. Federation covers access to cloud APIs, but database passwords, third-party API keys and legacy systems still need a secret. Use a secrets manager to make those short-lived and centrally brokered, ideally with dynamic credentials that expire, and let the workload reach the secrets manager itself through federation.

The call we'd make

Adopt keyless everywhere it's supported and treat every remaining static secret as debt to broker down to short TTLs. The trust configuration takes an afternoon per provider; the payoff is that your worst-case leak is a token that expired before anyone could use it. Start with CI this week, pin the sub claim narrowly (and in the new immutable format for new repos), and work the linked guides in migration order.

Sources

Explore topics:AWSCloud
React
Share this post
Cite this article
Plain text

Kiril Urbonas (2026). Keyless Cloud Authentication: Ending Static Credentials Across AWS, GCP, and Azure. DevOpsNess. Updated 2026-11-15. https://www.devopsness.com/blog/keyless-cloud-authentication-ending-static-credentials

Markdown

[Keyless Cloud Authentication: Ending Static Credentials Across AWS, GCP, and Azure](https://www.devopsness.com/blog/keyless-cloud-authentication-ending-static-credentials) (Kiril Urbonas, DevOpsNess, updated 2026-11-15)

KU

Kiril Urbonas

Founder & Chief Editor

606 articles
View all articles by Kiril Urbonas

You might have missed

Evergreen posts worth revisiting.