GKE Workload Identity Federation Token Errors
Matches GKE Metadata Server token exchange errors, missing iam.gke.io/gcp-service-account annotations, and IAM workloadIdentityUser binding mismatches.
- Kind
- Signature
- Version
- 2.0.0
- Tier
- verified
- Needs Faber
- v2.0.0+
- Digest prefix
- sha256:6972da34
Contract facts
- Sources
- 3
- kubernetes, loki, victorialogs
- Log patterns
- 3
- RE2, replayed in CI
- Kubernetes matchers
- 0
- CEL on live objects
- Samples
- 3 and 2
- must match and must not
Inspect it
Inspect the contract and RBAC delta
$ faberctl catalog inspect signatures/gke-workload-identity-failure \ --source oci://ghcr.io/faberops/catalog:v2How it works
Sources
kubernetes, loki, victorialogs
What it matches
Must match
- Unable to generate access token: IAM returned 403 Forbidden: The caller does not have permission
- GET http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token returned 404
- googleapi: Error 403: Permission 'iam.serviceAccounts.getAccessToken' denied on resource
Must not match
- Workload Identity token refreshed cleanly for app-sa
- Connected to Cloud SQL via IAM authentication
Signature source
signature.yamlFailureSignature26 lines
apiVersion: catalog.faberops.dev/v2
kind: FailureSignature
metadata:
name: gke-workload-identity-failure
spec:
description: Matches GKE Metadata Server token exchange errors, missing iam.gke.io/gcp-service-account annotations, and
IAM workloadIdentityUser binding mismatches.
sources:
- kubernetes
- loki
- victorialogs
logPatterns:
- Unable to generate access token.*IAM returned 403 Forbidden
- metadata\.google\.internal.*computeMetadata/v1/instance/service-accounts/default/token.*(403|404)
- Permission 'iam\.serviceAccounts\.getAccessToken' denied on resource
samples:
match:
- 'Unable to generate access token: IAM returned 403 Forbidden: The caller does not have permission'
- GET http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token returned 404
- 'googleapi: Error 403: Permission ''iam.serviceAccounts.getAccessToken'' denied on resource'
noMatch:
- Workload Identity token refreshed cleanly for app-sa
- Connected to Cloud SQL via IAM authentication
queries:
loki: '{app!=""} |= "Unable to generate access token" or |= "iam.serviceAccounts.getAccessToken"'
victorialogs: ("Unable to generate access token" OR "iam.serviceAccounts.getAccessToken")
pack.yamlcatalog metadata11 lines
# Catalog metadata for signatures/gke-workload-identity-failure. Not applied to the cluster.
apiVersion: catalog.faberops.dev/v2
kind: CatalogPack
metadata:
name: gke-workload-identity-failure
category: signatures
version: 2.0.0
spec:
tier: verified
minFaberVersion: v2.0.0
digest: sha256:6972da34a3a7f617ae4f312d9a8d14279421f6910e85fbd79c832bbb2f4cd8a8
Signatures are catalog data. A Playbook references one by name in a connector trigger. It is never applied on its own.
Related packs
All 176 packsGKE Workload Identity Federation Migrator
playbooks/gke-workload-identity-auditAudits GKE ServiceAccounts and workloads for missing iam.gke.io/gcp-service-account annotations or unnecessary automountServiceAccountToken mounts, opening small HITL GitOps pull requests to enforce least-privilege Workload Identity Federation.Default HITLCeiling HITLAzure AKS Workload Identity Federation Auditor
playbooks/azure-aks-workload-identity-auditAudits Azure Kubernetes Service ServiceAccounts and workloads still using deprecated AAD Pod Identity labels or missing azure.workload.identity/client-id annotations, opening small HITL GitOps pull requests to enforce Microsoft Entra Workload Identity.Default HITLCeiling HITLAzure AKS Workload Identity Federation Token Failures
signatures/azure-aks-workload-identity-token-failMatches Microsoft Entra ID federated identity credential mismatch errors, AADSTS70021 token exchange rejections, and missing azure.workload.identity/client-id annotations on Azure Kubernetes Service.Log patterns 3Sources 3