Authentication & Authorization / Architecture

Workload Identity Federation

Workload identity federation lets software obtain target-platform credentials from an already trusted workload identity instead of storing a long-lived target secret. The exchange reduces secret distribution, but it moves trust into the source issuer, workload attestation, claim mapping, federation policy, short-lived credential service, and revocation behavior.

Identity, attestation, federation, and authorization are separate

Common operating models

Model Source identity Target result Main trust boundary
CI/CD OIDC federation Signed OIDC token issued for a repository, workflow, branch, tag, or environment. Cloud role/session credentials. Workflow integrity and exact iss/aud/sub trust conditions.
Cloud workload federation External IdP assertion or another cloud/platform identity. Mapped cloud principal or service-account impersonation credential. Attribute mapping and conditions must prevent unrelated tenants/workloads from matching.
SPIFFE/SPIRE Attested workload receives a SPIFFE ID represented by an X.509-SVID or JWT-SVID. Workload authentication inside or across configured trust domains; an STS can exchange it for another ecosystem credential. Node/workload attestation, registration entries, trust bundles, workload API access, and SVID validation.

SPIFFE defines identity and credential formats; SPIRE is one implementation that performs attestation and issuance. Neither automatically grants application authorization or establishes cloud-federation policy.

Federation flow and policy

  1. A source issuer authenticates or attests the workload and issues a short-lived assertion.
  2. The workload presents that assertion to a target Security Token Service or federation endpoint.
  3. The target validates issuer, signature/key, audience, time, token type, and source-specific claims.
  4. Target policy maps immutable, trustworthy claims to a target principal and applies conditions.
  5. The service issues a target credential with bounded audience, permissions, and lifetime.
  6. The target API validates the new credential and performs resource-level authorization.

Avoid mutable display names, unqualified repository names, or user-controlled attributes as sole trust selectors. Bind the policy to stable tenant/organization identifiers and the narrowest workload context available. In GitHub Actions-to-AWS federation, validate aud and restrict sub to the intended repository and branch, tag, environment, or reusable workflow pattern.

Rotation, revocation, and failure modes

Short lifetime limits how long an already stolen assertion or target credential remains useful; it does not prevent theft or guarantee immediate revocation. Disabling the source workload, removing a trust rule, or rotating an issuer key may not invalidate target credentials already issued.

Migration from static secrets

Inventory each secret’s caller, target, permissions, storage, rotation, and fallback first. Create the federated identity and least-privilege policy, run both paths during a bounded migration window, observe successful target authorization, remove the static credential, and verify that it no longer works. Do not retain an undocumented permanent fallback that recreates the original exposure.

What I need to remember

Workload federation replaces distributed target secrets with a chain of source identity, attestation, claim mapping, target policy, and short-lived issuance. Restrict every link to one workload and audience, then test rollover, revocation, host compromise, and removal of the old secret.

Primary references