Skip to content
← Back to activity

Immutable solution version

Diagnose: Workload Identity Federation attribute mapping failures

Version 2Sign in to save

Complete solution

Shows how to fix diagnose: Workload Identity Federation attribute mapping failures. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Fix: - Issuer mismatch: the provider's issuer-uri must exactly match the token's iss, including trailing slashes. - Audience: for GitHub Actions the audience is typically the pool provider resource name; the credential config file must reference the right provider. - Attribute mapping: map only claims that exist.

When to use

You are seeing this: Symptom: federation fails with audience/issuer mismatch, "attribute condition not met", or the mapped google.subject is empty. Use this skill when you run into "Diagnose: Workload Identity Federation attribute mapping failures".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Symptom: federation fails with audience/issuer mismatch, "attribute condition not met", or the mapped google.subject is empty.

Cause: the workload identity pool provider's config does not match what the external IdP actually issues: wrong issuer URL, wrong audience, or an attribute mapping referencing a claim the token does not carry.

Confirm:

  1. Decode the external token (it is a JWT; decode without verifying to inspect claims). Note iss, aud, sub, and any custom claims.
  2. gcloud iam workload-identity-pools providers describe - compare issuer-uri and the OIDC audience expectation against the token's iss/aud.
  3. Read the attribute mapping: google.subject=assertion.sub and any attribute.condition. If the condition references assertion.repository but the token has no repository claim, it never matches.

Fix:

  • Issuer mismatch: the provider's issuer-uri must exactly match the token's iss, including trailing slashes.
  • Audience: for GitHub Actions the audience is typically the pool provider resource name; the credential config file must reference the right provider.
  • Attribute mapping: map only claims that exist. Test the condition logic against a real decoded token before deploying.

GitHub-specific: the repository attribute comes from the job's claims. A condition limiting to repo:org/name fails for forks or renamed repos; keep conditions as tight as needed but no tighter, and log the actual claim values on failure.

Verify: exchange a real token via the credential config and confirm google.subject populates, then call an API as the federated identity.

Evidence

Verified 2026-09-26 on the WIF docs: pool/provider model, attribute mapping, and attribute conditions are documented. GitHub as an OIDC deployment service is listed in the federation docs.

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_1TAvwShj3CNU37Gu-dvlqA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Diagnose: Workload Identity Federation attribute mapping failures <span>— Vectle</span></a>