Skip to main content
INS // Insights

Workload Identity Federation: A Migration Guide

Updated August 2026 · 4 min read

Workload identity federation replaces long-lived credentials with tokens issued and verified dynamically, based on a workload's actual identity rather than a secret it happens to hold. Migrating an existing system onto this model is a well-defined project once you understand the trust relationship it depends on.

The Core Concept: Trust, Not Secrets

Traditional service authentication works by shared secret: a workload proves who it is by presenting an API key or password that only it (in theory) knows. Federation works differently — a trusted identity provider (your cloud provider's IAM, an OIDC provider like a CI/CD platform, or another cloud's identity service) issues a signed, short-lived token asserting the workload's identity, and the receiving system verifies that assertion against a pre-configured trust relationship rather than checking a stored secret.

The practical benefit: there's no secret to leak, because there's no secret. A stolen token expires within minutes to hours; a stolen static API key is valid until someone notices and revokes it.

Migration Step 1: Map Every Trust Relationship You'll Need

Before touching any code, document exactly which workload needs to authenticate as what, to which system. This becomes your target trust policy set:

{
  "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:org/repo:ref:refs/heads/main"}
    }
  }]
}

Note the sub claim condition scoping trust to a specific repository and branch — this is the difference between federation done securely and federation that just moves the standing-trust problem to a token that's technically short-lived but scoped too broadly.

Migration Step 2: Scope Permissions Tightly on the Receiving Side

Federation eliminates the secret, but it doesn't automatically limit what the federated identity can do — that's still governed by the IAM role or permission set the trust relationship maps to. Migrate with least privilege in mind: give the federated role exactly the permissions the specific pipeline or workload needs, not a broad admin-equivalent role reused across every integration.

Migration Step 3: Migrate One Integration at a Time, Verify, Then Move to the Next

Attempting a full-stack federation migration in one deployment window is how outages happen. Migrate the highest-risk credential first (per your risk-ranked inventory), run it in production with monitoring, confirm zero issues over a defined observation window, then move to the next.

A Real Cross-Cloud Pattern: GCP Workload Identity Into AWS IAM

One of the more differentiated federation patterns worth understanding: a workload running under a GCP service account can authenticate directly into an AWS IAM role, with zero AWS access keys involved at any point. This works by configuring an AWS IAM OIDC identity provider trusting Google's token issuer, then writing a trust policy that validates the GCP service account's token claims:

{
  "Effect": "Allow",
  "Principal": {"Federated": "arn:aws:iam::123456789012:oidc-provider/accounts.google.com"},
  "Action": "sts:AssumeRoleWithWebIdentity",
  "Condition": {
    "StringEquals": {"accounts.google.com:sub": "<gcp-service-account-unique-id>"}
  }
}

This pattern matters because it demonstrates the same trust-based federation model transfers across cloud boundaries, not just within a single provider's own IAM ecosystem — genuinely useful for organizations with workloads split across providers who don't want to maintain a static AWS key just for a GCP-originated process to reach an AWS resource.

Common Migration Pitfalls

  • Overly broad sub claim conditions — trusting repo:org/* instead of a specific repo and branch defeats much of the security benefit
  • Forgetting token lifetime assumptions in long-running processes — a process expecting a credential to remain valid for hours needs to handle token refresh, not just initial acquisition
  • Not auditing for remaining static credentials post-migration — a partial migration that leaves an old key active as a "just in case" fallback recreates the exact risk you migrated away from

Frequently Asked Questions

Does workload identity federation work for on-premises workloads, not just cloud-native ones?

Yes, with the right token issuer — an on-prem system can federate into cloud IAM if it can present a signed token from a trusted identity provider (a self-hosted OIDC provider, for example), though this requires more setup than a cloud-native CI/CD platform's built-in OIDC support.

How is this different from just using short-lived rotated API keys?

Rotation still requires distributing and storing a secret, even if refreshed frequently. Federation eliminates the secret entirely — the workload's identity itself, verified by the trust relationship, is what authorizes access, with no credential material to store or leak in the first place.

What happens if the identity provider (GitHub, GCP, etc.) has an outage?

The federated workload would be unable to obtain new tokens during that window, which is a real availability tradeoff worth understanding — mitigations include monitoring the identity provider's status and, for critical paths, having a documented (though rarely used) break-glass procedure.

Can workload identity federation work across three or more clouds simultaneously?

Yes, the same trust-based pattern extends to any combination of providers that support OIDC federation, though each pairing requires its own trust policy configuration — it doesn't scale as "one federation, many clouds" but rather as individual bilateral trust relationships.

How do you validate a federation migration is actually complete?

Access-log analysis on the old credential path showing zero remaining usage over a meaningful observation window, combined with the old credential being fully revoked (not just deprecated), is the concrete evidence a migration is complete.


Talk to us about your credential elimination pilot → rutagon.com/contact or call 907-841-8407.