Can the jwk header of a DPoP proof contain a private key?

jwk JOSE header parameter does not contain a private keyRFC 9449 §4.3MUSTRoles: authorization_server, resource_server

Requirement as recorded in the ProtocolSoup registry

The jwk JOSE Header Parameter does not contain a private key.

Read §4.3 in RFC 9449

Self-test verdict

PassCommit 00bac3fEvaluated

This is ProtocolSoup's result against its own implementation at the commit shown. It is not a certification of ProtocolSoup or of any other product.

Captured from production

Captured Commit 00bac3f

Captured from the deployed ProtocolSoup at the commit shown. Every request and response is shown exactly as sent and received.

Passing exchange

Accepted, as requiredConformance client

The conformance client requests a client_credentials token from /oauth2/token with a DPoP proof whose jwk header carries only the public members kty, crv, x and y. The proof carries the nonce the token endpoint issued in an earlier use_dpop_nonce challenge.

Requests from ProtocolSoup’s conformance client, which sends malformed messages on purpose. The hosted wallet never sends these.

  1. 1.POST https://protocolsoup.com/oauth2/token200 OK

    TLS: TLS 1.3 · TLS_AES_128_GCM_SHA256 · h2

    Request

    POST /oauth2/token HTTP/2.0
    Authorization: Basic bWFjaGluZS1jbGllbnQ6TTdCa0JKX2lLOEdwNFJlRjFTdkdDcWx1eE1uMnlTcnU=
    Content-Length: 29
    Content-Type: application/x-www-form-urlencoded
    DPoP: eyJhbGciOiJFUzI1NiIsImp3ayI6eyJjcnYiOiJQLTI1NiIsImt0eSI6IkVDIiwieCI6IjFSVER4WXpiei13dHZOVVE4UGRpeHI0RE9CX2VUUHEycnlZUGNoRW42eXciLCJ5IjoiVm1BNnBLa216YjZxUEV0MTBpN2psb2U1aEpjNlo3dGozd3I0aTI2TEpscyJ9LCJ0eXAiOiJkcG9wK2p3dCJ9.eyJodG0iOiJQT1NUIiwiaHR1IjoiaHR0cHM6Ly9wcm90b2NvbHNvdXAuY29tL29hdXRoMi90b2tlbiIsImlhdCI6MTc5NjU2MzYwMCwianRpIjoiZDhjODk1OGMtZjIzNS00MzI0LTljNzEtOTQ1OThiMWQwNzUwIiwibm9uY2UiOiItOTRWVmh5eWpTa2F3WC1hOFJrd04xdWlWZjdfWUNyVCJ9.hOapx5RsMAAbOyfpUlfbO4vBZfnDBrlF-qI0QXOxR3JWvRrxMWclkIl-HOg4IFiML4SYsUZmJdyf22fJUKnZSA
    Host: protocolsoup.com
    User-Agent: ProtocolSoup-Conformance-Client/1
    
    grant_type=client_credentials

    Response

    HTTP/2.0 200 OK
    Cache-Control: no-store
    Cf-Cache-Status: DYNAMIC
    Cf-Ray: a65b9fabdda23cdb-MSP
    Content-Type: application/json
    Date: Sun, 06 Dec 2026 13:26:41 GMT
    Fly-Request-Id: 01M95RJ1W7ZT238Z4GPCKTSK3G-ord
    Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
    Pragma: no-cache
    Referrer-Policy: strict-origin-when-cross-origin
    Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=FJF9jeI52ERUoO2CXY7KByBq87AUJjKV4FGvYCB6dn3WXSfutVFzi9PGpzR4yiaBSL38Yej70j2S1Z55twi53NPp7ivQz6KbG4q8f%2BILkaVWV3%2Fx6bmHG%2FZgYK0B9Jm%2Bz0k%3D"}]}
    Server: cloudflare
    Server-Timing: cfCacheStatus;desc="DYNAMIC"
    Server-Timing: cfEdge;dur=20,cfOrigin;dur=204
    Vary: Origin
    Vary: accept-encoding
    Via: 1.1 fly.io, 1.1 fly.io
    X-Content-Type-Options: nosniff
    X-Frame-Options: DENY
    X-Xss-Protection: 1; mode=block
    
    {"access_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6InJzYS05YTJlNThlYzVjNjk3NGJmIiwidHlwIjoiYXQrand0In0.eyJhdWQiOiJodHRwczovL3Byb3RvY29sc291cC5jb20vb2F1dGgyL3Jlc291cmNlIiwiY2xpZW50X2lkIjoibWFjaGluZS1jbGllbnQiLCJjbGllbnRfbmFtZSI6Ik1hY2hpbmUtdG8tTWFjaGluZSBDbGllbnQiLCJjbmYiOnsiamt0IjoiaGpzMEVta2s4OWo4V3RES19BVnkxMmUxdnN4WlE0ekFPOXd0azdyYkpTSSJ9LCJleHAiOjE3OTY1NjcyMDEsImlhdCI6MTc5NjU2MzYwMSwiaXNzIjoiaHR0cHM6Ly9wcm90b2NvbHNvdXAuY29tL29hdXRoMiIsImp0aSI6Imp0aS0xMjEzN2NmZmQzYmEyNTgwIiwibmJmIjoxNzk2NTYzNjAxLCJzY29wZSI6ImFwaTpyZWFkIGFwaTp3cml0ZSIsInN1YiI6Im1hY2hpbmUtY2xpZW50In0.c-caTUz_WgJNC0IGGSolSS5P4tEwBszBMfPPFZns1KMNm0ODIOe0-gRKuRL7JpSvNDTmuc2toLo0H-bh1NXyLXUij2GDENoTZ6PjhG7z2TKyBqoxvR4e1tM4R3SMZTUVdksN5rBM3bGxW3v4UDyaMgCmJcVFpxopHkvnuZuHi1DzZMFKj-GY6stX2_PdjMEtXh0__fSX9RoD000ut2F9WiAU0BEX7vvM2p0n2T2bEIzZs1TrRHTeiBz4VyA0Ihsh5diu-Fku1amjjBwY5lGOFVI5mE-JUuRZ27Gx4iMIBgDoCPBHDSSQ-jViotpmjuJXPVbm-Wt_F7Ux2Czc800i5w","token_type":"DPoP","expires_in":3600,"scope":"api:read api:write"}
    

Failing exchange

Rejected, as requiredConformance client

The conformance client sends a client_credentials token request to /oauth2/token with a DPoP proof whose jwk header also carries the private member d. The key was generated for this request alone, and the proof is correctly signed with it.

Requests from ProtocolSoup’s conformance client, which sends malformed messages on purpose. The hosted wallet never sends these.

  1. 1.POST https://protocolsoup.com/oauth2/token400 Bad Request

    TLS: TLS 1.3 · TLS_AES_128_GCM_SHA256 · h2

    Request

    POST /oauth2/token HTTP/2.0
    Authorization: Basic bWFjaGluZS1jbGllbnQ6TTdCa0JKX2lLOEdwNFJlRjFTdkdDcWx1eE1uMnlTcnU=
    Content-Length: 29
    Content-Type: application/x-www-form-urlencoded
    DPoP: eyJhbGciOiJFUzI1NiIsImp3ayI6eyJjcnYiOiJQLTI1NiIsImQiOiJUZGEtaWwyMmxWZmZSSl9NUzhYNngyMk5qdVRhZUdncExGbm93SFUweDZvIiwia3R5IjoiRUMiLCJ4IjoieVFfdnczNDZYcXo1Z1RVTjFjSDZJWm5MOWpfM0VNalpZY19mQ3dZdVllRSIsInkiOiJrcmlCaTV3dlUteTFiakNDWlRvbnhIdW55aEUwTG1nWWFka1FTWHBrS2FRIn0sInR5cCI6ImRwb3Arand0In0.eyJodG0iOiJQT1NUIiwiaHR1IjoiaHR0cHM6Ly9wcm90b2NvbHNvdXAuY29tL29hdXRoMi90b2tlbiIsImlhdCI6MTc5NjU2MzYwNCwianRpIjoiY2M0ZDZlM2QtMWMyMS00MzkwLWJhZDItNmE0MmQyZjEyNjRjIiwibm9uY2UiOiItOTRWVmh5eWpTa2F3WC1hOFJrd04xdWlWZjdfWUNyVCJ9.IJZvmDATijVEHSGrXOZdEQZUg2o_EuKckO_-xy3nefpCkNiHoDwLCglwz8H9B-Sy9-9T2b6n7mLbZhbrwD0Pqg
    Host: protocolsoup.com
    User-Agent: ProtocolSoup-Conformance-Client/1
    
    grant_type=client_credentials

    Response

    HTTP/2.0 400 Bad Request
    Cache-Control: no-store
    Cf-Cache-Status: DYNAMIC
    Cf-Ray: a65b9fc4d9f33cdb-MSP
    Content-Type: application/json
    Date: Sun, 06 Dec 2026 13:26:45 GMT
    Fly-Request-Id: 01M95RJ5RNYN21YJAH5CCX4M0D-ord
    Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
    Pragma: no-cache
    Referrer-Policy: strict-origin-when-cross-origin
    Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=K3OrYte1TqhoIIMLruWaBZ%2BsNdBr4qU24AU%2Fumt3Zfbq53GtioNC5wa%2F7ZVK7YYmOsL9e8XyVlhiqneo4kvj%2Bf5RTDvLTd87DQA0tXrBqnw7w88rVme0j9i5hr6SuAuJd4E%3D"}]}
    Server: cloudflare
    Server-Timing: cfCacheStatus;desc="DYNAMIC"
    Server-Timing: cfEdge;dur=3,cfOrigin;dur=203
    Vary: Origin
    Vary: accept-encoding
    Via: 1.1 fly.io, 1.1 fly.io
    X-Content-Type-Options: nosniff
    X-Frame-Options: DENY
    X-Xss-Protection: 1; mode=block
    
    {"error":"invalid_dpop_proof","error_description":"DPoP proof validation failed","error_uri":"https://datatracker.ietf.org/doc/html/rfc9449#section-5"}
    

Run it live

Looking Glass runs the flow that sends the message this requirement governs, against the same server, and decodes each exchange as it happens.

Open the flow in Looking Glass

Tests

Implementation

Explainer

What this requires

This is check 7 of RFC 9449 Section 4.3. The jwk header must be a public key only. Section 4.2 says of jwk: "It MUST NOT contain a private key." If any private key member is present, the server rejects the proof rather than ignoring the extra members and carrying on with the public part.

Why it exists

A client that puts its private key in the header has given that key to every party that sees the proof: proxies, logs, and the server itself. From then on anyone holding a copy of the proof can mint new proofs for the same key, so possession proves nothing. Accepting such a proof also means the server receives and may store or log private key material it should never have.

What non-compliance looks like

A server that strips d from the header and verifies with what remains accepts a proof that would validate under the public members alone, because the public half still matches the signature. The client keeps working and the leak goes unnoticed.

At a token endpoint the correct response is HTTP 400 with invalid_dpop_proof (RFC 9449 Section 5).

How ProtocolSoup tests it

dpop.ValidateProof parses the jwk header and rejects it if any of d, p, q, dp, dq, qi, oth or k is present, before any signature check. There is no strip-and-continue path.

TestValidateProofRejectsPrivateKeyInJWKHeader signs an otherwise valid ES256 proof whose jwk header has a d member added, and asserts that validation returns an error. Only the d member is exercised by this test.

Messages that carry it

Related requirements

All RFC 9449 requirements · OID4VCI protocol page

Can the jwk header of a DPoP proof contain a private key? · RFC 9449 §4.3 | ProtocolSoup