An AI agent can prove who it is in four ways. It can show a token from the platform that runs it, sign with a private key that it holds, send a shared secret, or rely on the word of another system. LumoAuth’s agent registry offers six identity types across those four. Pick the type that leaves the least to steal. Use workload identity when the agent runs on a platform that issues tokens, such as GitHub Actions or Kubernetes. Use AAuth when the agent can hold its own key. Use a client secret when your tools only support OAuth, and an API key only for a prototype.
TL;DR
- With workload identity, LumoAuth stores no secret for the agent. The platform signs a short-lived token for the agent’s own audience, and LumoAuth accepts each token only once.
- An AAuth agent signs every request with its own key, using HTTP message signatures (RFC 9421). A copied token is useless without that key.
- A client secret or an
agk_API key is a single string. Whoever copies it can act as the agent until you rotate it. API keys expire after 180 days unless you choose otherwise. - The identity type is fixed after registration. To move a prototype to a stronger type, register a new agent and revoke the old one.
- Whatever the identity type, the agent has one record, so capabilities, budgets, approvals and audit work the same way for all six.
How can an AI agent authenticate?
To authenticate, an agent has to present something that only it can present. There are four kinds of proof:
- A token from its platform. GitHub Actions, Kubernetes, the major clouds and SPIFFE can sign a short-lived token that says where the code runs. The agent stores nothing.
- A key that it holds. The agent keeps a private key and signs with it. The key never leaves the agent. Only signatures travel.
- A shared secret. The agent and the server both know a string, such as a client secret or an API key. The agent sends the string, or trades it for a token.
- Another system’s word. A gateway or an external agent registry has already identified the agent, and you trust that system.
LumoAuth turns these four into six identity types. You choose one in step 2 of the registration wizard, How it proves its identity.
| Identity type | Kind of proof | What the agent sends | What LumoAuth stores | Best for |
|---|---|---|---|---|
Workload identity (workload) |
Platform token | A fresh token from its platform, minted for the agent | A binding, such as github:acme/support-bot, and no secret |
Production agents on a platform that issues tokens |
AAuth (aauth) |
Own key | Requests signed with its private key | Public key material only | Agents that can keep a private key |
Private key JWT (private_key_jwt) |
Own key | A short JWT signed with its private key, in place of a secret | Its public keys: a JWKS URL or a key set | Agents that can keep a private key, where no platform issues tokens |
Client ID and secret (client_secret) |
Shared secret | Its agt_… ID and its secret, in the client credentials grant |
A hash of the secret | Tools that only support OAuth client credentials |
API key (api_key) |
Shared secret | An agk_… key as a bearer token |
A hash of the key | Prototypes on a host that you trust |
Custom (custom) |
Another system | Nothing that LumoAuth checks | An identity string that another system manages | Agents imported from another registry |
What would an attacker have to steal?
Ask one question of each method: what would someone need in order to become this agent? The answers put the six types in order.
- Workload identity: control of the workload itself. The attacker would have to run code in the pinned repository and branch, or as the pinned service account. There is no stored value to copy.
- AAuth and private key JWT: the private key. The key is never sent, so it does not appear in logs, proxies or request captures.
- Client secret: one string. It is stored in a config file or a secrets manager, and the agent sends it whenever it needs a new token.
- API key: one string, sent on every call. Each request is a chance for it to end up in a log.
- Custom: whatever the other system requires. LumoAuth checks nothing itself, so your protection is only as strong as that system.
Secrets also have a second cost: rotation. Somebody has to replace each one before it leaks or expires, without breaking the agent. Platform tokens expire within minutes, and an AAuth key can stay in place because it never travels.
Workload identity: the platform confirms the agent’s identity
Choose workload identity whenever the agent runs on a platform that can issue tokens. LumoAuth accepts tokens from:
- GitHub Actions, GitLab CI, Azure DevOps, CircleCI, Buildkite, Terraform Cloud, Vercel and Cloudflare
- Kubernetes projected service account tokens, AWS EKS through IAM roles for service accounts, Google Cloud and Microsoft Entra
- SPIFFE JWT-SVIDs, and any other OIDC issuer that you configure
The agent asks its platform for a token, then sends that token to LumoAuth. By default, the token must name the agent’s own URL as its audience. A token that the platform minted for some other service is then refused.
ORG=acme-corp
AGENT_ID=agt_42
# WORKLOAD_TOKEN holds the platform's token, minted for the agent's own audience:
# https://app.lumoauth.dev/orgs/acme-corp/api/v1/agents/agt_42
curl -sS -X POST "https://app.lumoauth.dev/orgs/$ORG/api/v1/agents/$AGENT_ID/attest" \
-H 'Content-Type: application/json' \
-d "{\"attestation_token\": \"$WORKLOAD_TOKEN\"}"
The response holds an access token for the agent that expires after 900 seconds. The agent can also use OAuth token exchange (RFC 8693) at the token endpoint instead. Each platform token is accepted only once, so the agent fetches a fresh one for every exchange.
The binding is what makes this safe. It pins the agent to one repository, one branch or environment, or one service account. The portal flags a binding that accepts too much: a workload agent with no binding is critical, and a GitHub binding that accepts any branch or pull request is a warning.
AAuth: the agent signs every request
AAuth is LumoAuth’s protocol for agents that hold their own key. The agent has an HTTPS identifier and a key pair. It signs each request with HTTP message signatures (RFC 9421), covering the method, the host and the path. Each signature carries a timestamp that must be within 60 seconds of the server’s clock, and a nonce that can be used only once.
Tokens issued to an AAuth agent are bound to its key. A token copied from a log is useless without the matching signature. When the agent needs a standard OAuth token, it calls the platform bridge, POST /aauth/agent/platform-token. The bridge returns a token that is bound to the same key with DPoP (RFC 9449) and expires after at most 300 seconds.
Choose AAuth for agents that run outside a token-issuing platform: on a laptop, on a plain virtual machine, or with a hosting provider that has no OIDC issuer. The Python (lumoauth[aauth]), Node (@lumoauth/agent) and Go SDKs sign requests for you.
Client ID and secret: OAuth client credentials
Every OAuth library supports the client credentials grant, which is why this type exists. The agent sends its agt_… ID and its secret to the token endpoint and receives an access token that expires after at most an hour.
curl -sS -X POST "https://app.lumoauth.dev/orgs/$ORG/api/v1/oauth/token" \
-d grant_type=client_credentials \
-d client_id="$AGENT_ID" \
-d client_secret="$LUMOAUTH_CLIENT_SECRET"
LumoAuth shows the secret once and stores only a hash of it. Keep the secret in a secrets manager and rotate it on a schedule. The portal warns when a secret is older than 180 days.
You can reduce the risk of a shared secret in one more way. Send a DPoP proof with the token request, and LumoAuth binds the access token to the agent’s key. Turn on Only issue DPoP-bound tokens in the agent’s settings, and LumoAuth refuses token requests that carry no proof.
API key: one string, for prototypes
An API key for an agent starts with agk_. The agent sends it as a bearer token, so the key itself is the credential. LumoAuth shows the key once, stores only a hash of it, and sets an expiry of 180 days by default. Never is available, but you have to choose it on purpose.
API keys are the quickest way to try an agent, and the weakest way to run one. The portal rates every API key agent as a warning. It also warns when a key never expires or expires within 14 days, and marks an expired key as critical. Use an API key on a host that you trust, then move the agent to a stronger type before production.
Private key JWT: a signed assertion instead of a secret
A private key JWT agent also holds a private key, but it uses the key only for the token request. Whenever it needs a token, it signs a short JWT, called a client assertion, and sends that instead of a secret. LumoAuth stores only the public key: a JWKS URL, or a key set pasted into the portal.
now = int(time.time())
assertion = jwt.encode(
{"iss": AGENT_ID, "sub": AGENT_ID, "aud": ISSUER,
"iat": now, "exp": now + 60, "jti": str(uuid.uuid4())},
private_key, algorithm="ES256",
headers={"kid": "agent-2026-11", "typ": "client-authentication+jwt"},
)
requests.post(TOKEN_URL, data={
"grant_type": "client_credentials",
"client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
"client_assertion": assertion,
})
LumoAuth checks the signature, then the claims. The audience must be the organization’s issuer identifier, the assertion may be valid for at most 10 minutes, and each jti is accepted only once. A copied assertion is useless after its first use.
Choose this type for an agent that can keep a private key but runs where no platform issues tokens, such as a virtual machine or AWS Lambda. It is the standard OAuth private_key_jwt method (RFC 7523), so most OAuth libraries can produce the assertion. To rotate, add the new key next to the old one, switch the agent over, then remove the old key. The portal rates the type as OK once a public key is registered.
Custom: another system vouches for the agent
Custom records an identity that another system manages. Agents imported from AWS AgentCore Identity or Salesforce Agentforce arrive as custom, for example. They arrive inactive and with no capabilities, so a person reviews each one first. LumoAuth checks nothing about a custom identity, so the portal rates it as a warning: the trust comes from the system in front of it.
How do you choose?
Work down this list and stop at the first answer that fits.
- Does the agent run on a platform that issues OIDC tokens? Use workload identity, and pin the binding to a branch, an environment or a service account.
- Can the agent keep a private key safe? Use AAuth if every request should be signed, or a private key JWT if only the token request needs to be.
- Do your tools only support OAuth client credentials? Use a client ID and secret. Store the secret in a secrets manager, rotate it, and bind tokens with DPoP.
- Is this a prototype on a host that you trust? Use an API key with an expiry.
- Does another registry already manage the agent’s identity? Import it as custom, then review its capabilities before you activate it.
One more rule applies to all of them: register one agent per purpose and per owner. Ten replicas of the same support agent share one record. Two agents with different jobs get two records, even if they run in the same pod.
Can you change the identity type later?
No. The identity type is fixed once the agent is registered, because it determines which credentials exist for the agent. To move from an API key to workload identity, register a new agent with the new type and give it the same capabilities. Then move the workload over, check that the new agent works, and revoke the old agent. Revocation is final and ends every credential that the old agent held.
How LumoAuth does it
In the Organization Portal, go to Agents (/portal/agents) and choose Register agent. Step 2, How it proves its identity, lists the identity cards from strongest to weakest, with workload identity selected by default. Choosing workload identity shows the provider cards and the binding fields, including the exact audience that the platform must mint the token for. Choosing API key shows Key expires after.
After you click Register agent, the next page shows an API key or a client secret once. For the other types, no secret is generated and the agent’s page opens. Its Next steps section has copy-paste snippets for the chosen type, such as the attestation call for the exact audience that the binding requires, or a Python example that signs a client assertion.
The agent’s page also shows its security posture: a checklist that LumoAuth computes from the agent’s settings. Workload identity, AAuth and a private key JWT are rated OK. A client secret is informational, and an API key or a custom identity is a warning. Each line explains why it matters and links to the page that fixes it. The agent list has a Needs attention filter, which shows every agent with an open finding.
Whichever type you pick, every credential resolves to the agent’s single agt_… record. Capabilities, budgets, just-in-time permissions, audit entries and the kill switch all act on that record. That idea is the subject of the first post in this series, What is an AI agent identity?
The docs for the agent registry cover every field and the Admin API. The docs for workload attestation list the binding fields for each provider. The AAuth docs explain signing and the token flows step by step. The private key JWT docs show the assertion format, code in three languages and key rotation.
Standards involved
- OAuth 2.1 and the client credentials grant, for client secrets
- OAuth 2.0 token exchange, RFC 8693, for exchanging a platform token for an agent token
- OpenID Connect ID tokens and SPIFFE JWT-SVIDs, as the platform tokens behind workload identity
- HTTP message signatures, RFC 9421, which AAuth uses to sign each request
- JWT profile for OAuth client authentication, RFC 7523, for the client assertions of private key JWT agents
- OAuth 2.0 Demonstrating Proof of Possession (DPoP), RFC 9449, for binding tokens to the agent’s key
The full list is on the standards reference.
FAQ
What is the most secure way for an AI agent to authenticate? Workload identity, when the platform supports it. The platform signs a short-lived token for the agent, so no secret exists to leak or rotate. If the platform cannot issue tokens, the next best option is a private key that the agent holds and signs with, as in AAuth.
Are API keys safe for AI agents? They are acceptable for a prototype on a host that you trust. An API key is one string, and whoever copies it can act as the agent. If you use one, give it an expiry. LumoAuth sets 180 days by default and warns when a key never expires.
Can I change an agent’s identity type after registration? No. The identity type is fixed once the agent is registered. Register a new agent with the stronger type, give it the same capabilities, move the workload over and then revoke the old agent.
My agent runs on AWS Lambda. Can it use workload identity? Not with LumoAuth today. On AWS, workload identity covers EKS through IAM roles for service accounts. Plain EC2, Lambda and ECS are not attestation sources. Use a private key JWT or AAuth, with the key kept in a secrets manager, or a client secret with DPoP.
Does the identity type limit what an agent can do? No. The identity type controls how the agent proves who it is. Its capabilities, budget and approval rules control what it may do. All of them sit on the same agent record, whichever identity type you choose.
Related: AI agent identity and machine-to-machine workload identity on the solutions pages, and what is an AI agent identity on this blog.
Register your first agent at app.lumoauth.dev/register.