Skip to main content
Workload identity lets a service in your cloud call Autumn without an API key. Your platform already knows which workload is running and can sign a short-lived token that proves it. Autumn checks that token against a rule you set up, then gives back an Autumn access token that works in place of a secret key. There’s no secret to store, rotate or leak. Each token is scoped to one environment, carries only the permissions you pick, and expires on its own. It works with:
  • GitHub Actions
  • GitLab CI
  • Google Cloud (Cloud Run, Compute Engine, GKE, Cloud Functions)
  • AWS (ECS, Lambda, EC2 and anything else that runs as an IAM role)
  • Azure managed identities
  • Vercel
  • Kubernetes on EKS, GKE and AKS
  • Any other issuer that publishes OIDC discovery

How it works

  1. You add a trust rule in the dashboard. It names the platform and the exact workload, like a GitHub repository ID or an IAM role ARN.
  2. At runtime, the workload asks its platform for an OIDC token issued for your Autumn audience.
  3. The workload sends that token to /v1/auth.exchange_token. Autumn fetches the issuer’s public keys, checks the signature, expiry and audience, and looks for a rule that matches.
  4. Autumn returns an access token starting with am_wit_. Use it as a Bearer token until it expires, then exchange again.

Your audience

Every environment has its own audience:
Copy yours from Settings → Workload Identity. Sandbox and live have separate audiences and separate rules, so a token minted for sandbox can never reach live data. The snippets below read it from an AUTUMN_AUDIENCE variable. The workload asks its platform for a token with this audience. Azure is the exception: its tokens carry your own app registration as the audience, so Azure workloads send the Autumn audience in the exchange request instead. See Azure.

Create a trust rule

Open Settings → Workload Identity in the environment you want the workload to use, and click Add trust rule.
The Workload Identity settings page with three trust rules and the environment's audience
1

Pick where it runs

Choose the platform. This decides which issuer Autumn trusts and which claim identifies the workload.
2

Identify the workload

Paste the workload’s ID, like a repository ID or an IAM role ARN, and the issuer if the platform needs one. Each platform pins a claim that can’t be reused by someone else:The value has to match exactly. Wildcards aren’t supported. Use conditions to narrow a rule further.
The Add trust rule sheet with GitHub Actions selected and a repository ID filled in
3

Add conditions (optional)

Under Only when, limit the rule to some runs of the workload, like production deploys from main. See Conditions.
4

Choose permissions and lifetime

Pick what the workload can do and how long each access token lasts. See Permissions and lifetime.
Nothing secret is stored in a rule. If the issuer isn’t one Autumn knows, it fetches <issuer>/.well-known/openid-configuration when you save, so the issuer has to be a public HTTPS URL.

Set up your platform

Each section shows how to get a platform token for your audience and what to put in the rule. They all end with the same exchange request.

GitHub Actions

Rule: the repository ID. Find it with gh api repos/<owner>/<repo> --jq .id. The issuer is https://token.actions.githubusercontent.com. If your enterprise uses a unique issuer, use https://token.actions.githubusercontent.com/<enterprise-slug>. The job needs id-token: write permission to request a token:
.github/workflows/sync.yml
To accept only production deploys from main, add the conditions environment is production and ref is refs/heads/main.

GitLab CI

Rule: the project ID, from the project’s overview page under ⋮ → Copy project ID. Autumn matches it against the job_project_id claim, which needs GitLab 18.4 or later. The issuer is https://gitlab.com. On a self-managed instance, use your instance URL, like https://gitlab.example.com. It has to be reachable from the internet over HTTPS. Request the token with id_tokens:
.gitlab-ci.yml
Useful conditions: ref_protected is true, environment is production or ref is main.

Google Cloud

Rule: the service account’s numeric unique ID, not its email:
The issuer is always https://accounts.google.com. On Cloud Run, Compute Engine, Cloud Functions and GKE with Workload Identity Federation for GKE, ask the metadata server for an identity token:
If you never attached a service account, the workload runs as the project’s default compute account, which every workload in the project shares. Create a dedicated service account for this workload and put its ID in the rule.

AWS

AWS signs tokens for external services through IAM outbound identity federation.
  1. Turn it on once per account:
  2. Read your account’s issuer and paste it into the rule:
  3. Allow the workload’s role to request tokens for your audience:
  4. Request a token from a regional STS endpoint. The global endpoint doesn’t serve this API:
Rule: the IAM role ARN the task, function or instance runs as, like arn:aws:iam::123456789012:role/usage-worker. Find it with aws iam get-role --role-name usage-worker --query Role.Arn --output text. If several workloads share a role, give this one its own role first.

Azure

Azure managed identities can only get tokens for an app registration in your tenant, so the setup has an extra step.
  1. In Microsoft Entra ID → App registrations, create a registration, for example autumn-workloads, with no redirect URI.
  2. Open Expose an API, click Add next to Application ID URI, and save the suggested api://<app-id>.
  3. In the rule, set Audience to that URI. If your tokens carry the app’s client ID instead (always the case for v2 tokens), use the client ID.
  4. Set Workload to the managed identity’s object (principal) ID:
  5. Set the issuer to match the token’s iss claim. Tokens are v1 unless the app registration’s manifest sets requestedAccessTokenVersion to 2:
Request a token for the app registration. On a VM, use the instance metadata service:
On App Service, Functions and Container Apps, use the identity endpoint instead:
For a user-assigned identity, add &client_id=<identity-client-id> to either URL. The token’s audience is your app, not Autumn, so send your Autumn audience as the audience parameter when you exchange it. That tells Autumn which organization and environment to check.

Vercel

  1. Make sure OIDC federation is on for the project, under Project → Settings → Security.
  2. Rule: the issuer is https://oidc.vercel.com/<team-slug> and the workload is the project ID (prj_...) from Project → Settings → General. Renaming the team changes the issuer, so update the rule if you do.
Vercel’s default audience is https://vercel.com/<team-slug>, which Autumn rejects. Request your Autumn audience with @vercel/oidc 4.0 or later:
app/api/sync/route.ts
A token with a custom audience always uses the team issuer, even if the team is set to the global issuer. To keep preview deployments out, add the condition environment is production.

Kubernetes

The kubelet can mount a service account token with your Autumn audience into the pod. The default mounted token is for the Kubernetes API, so Autumn rejects it. Rule: the issuer is your cluster’s OIDC issuer and the workload is system:serviceaccount:<namespace>:<name>. The issuer has to be reachable from the internet over HTTPS. AKS clusters before 1.34 need --enable-oidc-issuer. Mount the token with a projected volume:
deployment.yaml
Read /var/run/secrets/autumn/token each time you exchange. The kubelet rotates the file before the token expires, so a copy read at startup goes stale. Pods without a service account run as the namespace’s default account, which every pod there shares. Create a dedicated one. To stop a deleted and recreated account with the same name from matching, add the condition kubernetes.io › serviceaccount › uid is the account’s UID:

Other OIDC issuers

Choose Other OIDC for any issuer that publishes /.well-known/openid-configuration and a JWKS over public HTTPS. The rule matches the token’s sub claim exactly. Tokens must be signed with an asymmetric algorithm (RS, PS or ES families, or EdDSA) and include exp and iat.

Exchange the token

Send the platform token to POST https://api.useautumn.com/v1/auth.exchange_token. No API key is needed. The endpoint follows RFC 8693 and accepts a form body or JSON.
A successful exchange returns:
expires_in is in seconds and comes from the rule’s lifetime. scope lists the scopes the matching rule grants, separated by spaces. The exchange is stateless. You can exchange the same platform token as many times as you like until it expires, so there’s nothing to coordinate between replicas.

Call Autumn with the token

Use the access token anywhere you’d use a secret key:
The token works only in the rule’s environment and only for the rule’s scopes. Keep it in memory and reuse it. Get a fresh platform token and exchange again shortly before expires_in runs out, or when a call returns 401.

Conditions

Conditions narrow a rule to some runs of a workload. Every condition has to match, on top of the issuer and workload ID. They can only make a rule stricter.
The Only when section with two conditions: environment is production and ref is refs/heads/main
Each condition checks one claim in the platform token:
  • A claim that’s missing from the token never matches, not even is not. A condition can’t pass because a claim is absent.
  • Nested claims are a list of keys, shown as kubernetes.io › serviceaccount › uid. Dots inside a key stay part of that key.
  • Numbers and booleans are compared as text, so ref_protected is true works.
  • A rule can have up to 10 conditions.
Some common ones:

Permissions and lifetime

Pick a preset, or click Edit to choose exact scopes: A rule can’t grant scopes you don’t have yourself. The lifetime is how long each access token lasts: 15 minutes, 1 hour, 6 hours or 12 hours. Shorter is safer. The workload just exchanges again when a token expires.

Edit or revoke a rule

Click a rule to see its details and the exchanges it served in the last 7 days.
The detail sheet for the deploy-bot rule, showing its issuer, workload, permissions, lifetime and conditions
You can change a rule’s name, conditions, permissions and lifetime. To change the platform, issuer or workload, create a new rule. Editing or deleting a rule revokes every access token it issued within a few seconds. Calls with those tokens return 401, and workloads pick up the new settings at their next exchange. If your organization uses approval rules, changes that widen a rule, like adding scopes or removing a condition, may need approval.

Troubleshooting

A rejected exchange returns 401 with code invalid_grant. Read details.reason to see why:
Branch on details.reason, not on the message text, which may change. When you call the API with an access token, two more 401 messages can come back:
  • Invalid or expired workload token: the access token has expired or is malformed. Exchange again.
  • Workload token revoked: its rule was edited or deleted. Exchange again to get a token under the current rule.
Exchanges are rate limited per client IP and per organization. Over the limit, the endpoint returns 429 with code rate_limit_exceeded. A workload only needs to exchange about once per token lifetime, so normal traffic stays well below it.