Why a stolen AAuth token is useless: cnf, thumbprints and PoP

A stolen bearer token works for anyone who copies it. An AAuth token does not, because its cnf claim binds it to a public key and every request must prove possession of the private key. Here is how cnf, RFC 7638 thumbprints and pop_required: true work together.

A stolen AAuth token does not work on its own because every token is bound to a public key, and every request must prove possession of the matching private key. In a bearer-token system, copying one string from a log or a proxy grants full access until the token expires. In AAuth, agent tokens and auth tokens carry the agent’s public key in a cnf claim (RFC 7800), and resource tokens carry its RFC 7638 key thumbprint in agent_jkt. Without the private key to sign a fresh HTTP request, a copied token is inert.

TL;DR

  • Every auth+jwt carries the agent’s full public key in cnf.jwk, and LumoAuth rejects an auth token that lacks cnf.jwk.
  • An agent+jwt carries cnf.jwk, or cnf.jkt when that thumbprint equals the thumbprint of the key that signed the agent token itself. A resource+jwt carries agent and agent_jkt instead of cnf.
  • RFC 7638 turns any public JWK into one 43-character thumbprint (jkt, SHA-256) by hashing only the required key members in sorted order, stripping kid, use, alg and whitespace.
  • At every AAuth endpoint, the signer’s key thumbprint must match the token’s cnf thumbprint; a mismatch fails with 401 (Signature key does not match agent token binding) and writes aauth.signature_verification_failed to the audit log.
  • POST /aauth/auth/token/verify always returns cnf_jkt and pop_required: true, because active: true proves the JWT is valid, not that the caller holds the private key.

Why bearer tokens fail for AI agents

A bearer token treats the token string itself as proof of identity. Whoever presents Authorization: Bearer <token> gets the access inside that token.

That assumption breaks quickly around AI agents. An agent’s token moves through orchestration frameworks, tool wrappers, API gateways, MCP servers and debug logs. Any single leak hands an attacker the agent’s permissions, and often a user’s delegated permissions too.

Proof of possession (PoP) breaks the link between copying a token and using it. Two things must both be true on every call:

  1. The token names a public key (or its thumbprint), signed by an issuer that the verifier accepts.
  2. The HTTP request carries a fresh signature made with the matching private key, which never leaves the agent.

For the full protocol overview, read What is AAuth?. For the exact wire rules of the request signature, read RFC 9421 HTTP message signatures for agents, line by line.

How cnf.jwk, cnf.jkt and agent_jkt bind keys to tokens

RFC 7800 defines the cnf (confirmation) claim for binding a key to a JSON Web Token (JWT, RFC 7519). AAuth uses three token types, and each one enforces a specific binding shape.

Token type Key-binding claim Accepted on validation in LumoAuth Why this form is used
Agent token (agent+jwt) cnf.jwk or cnf.jkt Full public key in cnf.jwk, or cnf.jkt only when it equals the thumbprint of the token’s own signing key Lets an agent server bind a per-session delegate’s key (cnf.jwk) or self-bind its own registered key (cnf.jkt)
Resource token (resource+jwt) agent + agent_jkt agent_jkt must equal the presenting agent token’s cnf thumbprint; no cnf claim Lets the resource pin the access request to one agent and one exact public key
Auth token (auth+jwt) cnf.jwk Full public key in cnf.jwk only; a missing cnf.jwk is rejected Lets a protected API verify the agent’s HTTP message signature directly without another key lookup

Look closely at the rule for cnf.jkt on an agent token. An agent server often mints a token for a delegate with a fresh session key. Because that session key is not in the agent server’s registered JWKS, the token must embed the full public key in cnf.jwk. When an agent signs its own token and sets cnf.jkt, LumoAuth computes the thumbprint of the JWK that verified the JWT signature and checks that cnf.jkt equals it. If they differ, validation fails with cnf.jkt does not match signing key thumbprint.

Here is how cnf.jwk appears inside an auth+jwt:

{
  "iss": "https://app.lumoauth.dev/orgs/acme-corp/api/v1",
  "aud": "https://api.mailservice.com",
  "agent": "https://email-agent.aiservices.com",
  "scope": "email:read email:send",
  "exp": 1795996800,
  "iat": 1795993200,
  "jti": "9d4e2a10c7b5f381e06249a3b7c8d1f2",
  "cnf": {
    "jwk": {
      "kty": "OKP",
      "crv": "Ed25519",
      "x": "A6EHv_POEL4dcN0Y50vAmWfk1jCbpQ1fHdyGZBJVMbg"
    }
  }
}

Private key parameters (d, p, q, dp, dq, qi, oth, k) never belong in a public key, and LumoAuth rejects any JWK that includes them when registering keys or minting delegate tokens.

How RFC 7638 computes a JWK thumbprint

Comparing two public keys by comparing raw JSON strings is fragile. One library writes {"kty":"OKP","crv":"Ed25519","x":"…","kid":"key-1"} with spaces or extra metadata; another writes {"crv":"Ed25519","kty":"OKP","x":"…"}. Both describe the exact same public key.

RFC 7638 solves this in three steps:

  1. Keep only the required public members for the key type, in lexicographical (alphabetical) key order, with no whitespace and no escaped slashes.
  2. Hash the UTF-8 bytes of that JSON with SHA-256, producing 32 bytes.
  3. Encode those 32 bytes as unpadded base64url, producing a 43-character string.

The required members for the three key types that AAuth supports are:

Key type (kty) Curve (crv) Required members in exact RFC 7638 order
OKP Ed25519 crv, kty, x
EC P-256 crv, kty, x, y
RSA (none) e, kty, n

Metadata such as kid, use, alg and key_ops is ignored on purpose. For the Ed25519 public key used in the Series 2 test vector (A6EHv_POEL4dcN0Y50vAmWfk1jCbpQ1fHdyGZBJVMbg), the sorted JSON string is:

{"crv":"Ed25519","kty":"OKP","x":"A6EHv_POEL4dcN0Y50vAmWfk1jCbpQ1fHdyGZBJVMbg"}

Its SHA-256 digest in base64url is always 1IG2tMH7J2wbJZnOf8LJzQitKf7LMvoAElsuDMVM54Y. Every part of AAuth uses this exact RFC 7638 thumbprint. That covers agent_jkt in a resource token, cnf_jkt from token verification, cnf.jkt on a DPoP token from the platform bridge, and the key ID that scopes nonces for replay checks.

Six attacks with a stolen token (and why each fails)

Suppose an attacker copies a live AAuth token from a proxy log or a crash dump. Here is what happens on every path that they can try:

Attack What the verifier checks Result
1. Send the stolen token with no signature Every AAuth endpoint and AAuth resource requires Signature-Input and Signature headers Rejected (401) before any grant or data is returned
2. Replay the token with the old signature headers from the same log created must be within 60 seconds, each nonce is single-use for 120 seconds, and any change to path, method or body breaks Content-Digest and the signature base Rejected (401, Signature nonce already used or invalid signature)
3. Sign a fresh request with the attacker’s own key pair The verifier resolves the key from the token’s cnf claim and checks that the signer’s thumbprint equals the token’s cnf thumbprint Rejected (401, Signature key does not match agent token binding)
4. Edit cnf.jwk in the JWT to insert the attacker’s public key The verifier checks the JWT’s JWS signature against the agent server’s or organization’s public key first Rejected (401, Invalid agent token or active: false)
5. Trade a stolen agent+jwt at the platform bridge for a bearer token POST /aauth/agent/platform-token requires an RFC 9421 signature from the cnf key, and returns a 300-second token bound with DPoP (cnf.jkt) to that same key Rejected at the bridge (401); even a validly issued bridge token cannot be used without a DPoP proof
6. Pair a stolen resource+jwt or code with a different agent key resource+jwt pins agent and agent_jkt; authorization codes pin the cnf thumbprint recorded when consent started Rejected (400, invalid_resource_token or invalid_grant)

Notice attack 6: key binding is not limited to access tokens. When an agent starts a consent flow (request_type=auth), LumoAuth records the thumbprint of the agent token’s cnf key on the pending request. When the authorization code (valid for 60 seconds) is redeemed (request_type=code), the redeeming agent token’s cnf thumbprint must match that recorded thumbprint. Even a stolen authorization code fails if presented under another key.

Check the thumbprint and PoP check in Node.js

You can test both RFC 7638 thumbprint computation and key-binding failure in Node.js with no external packages. This script computes the thumbprint of the Ed25519 key from our Series 2 vector, verifies a request signed by that key, and then checks what happens when an attacker signs with a different key:

import crypto from 'node:crypto';

function jwkThumbprint(jwk) {
  let ordered;
  if (jwk.kty === 'OKP') {
    ordered = { crv: jwk.crv, kty: jwk.kty, x: jwk.x };
  } else if (jwk.kty === 'EC') {
    ordered = { crv: jwk.crv, kty: jwk.kty, x: jwk.x, y: jwk.y };
  } else if (jwk.kty === 'RSA') {
    ordered = { e: jwk.e, kty: jwk.kty, n: jwk.n };
  } else {
    throw new Error(`Unsupported kty: ${jwk.kty}`);
  }
  return crypto.createHash('sha256').update(JSON.stringify(ordered), 'utf8').digest('base64url');
}

// Public key embedded in the token's cnf.jwk (extra metadata ignored by RFC 7638)
const tokenCnfJwk = {
  kty: 'OKP',
  crv: 'Ed25519',
  x: 'A6EHv_POEL4dcN0Y50vAmWfk1jCbpQ1fHdyGZBJVMbg',
  kid: 'agent-key-1',
  use: 'sig',
};

const tokenJkt = jwkThumbprint(tokenCnfJwk);
console.log('token cnf thumbprint:', tokenJkt);

// An attacker generates a fresh Ed25519 key pair and signs a request with it
const attacker = crypto.generateKeyPairSync('ed25519');
const attackerJwk = attacker.publicKey.export({ format: 'jwk' });
const attackerJkt = jwkThumbprint(attackerJwk);

const message = Buffer.from('"@method": GET\n"@authority": api.example.com\n"@path": /v1/emails');
const attackerSig = crypto.sign(null, message, attacker.privateKey);
const boundPublicKey = crypto.createPublicKey({ key: tokenCnfJwk, format: 'jwk' });

console.log('thumbprints match:', tokenJkt === attackerJkt);
console.log('signature verifies under token cnf.jwk:', crypto.verify(null, message, boundPublicKey, attackerSig));

The script prints token cnf thumbprint: 1IG2tMH7J2wbJZnOf8LJzQitKf7LMvoAElsuDMVM54Y, followed by thumbprints match: false and signature verifies under token cnf.jwk: false.

The resource-side trap: why verify returns pop_required: true

There is one place where a team can accidentally undo all of this protection: the protected API itself.

When an agent calls your API with Authorization: Bearer <auth+jwt> plus Signature-Input and Signature, your API has two ways to validate the auth+jwt:

  • Local validation: Fetch LumoAuth’s organization JWKS (/orgs/{orgId}/api/v1/aauth/jwks.json), verify the JWT signature, exp and aud, extract cnf.jwk, and verify the incoming HTTP message signature with that key.
  • Introspection: Send a signed request from your resource to POST /orgs/{orgId}/api/v1/aauth/auth/token/verify with resource and auth_token in the JSON body.

When you choose introspection, think about what LumoAuth can inspect. LumoAuth receives the auth_token string in the body of your resource’s call. It does not receive the agent’s original HTTP request to your API.

LumoAuth validates the JWT signature, iss, aud (returning 403 forbidden if your resource asks about a token addressed to another resource), exp, revocation status (jti) and cnf.jwk. On success, it returns:

{
  "active": true,
  "agent": "https://email-agent.aiservices.com",
  "agent_delegate": "https://email-agent.aiservices.com/session/alice-123",
  "resource": "https://api.mailservice.com",
  "sub": "usr_019a...",
  "scope": "email:read email:send",
  "cnf_jkt": "1IG2tMH7J2wbJZnOf8LJzQitKf7LMvoAElsuDMVM54Y",
  "act": null,
  "pop_required": true
}

Look at the last two fields: cnf_jkt and "pop_required": true.

If a resource checks only if (result.active) and serves the request without verifying the agent’s HTTP message signature, it has turned a proof-of-possession token back into a bearer token. Anyone who copies auth_token can then call that API without the private key.

pop_required is always true on every active response from /aauth/auth/token/verify so integrators cannot overlook the second half of the check. Your resource must verify the incoming RFC 9421 signature (covering authorization, content-digest, created and a single-use nonce). Check that signature with the key in the token’s cnf.jwk, whose RFC 7638 thumbprint equals cnf_jkt.

How LumoAuth does it

LumoAuth enforces proof-of-possession binding across every AAuth endpoint and across the bridge to core APIs:

  • Agent token endpoint (POST /orgs/{orgId}/api/v1/aauth/agent/token) and revocation (POST …/aauth/token/revoke): Every request requires a valid agent+jwt in Agent-Auth and an RFC 9421 signature verified against the token’s cnf key. LumoAuth checks that the signer’s thumbprint equals the token’s cnf thumbprint; a mismatch returns 401 with the generic challenge Signature key does not match agent token binding and writes aauth.signature_verification_failed to the audit log.
  • Resource token validation: On request_type=auth, refresh and exchange, LumoAuth checks that resource+jwt carries both agent matching the calling agent and agent_jkt matching the presenting agent token’s cnf thumbprint.
  • Authorization-code redemption: On request_type=code, LumoAuth checks that the redeeming agent token’s cnf thumbprint equals the thumbprint stored when the request token was issued.
  • Token verification (POST /orgs/{orgId}/api/v1/aauth/auth/token/verify): Authenticated by the resource’s own HTTP message signature, enforces audience equality (403 forbidden for another resource’s token), checks jti revocation and cnf.jwk, and returns cnf_jkt alongside pop_required: true.
  • Platform token bridge (POST /orgs/{orgId}/api/v1/aauth/agent/platform-token): Requires an RFC 9421 signature from the agent+jwt cnf key and issues a core access token capped at 300 seconds with token_type: "DPoP" and cnf.jkt set to the same key’s thumbprint. Core APIs then reject the token unless the call also carries a DPoP proof (RFC 9449) signed by that key.

Read the AAuth overview for the complete flow and code to verify calls at a resource, or the AAuth 1.0 specification for the exact claim rules of each token type.

Standards involved

  • Proof-of-possession key semantics for JSON Web Tokens, RFC 7800, defining the cnf claim (jwk and jkt)
  • JSON Web Key (JWK) thumbprint, RFC 7638, defining the SHA-256 thumbprint (jkt) of sorted key members
  • HTTP message signatures, RFC 9421, providing the per-request proof of possession
  • JSON Web Token (JWT), RFC 7519, and JSON Web Key (JWK), RFC 7517, defining the token and public-key formats
  • Demonstrating Proof of Possession (DPoP), RFC 9449, preserving key binding across the platform bridge
  • OAuth 2.0 token exchange, RFC 8693, the request shape used by the platform bridge

The full list is on the standards reference.

FAQ

What is a proof-of-possession token for an AI agent? A proof-of-possession (PoP) token is a token bound to a specific cryptographic key. Presenting the token string alone is never enough. On every API call, the agent must also sign the request with the private key that matches the public key bound to the token.

What is the difference between cnf.jwk and cnf.jkt in AAuth? cnf.jwk embeds the full public JSON Web Key inside the token, while cnf.jkt carries only its 43-character thumbprint (SHA-256, RFC 7638). In LumoAuth, an auth token (auth+jwt) always requires cnf.jwk so a resource can verify request signatures directly. An agent token (agent+jwt) accepts cnf.jwk, or cnf.jkt when that thumbprint matches the key that signed the agent token itself.

Why does AAuth compare RFC 7638 thumbprints instead of raw JWK JSON? Two libraries can serialize the same public key with different field orders, extra whitespace or metadata fields such as kid and use. RFC 7638 keeps only the required key members in sorted order with no whitespace and hashes them with SHA-256, so any two representations of the same public key yield the same 43-character thumbprint.

Why does POST /aauth/auth/token/verify return pop_required: true? When a protected API calls LumoAuth to introspect an auth token, LumoAuth receives only the JWT string, never the agent’s incoming HTTP request to that API. Returning active: true confirms only that the JWT is valid, unrevoked and addressed to that resource. pop_required: true and cnf_jkt remind the resource that it must still verify the request’s HTTP message signature against that key.

Can an attacker trade a stolen AAuth agent token for a bearer token at the platform bridge? No. POST /aauth/agent/platform-token requires an RFC 9421 HTTP message signature made by the key in the agent token’s cnf claim. Even after verification, the core access token that LumoAuth returns is capped at 300 seconds and bound with DPoP (cnf.jkt) to that same key, so proof of possession is never dropped.

What happens if an attacker steals an AAuth authorization code? Redemption fails with invalid_grant. When an agent starts user consent, LumoAuth records the thumbprint of the requesting agent token’s cnf key. When the 60-second code is redeemed, the presenting agent token’s cnf thumbprint must match that recorded thumbprint, along with the agent, delegate, redirect URI and organization.


Related: AI agent identity on the solutions pages, What is AAuth? and RFC 9421 HTTP message signatures for agents, line by line on this blog.

Sign your first agent request with the AAuth quickstart.

Last updated .

Ship passwordless sign-in this week. Put guardrails on your agents today.

The Developer plan is free for 10,000 monthly users and ten agents, with no card. Everything uses open standards, so moving in or out is a config change.