v0.8.0
Breaking:
ReqDPoP.Key.load!/1, and soReqDPoP.attach/2andReqDPoP.proof/1, refuse a JWK whose ownuseorkey_opsmember does not allow signing (RFC 7517 sections 4.2 and 4.3):usemust be"sig"andkey_opsmust be a list of strings containing"sign". They raiseReqDPoP.Errorwith reason:invalid_key. A key with neither member loads as before. Until now a key marked"use": "enc"or"key_ops": ["verify"]signed proofs.ReqDPoP.Key.public_jwk/1leaveskey_opsout of the map it returns. The member described the private key, so a signing key's public half came back marked"key_ops": ["sign"], which a verifier that checks the member refuses.
v0.7.1
Fixes:
- Return
{request, %ReqDPoP.Error{}}when rescuing anyReqDPoP.Errorraised during the Req request step (includinghtuconstruction on redirects such as a non-UTF-8Location,:authoption conflicts, invalid options, and callback type errors), soReq.get/2returns{:error, %ReqDPoP.Error{}}instead of raising whileReq.get!/2continues to raise;ReqDPoP.Errorraised in the response step (for example on an invalid nonce retry) still raises.
v0.7.0
Added:
ReqDPoP.attach/2accepts:originand:htuto sign a target URI other than the URL the request is sent to. RFC 9449 section 4.2 defineshtuas the request's target URI, which differs from the connection URL when a client reaches a server at an internal address and sends the public authority inHost. Until now the only way to sign the public URI wasReqDPoP.proof!/1, which gives up the plugin's nonce retry.:originreplaces scheme, host and port and keeps the request path.:htuis a one-argument function of the request that returns thehtu; a fixed string raisesReqDPoP.Errorwith reason{:invalid_option, :htu}, because it would be signed into every request. Setting both raises with reason{:conflicting_option, :origin}. The override applies to the origin of the first hop, nonce retries included. A redirect hop to another origin signs its own URL.
v0.6.2
Fixes:
- A redirect whose
Locationheader is not valid UTF-8 made the plugin raise a bareErlangErrorfrom JOSE's JSON encoder while signing the next hop's proof, andReqDPoP.proof/1raised the same error for such anhtuinstead of returning an error tuple.htumust now be valid UTF-8: the plugin raisesReqDPoP.Errorwith reason{:invalid_option, :htu}, as it does for any otherhtuit cannot sign, andproof/1returns{:error, %ReqDPoP.Error{reason: {:invalid_option, :htu}}}.
v0.6.1
Security:
- Raise the JOSE dependency floor to 1.11.13, which fixes CVE-2026-65625 through CVE-2026-65632. ReqDPoP only signs proofs with the key its caller configures, so none of those advisories reaches its own code; the floor keeps an application that uses it from resolving an affected JOSE release.
v0.6.0
Security:
- With Req 0.7 and later, an untrusted cross-origin redirect re-attached
Authorization: DPoP <token>and a fresh proof bound to the redirect target after Req had removed the header. Req 0.7 re-runs every request step on a redirect, and the plugin read the token back from its own option. The plugin now signs per hop and, when Req withholds the token, sends noDPoPheader either. With Req 0.6 the redirect target received the previous hop's proof (stalehtu, reusedjti) and no token; it now receives neither. Proof-only requests follow the same rule: no proof crosses to an untrusted origin. ReqDPoP.Key.load!/1now requires a complete private signing key: a P-256 EC key with 32-bytex,y, andd, or an RSA key of at least 2048 bits (RFC 7518 section 3.3) withn,e, andd. Before, a partial or public-only JWK loaded and then crashed inside JOSE at signing time with the decoded private scalar in the stack trace arguments. Hand-built%ReqDPoP.Key{}structs are re-validated.inspect/1of a key shows only the algorithm.- Server nonces are checked against RFC 9449 section 8 syntax (
NQCHAR, at most 1024 bytes, exactly oneDPoP-Nonceheader). Before, a non-UTF-8 nonce crashed the request with an Erlang JSON error. WWW-Authenticateparsing readserror="use_dpop_nonce"only from theDPoPchallenge's own parameters, not from other schemes or quoted text.- Nonce challenge bodies are decoded with the caller's own Req options. The
body is decompressed only when the caller set
compressed: true, which Req documents as opt-in because of decompression bombs, and bodies over 64 KiB are not inspected. The section 8 JSON form is recognized only on proof-only (token endpoint) requests. - Server nonces and the nonce retry budget are tracked per origin, and a hop that received no proof does not answer a nonce challenge.
:max_nonce_retries,:retry_on_nonce,:access_token,:nonce,:clock, and:jtiare validated atattach/2. Before,max_nonce_retries: nilretried without bound.- Setting Req's
:authoption together with:access_tokenraisesReqDPoP.Errorinstead of silently letting one overwrite the other on retried hops. - The proof
jwkheader carries only the RFC 7638 thumbprint members. Other members of a loaded JWK map, such askidor application fields, no longer travel in every proof.ReqDPoP.Key.proof_jwk/1returns that map. - A plain-string
:access_tokenno longer appears ininspect/1output for the request, matching Req's redaction of theAuthorizationheader. ReqDPoP.Errorfor an invalid:keyno longer embeds the rejected value; the reason is:invalid_key.mix.exsdeclares{:mint, ">= 1.10.2"}so consumers resolve past the mint releases with open advisories (EEF-CVE-2026-82672, -82728, -82729, -91043, -92103, -94194). Development lockfile: mint 1.11.0, finch 0.24.0, req 0.7.5.
Fixes:
- Nonce retry recognizes the RFC 9449 section 8 authorization server
challenge: status
400, a JSON body of{"error": "use_dpop_nonce"}, and aDPoP-Nonceheader, with noWWW-Authenticate. Before, only the section 9WWW-Authenticateform triggered a retry, so token endpoint requests never retried against a server that follows the RFC. - Req's retry and redirect steps get a fresh proof (new
jti, currenthtuandhtm) instead of a replay of the previous hop's proof. With Req 0.6 the plugin queues its step for the re-run, including after transport errors; Req 0.7 re-runs every step. - A streaming (
into:) challenge response is cancelled before the nonce retry, as Req's redirect step does. htuis the wire form of the target URI: lowercase scheme and host,/for an empty path, no userinfo, query, or fragment. A relative or non-HTTPhturaisesReqDPoP.Error. Before,Req.get!(client)against a barebase_urlsignedhttps://hostwhile the request line carried/, and verifiers that compare paths rejected the proof.- An empty
:access_tokenmeans proof-only mode: noAuthorizationheader and noathclaim. Before,athwas computed over the empty string while the header was omitted. :algmust match the key type. Keys other than P-256 EC and RSA raiseReqDPoP.Errorwith reason:unsupported_keyinstead of a raw JOSE error.attach/2called twice on one request replaces the configuration instead of adding a second set of steps.- CI pins
auth0-api-python, fails instead of skipping when the Python verifier is missing, and runs the suite against Req 0.6 as well as the lock.
v0.5.3
- Raise the JOSE dependency floor to 1.11.12. This keeps the earlier security,
package-metadata, and Erlang/OTP 28 EC key fixes while also correctly
encoding Elixir
nilas JSONnullwith Erlang/OTP's built-in JSON module.
v0.5.2
- Raise the Req dependency floor to 0.6.1, the first release patched for EEF-CVE-2026-49755 decompression-bomb denial of service.
v0.5.1
- Correct the README installation snippet now that the package is published on Hex.
v0.5.0
- Initial Req plugin for RFC 9449 DPoP proof generation.
- Adds DPoP proof and optional
Authorization: DPoP ...headers. - Computes
athfor access-token mode. - Supports proof-only token endpoint requests.
- Retries DPoP nonce challenges with a nonce-bound proof.
- Supports ES256 and RS256 signing keys.