Workload identity
Each Multicloud tenant cluster has its own public OpenID Connect (OIDC) issuer. Your AWS, Google Cloud or Azure account can trust that issuer, so pods in your tenant cluster get short-lived cloud credentials with no access key stored anywhere: not in the platform, not in a Kubernetes Secret.
A tenant gets the issuer when the platform next applies its control plane (awake: the next reconcile; asleep: the next wake). AWS, Google Cloud and Azure token exchanges are supported.
Your issuer
https://oidc.multicloud.io/<slug>
<slug> is the opaque id of your cluster (c + 12 hex characters, for example c612c7760b2cb). It is
the name part of the tenant namespace multicloud-<slug> and is shown by mctl and the console.
The URL has no trailing slash; every cloud compares it as an exact string.
Two public documents sit under it (anyone can read them; they hold only public keys):
| Path | Content |
|---|---|
/<slug>/.well-known/openid-configuration |
Discovery document: issuer, jwks_uri, RS256 |
/<slug>/openid/v1/jwks |
The public signing keys of your cluster's ServiceAccount tokens |
How it works: your tenant apiserver signs every new ServiceAccount token with iss = the URL above
(the old in-cluster issuer, the default Kubernetes API server address, stays accepted, so nothing
inside the cluster changes). The platform copies the apiserver's public key (sa.pub) into the JWKS.
The private key never leaves the platform's control plane.
The token subject is always system:serviceaccount:<namespace>:<serviceaccount>. Bind your cloud
trust to that exact subject, never to a wildcard over all ServiceAccounts.
Pod: a projected token per audience
Kubernetes mints a token for the audience you name and refreshes the file before it expires. Use one volume source per cloud audience.
apiVersion: v1
kind: ServiceAccount
metadata:
name: uploader
namespace: app
---
apiVersion: v1
kind: Pod
metadata:
name: uploader
namespace: app
spec:
serviceAccountName: uploader
containers:
- name: app
image: <your image>
volumeMounts:
- name: cloud-tokens
mountPath: /var/run/secrets/tokens
readOnly: true
volumes:
- name: cloud-tokens
projected:
sources:
- serviceAccountToken:
path: aws-token
audience: sts.amazonaws.com
expirationSeconds: 3600
# - serviceAccountToken: {path: gcp-token, audience: <provider audience>, expirationSeconds: 3600}
# - serviceAccountToken: {path: azure-token, audience: api://AzureADTokenExchange, expirationSeconds: 3600}
AWS (IAM OIDC provider + role)
- Create the OIDC provider once per tenant cluster:
aws iam create-open-id-connect-provider --url https://oidc.multicloud.io/<slug> --client-id-list sts.amazonaws.com - Create a role with this trust policy (replace
<account>,<slug>,<namespace>,<sa>):{ "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Principal": {"Federated": "arn:aws:iam::<account>:oidc-provider/oidc.multicloud.io/<slug>"}, "Action": "sts:AssumeRoleWithWebIdentity", "Condition": {"StringEquals": { "oidc.multicloud.io/<slug>:aud": "sts.amazonaws.com", "oidc.multicloud.io/<slug>:sub": "system:serviceaccount:<namespace>:<sa>" }} }] } - In the pod, set
AWS_ROLE_ARN=<role arn>andAWS_WEB_IDENTITY_TOKEN_FILE=/var/run/secrets/tokens/aws-token. Every AWS SDK and the AWS CLI pick these up.
CI pool build cache (AWS S3)
A CI pool can use your own S3 bucket as its build cache. The runner pods assume an IAM role with the pool's tenant token. The platform stores the role ARN, bucket and region only.
- Issuer:
https://oidc.<base_domain>/<slug>(the pool's tenant issuer). - Audience:
sts.amazonaws.com. - Subject:
system:serviceaccount:door-ci:build-cache.
Trust policy (replace <account>, <base_domain> and <slug>):
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Principal": {"Federated": "arn:aws:iam::<account>:oidc-provider/oidc.<base_domain>/<slug>"},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {"StringEquals": {
"oidc.<base_domain>/<slug>:aud": "sts.amazonaws.com",
"oidc.<base_domain>/<slug>:sub": "system:serviceaccount:door-ci:build-cache"
}}
}]
}
Permissions policy (replace <bucket>):
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:GetObject", "s3:PutObject", "s3:DeleteObject", "s3:AbortMultipartUpload"],
"Resource": "arn:aws:s3:::<bucket>/cache/*"
},
{
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::<bucket>",
"Condition": {"StringLike": {"s3:prefix": "cache/*"}}
}
]
}
Lifecycle rule for the bucket. It expires objects after 7 days. It aborts unfinished multipart uploads after 1 day.
{"Rules":[{"ID":"expire-cache","Status":"Enabled","Filter":{"Prefix":"cache/"},"Expiration":{"Days":7},"AbortIncompleteMultipartUpload":{"DaysAfterInitiation":1}}]}
Why the prefix is fixed: the runs-on cache action writes every object as
cache/<repo>/<version>/<key>. No setting changes this prefix. The policy must cover cache/*.
Use one bucket per pool. This is the only isolation between pools.
The runner pod gets these values from the platform:
AWS_ROLE_ARN: the role ARN you saved.AWS_WEB_IDENTITY_TOKEN_FILE:/var/run/secrets/mc-build-cache/token.- A projected token volume for audience
sts.amazonaws.com, lifetime 3600 s.
Every job in the pool can write the cache, also a fork pull request job. Use a separate pool and bucket for fork jobs.
Google Cloud (Workload Identity Federation)
- Create a pool and an OIDC provider:
With nogcloud iam workload-identity-pools create mc-<slug> --location=global gcloud iam workload-identity-pools providers create-oidc mc-<slug> --location=global --workload-identity-pool=mc-<slug> --issuer-uri=https://oidc.multicloud.io/<slug> --attribute-mapping=google.subject=assertion.sub--allowed-audiences, the accepted token audience ishttps://iam.googleapis.com/projects/<project-number>/locations/global/workloadIdentityPools/mc-<slug>/providers/mc-<slug>(this form passed the live test, R8). Use exactly that string as the projected tokenaudience. The STSaudiencefield and the credential configuration name the provider as//iam.googleapis.com/projects/...(nohttps:). - Grant access to one subject, for example direct resource access:
principal://iam.googleapis.com/projects/<project-number>/locations/global/workloadIdentityPools/mc-<slug>/subject/system:serviceaccount:<namespace>:<sa>(orroles/iam.workloadIdentityUseron a Google service account for impersonation). - Create a credential configuration and mount it in the pod (it holds no secret):
Setgcloud iam workload-identity-pools create-cred-config projects/<project-number>/locations/global/workloadIdentityPools/mc-<slug>/providers/mc-<slug> --credential-source-file=/var/run/secrets/tokens/gcp-token --output-file=gcp-credentials.jsonGOOGLE_APPLICATION_CREDENTIALSto the mounted file.
Azure (federated credential on an app registration or a managed identity)
- Add a federated credential:
For a user-assigned managed identity useaz ad app federated-credential create --id <app-id> --parameters '{"name":"mc-<slug>-<sa>","issuer":"https://oidc.multicloud.io/<slug>","subject":"system:serviceaccount:<namespace>:<sa>","audiences":["api://AzureADTokenExchange"]}'az identity federated-credential createwith the same issuer, subject and audience. - In the pod, set
AZURE_CLIENT_ID,AZURE_TENANT_ID,AZURE_FEDERATED_TOKEN_FILE=/var/run/secrets/tokens/azure-tokenandAZURE_AUTHORITY_HOST=https://login.microsoftonline.com/. The Azure Identity SDKs (WorkloadIdentityCredential,DefaultAzureCredential) read them.
Limits and failure modes
- The issuer URL is permanent. Multicloud never changes it for an existing cluster.
- The clouds fetch the JWKS from our edge (Cloudflare in front of the platform api-server). If the edge is down, a cloud can reject new exchanges after its own cache expires; tokens already exchanged keep working until they expire. Plan for no cache: in one test (2026-10-26), AWS rejected new exchanges within 2 minutes of an issuer outage, Azure rejected some of them, and Google Cloud still accepted after 10 minutes.
- Since 2026-10-29 the edge caches both documents for 5 minutes and, if our origin returns an error, serves the
cached copy for as long as 1 hour is configured (
stale-if-error=3600; Cloudflare may evict it sooner). In an 8-minute test the edge served the cached copy for at least 2.5 minutes past its 5-minute lifetime while the origin returned 502. This covers a short outage of our platform, not a Cloudflare outage, and not a data center that has no cached copy yet. Still plan for no cache. - The JWKS lists every public key in the apiserver's
sa.pub(two during a key change). The platform republishes it whensa.pubchanges; you change nothing on your side. - No federation for a store without OIDC support (Cloudflare R2, MinIO): those take a static key that is written only into your encrypted tenant cluster.