← Blog

DPoP Tokens for AI Agents: Bind OAuth Access to a Signing Credential

Parminder Singh
Parminder Singh··6 min read
Summarize with AI

Demonstrating Proof of Possession binds an OAuth access token to a client-held cryptographic credential and adds a signed proof to each protected HTTP request. For AI agents, the useful release artifact is a negative-test pack covering cryptographic binding, method and URI binding, token hashing, proof freshness, nonce handling, and replay rejection.

Platform & Architectureai-securityagentic-aiidentity-and-authorizationzero-trustcybersecurity
DPoP Tokens for AI Agents: Bind OAuth Access to a Signing Credential

Demonstrating Proof of Possession changes an OAuth access token from a value that works for whoever holds it into a value bound to a client credential. The agent sends a signed DPoP proof with each protected HTTP request. The resource server verifies the proof signature, the request details, the signing algorithm, and the token's binding to the public key.

For an AI agent calling a model gateway, that gives the deployment a concrete theft-resistance test. Copying the token into another client should fail because the thief lacks the private key. The release decision still depends on several frequently omitted checks: method, target URI, proof age and unique identifier, plus access-token hash and server nonce when required.

TL;DR

  • DPoP sender-constrains an OAuth token to a client-held cryptographic credential through a signed proof on the protected HTTP request.
  • Verify htm, htu, iat, jti, ath, cryptographic binding, algorithm, and nonce behavior where the server requires it.
  • A copied token should fail without the private signing material, while replaying a captured proof should trigger rejection.
  • Authorization-server operation, private signing-material custody, tool authorization, and DeepInspect request policy remain separate boundaries.

DPoP binds a token to a public credential

RFC 9449, published in September 2023, defines DPoP as an application-layer proof-of-possession mechanism for OAuth. The client holds a public and private signing pair. It signs a short-lived JWT for the request and sends the public component in the proof header. The authorization server can issue an access token whose confirmation claim identifies that public component by thumbprint.

At the protected resource, verification joins the access token and proof JWT against the current HTTP request. A valid token by itself is insufficient. The proof must be signed by the corresponding private signing material and describe the request being processed.

This property is useful for long-running agents because bearer tokens tend to spread through traces, crash dumps, environment snapshots, and debugging consoles. DPoP limits what a copied token can do. The API key rotation guide covers credential lifecycle controls around that route. DPoP addresses a narrower event: presentation of an OAuth token at a protected resource.

Every proof binds to specific request details

The DPoP proof contains claims the resource server can compare with the live request. RFC 9449 requires a unique jti, the HTTP method in htm, the target URI in htu, and a creation time in iat. When an access token accompanies the request, the proof also carries ath, a base64url-encoded SHA-256 hash of that token. A server-provided nonce becomes another required claim when the nonce mechanism is active.

Each field closes a different replay path:

  • htm stops a proof created for one HTTP method from silently authorizing another.
  • htu ties the proof to the target URI without its query and fragment components.
  • iat gives the verifier a freshness window.
  • jti gives replay detection a unique proof identifier.
  • ath connects the proof to the access token presented on the same request.
  • nonce lets the authorization server or resource server demand a recent server-chosen value.

The verifier also checks the proof type and signing algorithm, rejects symmetric algorithms, validates the signature, and confirms the access token is bound to the proof credential. URI handling deserves exact tests because proxy rewriting and URI normalization can make the client sign one target while the protected resource evaluates another.

An agent deployment needs more than a successful request

A green response from the model gateway proves one combination worked. The DPoP acceptance pack should prove that altered and replayed combinations fail. I would block release if the team cannot show those negative results from the production route.

Start with a valid access token and its matching private signing material. Send one request and preserve the token confirmation thumbprint, proof credential thumbprint, method, normalized target URI, iat, jti, ath, nonce state, response code, and verifier reason. Keep secrets out of the report.

Now copy the access token to a second client with a different signing pair. The protected resource should reject it. Replay the original proof on the same request and expect replay detection to fire. Change POST to GET while keeping the proof, then change the target path. Alter the access token while retaining the old ath. Move the clock beyond the verifier's accepted proof age. If the server issues a nonce challenge, retry with the returned nonce and then test an old nonce.

The clearest test evidence I know is two adjacent log rows carrying the same jti: the first has a 200 response, and the second has a replay rejection with the verifier's rule name. That tiny visual catches more review mistakes than a page of architecture arrows.

Replay detection has to survive the production topology

A verifier running on one process can remember recently seen jti values. A production gateway often has several replicas behind a load balancer. If each replica keeps an isolated replay cache, the same proof can reach a different node and look new.

Design the replay store and acceptance window around the actual topology. The record needs enough lifetime to cover the accepted iat window plus reasonable clock skew. It needs an atomic first-use decision so two concurrent requests carrying the same proof cannot both win. Capacity planning should include rejected traffic because an attacker can generate large numbers of distinct jti values.

Nonce handling adds another state transition. RFC 9449 allows an authorization server or resource server to return a DPoP nonce and require it in a subsequent proof. The client must associate that nonce with the correct server and retry safely. Test challenge loops, stale nonces, concurrent requests, and a verifier restart. If a reverse proxy terminates TLS or rewrites host and path values, document which component constructs the effective URI used for htu validation.

The identity-aware AI gateway architecture begins after the caller context reaches the route. DPoP can strengthen the technical binding between a client and its token, while application context still identifies the human, agent, role, and workflow behind the call.

Sender constraint leaves several owners in place

OAuth 2.0 Security Best Current Practice, RFC 9700, published in January 2025, says authorization and resource servers should use sender-constrained access tokens such as mutual TLS or DPoP to prevent misuse of stolen and leaked tokens. That recommendation narrows token replay. It leaves authorization policy and cryptographic operations with their existing owners.

The authorization server authenticates the client and issues a token with the correct confirmation after processing the grant. The agent runtime or its credential service generates and safeguards the private signing material. The protected resource validates the token and proof. The application decides which agent may perform which business action. A tool service separately authorizes tool execution.

DPoP binds possession to a signing credential rather than proving which employee initiated the workflow. Malware running inside the same agent process may gain access to both token and signing capability. A valid proof also says little about prompt content, model destination, data classification, or tool arguments. Those decisions need their own controls.

Keep the resulting records distinct. The token issuer log should identify grant and cryptographic binding. The protected-resource log should state proof validation and rejection reasons. Agent telemetry should identify the workflow and credential handle without exporting private material. Later model and tool decisions should carry explicit correlation values.

DeepInspect

Authorization-server operation, DPoP private signing-material custody, proof validation, and downstream tool authorization sit outside DeepInspect's documented boundary. DeepInspect should not be described as a DPoP validator. A DPoP-capable authorization server and protected resource must perform those checks and expose their own evidence.

DeepInspect covers a later authenticated HTTP model request only when the application deliberately routes that request through it and supplies the identity and role context used for policy. It can evaluate prompt classification, model destination, data handling, and versioned request policy, then write an independent decision record. That record can correlate with the DPoP verifier event, but it cannot substitute for cryptographic binding or replay detection. The zero-trust LLM guide explains the per-request policy layer that starts after authentication context is available.

Book a technical deep dive at deepinspect.ai.

Frequently asked questions

Is DPoP an alternative to bearer tokens?

DPoP sender-constrains an OAuth access token so presentation also requires a proof signed by the bound private signing material. The token may use the DPoP authorization scheme defined by RFC 9449, and the resource server verifies both objects. A copied token becomes less useful because possession of the token alone lacks the signing capability.

Which DPoP claims should an AI gateway verify?

A DPoP-capable protected resource verifies the proof signature and public credential, permitted asymmetric algorithm, proof type, htm, htu, iat, and jti. For protected-resource access it also verifies ath, then checks that the access token's confirmation thumbprint matches the proof credential. It verifies a nonce when its deployment requires one.

Does DPoP stop every stolen-token attack?

DPoP reduces misuse when an attacker obtains the token without the private signing material. Theft of both token and signing capability defeats that separation. Compromise inside the agent process can also produce fresh signed proofs. Signing isolation, workload security, token scope, audience restriction, short lifetimes, and incident response remain part of the design.

What is the minimum DPoP negative-test pack?

Include a copied token used with a different signing pair, replay of the same proof, method mismatch, URI mismatch, stale iat, duplicate jti, incorrect ath, wrong confirmation thumbprint, and nonce failure where supported. Run the cases through the deployed load balancer and proxy path so normalization and distributed replay state match production.