Faberby FaberOps

Azure AKS Workload Identity Federation Token Failures

Matches Microsoft Entra ID federated identity credential mismatch errors, AADSTS70021 token exchange rejections, and missing azure.workload.identity/client-id annotations on Azure Kubernetes Service.

Kind
Signature
Version
2.0.0
Tier
verified
Needs Faber
v2.0.0+
Digest prefix
sha256:938e7179

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/azure-aks-workload-identity-token-fail \ --source oci://ghcr.io/faberops/catalog:v2

How it works

Sources

kubernetes, loki, victorialogs

What it matches

Must match

  • AADSTS70021: No matching federated identity record found for presented assertion subject system:serviceaccount:apps:orders
  • WorkloadIdentityCredential authentication failed: failed to read federated token file
  • azure-wi-webhook rejected pod apps/orders-0: missing azure.workload.identity/client-id annotation

Must not match

  • Successfully acquired Microsoft Entra ID access token via Workload Identity
  • Pod apps/orders-0 mounted azure-identity-token projected volume cleanly

Signature source

signature.yamlFailureSignature26 lines
apiVersion: catalog.faberops.dev/v2
kind: FailureSignature
metadata:
  name: azure-aks-workload-identity-token-fail
spec:
  description: Matches Microsoft Entra ID federated identity credential mismatch errors, AADSTS70021 token exchange rejections,
    and missing azure.workload.identity/client-id annotations on Azure Kubernetes Service.
  sources:
  - kubernetes
  - loki
  - victorialogs
  logPatterns:
  - AADSTS70021.*No matching federated identity record found
  - WorkloadIdentityCredential authentication failed
  - azure-wi-webhook.*missing azure\.workload\.identity/client-id
  samples:
    match:
    - 'AADSTS70021: No matching federated identity record found for presented assertion subject system:serviceaccount:apps:orders'
    - 'WorkloadIdentityCredential authentication failed: failed to read federated token file'
    - 'azure-wi-webhook rejected pod apps/orders-0: missing azure.workload.identity/client-id annotation'
    noMatch:
    - Successfully acquired Microsoft Entra ID access token via Workload Identity
    - Pod apps/orders-0 mounted azure-identity-token projected volume cleanly
  queries:
    loki: '{namespace!=""} |= "AADSTS70021" or |= "WorkloadIdentityCredential authentication failed"'
    victorialogs: ("AADSTS70021" OR "WorkloadIdentityCredential authentication failed")
pack.yamlcatalog metadata11 lines
# Catalog metadata for signatures/azure-aks-workload-identity-token-fail. Not applied to the cluster.
apiVersion: catalog.faberops.dev/v2
kind: CatalogPack
metadata:
  name: azure-aks-workload-identity-token-fail
  category: signatures
  version: 2.0.0
spec:
  tier: verified
  minFaberVersion: v2.0.0
  digest: sha256:938e7179a8909beec0424426e0d2ed2b2c03e2e534db837f40cc983cc81dc784

Signatures are catalog data. A Playbook references one by name in a connector trigger. It is never applied on its own.