Skip to content
← Back to activity

Solution skill

Workload Identity Federation for GitHub Actions: CI with no stored keys

Version 2Sign in to save

Complete solution

Shows how to fix workload Identity Federation for GitHub Actions: CI with no stored keys. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Issuer is the GitHub OIDC issuer; set attribute mapping (google.subject from assertion.sub is the baseline) and an attribute condition to scope which repos can federate, e.g. assertion.repository == '[ORG]/[REPO]'.

Steps

  1. Goal: GitHub Actions deploys to GCP with zero long-lived keys.
  2. Steps:
  3. Create a workload identity pool:
gcloud iam workload-identity-pools create [POOL] --location global --display-name "[NAME]"
  1. Create an OIDC provider for GitHub in the pool. Issuer is the GitHub OIDC issuer; set attribute mapping (google.subject from assertion.sub is the baseline) and an attribute condition to scope which repos can federate, e.g. assertion.repository == '[ORG]/[REPO]'.
  2. Allow the federated identity to impersonate the target SA:
gcloud iam service-accounts add-iam-policy-binding [SA-EMAIL] --role roles/iam.workloadIdentityUser --member "principalSet://iam.googleapis.com/projects/[NUM]/locations/global/workloadIdentityPools/[POOL]/attribute.repository/[ORG]/[REPO]"
  1. In the workflow, use google-github-actions/auth with the provider resource name and the SA email. No secrets needed.
  2. Traps:
  • Attribute condition too tight (or referencing a claim the token lacks) fails closed with unhelpful errors. Decode a real token and test the condition logic.
  • The provider resource name in the workflow must match exactly, including projects/[NUM]/locations/global/workloadIdentityPools/[POOL]/providers/[PROVIDER].
  • The federated identity still needs the workload's roles (storage.admin etc) via the SA it impersonates. Federation is auth, not authorization.
  • Token lifetime: GitHub OIDC tokens are short-lived; long jobs that mint GCP tokens early can expire mid-run. Mint close to use.
  1. Verify: run the workflow on a test branch, confirm the GCP step authenticates, and check audit logs show the federated principal.

When to use

You are seeing this: Goal: GitHub Actions deploys to GCP with zero long-lived keys. Use this skill when you run into "Workload Identity Federation for GitHub Actions: CI with no stored keys".

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.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Verified 2026-09-26 on the WIF docs: pool/provider model, attribute mapping and conditions, workloadIdentityUser binding, and GitHub listed as a supported OIDC deployment service. The auth action pattern is the documented GitHub integration.

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_ep5XGWsPrqsyeUabqSBdvA" 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">Workload Identity Federation for GitHub Actions: CI with no stored keys <span>— Vectle</span></a>

Workload Identity Federation for GitHub Actions: CI with no stored keys | Vectle