All notable changes to this project are documented here. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[2.26.0] - 2026-11-26
Requires attesto >= 2.32.0 and < 3.0.0.
Added
AttestoClient.MCPAuthorizationruns the MCP 2025-11-25 and 2026-07-28 authorization policy over the existing OAuth client: RFC 9728 protected resource discovery, ordered RFC 8414/OpenID Connect issuer discovery, explicit S256 PKCE capability, exact resource and issuer binding, Bearer-only presentation, refresh, bounded insufficient-scope retries, and authorization-server migration.- MCP client registration selection prefers an issuer-bound registration, then an exact-issuer pre-registration, a validated Client ID Metadata Document, opt-in Dynamic Client Registration, and finally a host prompt. Credentials issued by one authorization server are never reused at another; CIMD is portable only when the new server advertises it, and a dynamic client is registered again after migration.
AttestoClient.DynamicClientRegistration.register/3provides a minimal RFC 7591 client over the pinned, redirect-free, size-bounded OAuth transport. MCP's dynamic registration policy remains opt-in because registration creates server-side state.AttestoClient.WWWAuthenticate.bearer_scopes/1parses and validates the Bearer challenge's OAuth scope tokens.AttestoClient.Token.refresh/4acceptsprotocol: :oauthfor grants without an OIDC subject, ID Token, or JWKS. The default remains:oidc.AttestoClient.AuthorizationCode.exchange/2accepts:scopes, and stored authorization transactions retain requested scopes, so code and refresh responses that omitscopestill produce the effective scope.conformance/contains a narrow adapter and runner for the official MCP authorization scenarios. Both frozen protocol suites pass against the release implementation; the adapter is test infrastructure and is excluded from the Hex package.
Changed
- Protected-resource authorization-server discovery tries RFC 8414 path-insertion, OpenID Connect path-insertion, and OpenID Connect path-appending metadata URLs in that order. Only HTTP 404 advances to the next candidate; invalid metadata, an issuer mismatch, and every other error fail closed.
AttestoClient.Discovery.authorization_server/2acceptsresource_well_known: :path_then_root. It tries the RFC 9728 path-specific document first and the origin-root document only after a 404. At the root compatibility location, the document may identify either the requested URL or its exact origin; the advertised identifier becomes the RFC 8707 resource used by MCP authorization. An explicit metadata pointer remains a single location, and an origin resource is not fetched twice when its path and root well-known URLs are identical.- Refresh single-flight adoption now compares the token endpoint, issuer, client identifier, and protocol in addition to resources and scopes. Callers sharing an application key cannot adopt a result or error from a different refresh request identity; the existing per-caller profile, client authentication, DPoP, algorithm, and verification checks still apply to successful results.
- Malformed or incomplete CIMD selection input returns
:invalid_client_id_metadatainstead of raising. A same-issuer CIMD registration is reused only while the server continues to advertise CIMD support; explicitnilregistration strategies are treated as absent.
Security
- Loopback HTTP protected-resource discovery is available only with
outbound: [allow_loopback_http: true]. A challenge-selected metadata pointer must itself be loopback, and broader CIDR exceptions are never applied to that attacker-selected URL. - MCP token presentation requires the token set to remain bound to the exact discovered issuer and sole protected resource. A different token type, issuer, resource, registration, or client identity is refused locally.
- MCP callbacks bind the consumed authorization transaction to the exact discovered issuer, client identifier, OAuth protocol, and protected resource before token HTTP. Registration authentication is revalidated at callback time.
- MCP authorization is Bearer-only at every boundary: DPoP options and DPoP token sets are refused before authorization state is created or consumed and before refresh HTTP. Refresh also revalidates the registration's advertised token-endpoint authentication method locally.
- The loopback development exception is valid only when the protected resource and authorization server are themselves loopback. Registration endpoints are validated with the other server endpoints, and a deployed issuer cannot redirect Dynamic Client Registration to a loopback service. MCP dynamic registration accepts HTTPS redirects, plus loopback HTTP redirects only for native clients.
[2.25.0] - 2026-11-26
Added
AttestoClient.Token.refresh/4accepts:resource: one RFC 8707 resource indicator or a list of them, each sent as aresourceparameter on the refresh request (RFC 8707 §2.2). An authorization server that binds tokens to resources may refuse a refresh without it, and the MCP authorization specification requires the parameter on every token request. Malformed or out-of-grant values return:invalid_resourcebefore any request. Thanks to @romul for the contribution in #11.AttestoClient.TokenSet.resourcesretains the RFC 8707 resource indicators known to belong to the authorization grant. Authorization-code and client-credentials token sets populate it; refresh repeats it by default, allows an explicit subset and preserves the full retained grant in the new token set.nilidentifies an older, imported or application-assembled token set whose resource grant is unknown.AttestoClient.Token.refresh/4accepts:scopesto downscope the new access token under RFC 6749 §6. An invalid list returns:invalid_scopesbefore any request. If the response omitsscope, the token set retains the scope the client requested.- One refresh request serves every concurrent caller for a key. A caller that
joins a refresh already running for other resources or scopes gets
:refresh_request_mismatchand no tokens, because the shared access token has different access. Resource and scope order does not affect matching.AttestoClient.Error.project/1retains the new code.
Behavior change
AttestoClient.Token.refresh/4ignored:resourcebefore this release. A caller that already passes it, for example in an option list shared withAttestoClient.AuthorizationCode.start/2, now sends it. Before:grant_type=refresh_token&refresh_token=.... After: the same form plusresource=<uri>for each indicator.- Token sets created before this release have no retained resource grant and
continue to omit
resourceby default. Newly obtained token sets retain the known grant and repeat it by default, so a later refresh remains audience-bound without the application copying the option. Pass an explicit subset to request a more narrowly targeted access token. AttestoClient.Token.refresh/4ignored:scopesbefore this release. It now sends a de-duplicated, space-delimitedscopevalue. Omit it or pass an empty list to keep the original grant scope.
[2.24.0] - 2026-11-20
Requires attesto >= 2.30.0 and < 3.0.0.
Breaking
- The client refuses RSA keys under 2048 bits and certificates with unsupported keys or signatures, duplicate extension OIDs, or
cAset toTRUEon a leaf other than the selected trust anchor, including under an explicit non-FAPI or broader algorithm policy (RFC 7518 §3.3, RFC 5280). Hosts receive:untrusted_certificatefor wallet paths refused on these certificate checks. - The client still returns
:weak_keywhen an otherwise eligible RSA verification key is too small and no candidate remains.
[2.23.1] - 2026-11-17
Security
- Requires
plug >= 1.20.4 and < 2.0.0. Plug 1.13.0 through 1.20.3 do not count multipart part delimiters, header separators or line endings againstPlug.Parsers':lengthlimit, and hold parts without acontent-dispositionheader in memory until the body has been read, so a request under the limit can take far more memory (CVE-2026-120287, GHSA-qj4r-jh2r-rw3f). No earlier Plug line has a fixed release. A host's endpoint runs that parser for any request with a multipart body, before a route is chosen.
[2.23.0] - 2026-11-15
Requires attesto >= 2.25.0 and < 3.0.0.
Breaking
AttestoClient.IDToken.verify/2refuses a missingkidwhen the issuer's complete key set contains more than one entry, before filtering. The same rule applies to authorization callbacks and refresh.:require_kidcan require an identifier even with one key; refusals return:missing_kid.AttestoClient.AuthorizationCode.callback/3checks the transaction deadline with function clocks before handling authorization errors and again before token exchange. Seconds readings represent the last millisecond of their second, so transactions no longer get an extra fraction of a second.:now_mssupplies an exact millisecond transaction clock.AttestoClient.Logout.url/1refuses an endpoint query containing logout parameter names or any repeated name after percent-decoding, returning:invalid_endpoint_query. Other fixed query parameters are preserved.- Signing JWKs must permit
signwhenkey_opsis present andsigwhenuseis present. Public halves derived for proofs and attestations omit private operation metadata; public-only verification restrictions remain.
Added
AttestoClient.Error.project/1returns a fixed code and an optional HTTP status, discarding provider text, credentials and other variable details.AttestoClient.Token.client_credentials/1uses the existing authenticated, pinned and bounded token request path and returnsAttestoClient.TokenSet, preserving unknown response members in:extra. DPoP type checks apply; transport failures after a request is written never retry.
[2.22.0] - 2026-11-15
Requires attesto >= 2.24.0 and < 3.0.0.
Breaking
- Connect failures, including a deadline ending during connect, now return
{:error, :not_sent}. Callers matching:transport_error,:timeoutor discovery's{:transport, reason}for those failures must handle the new reason. It guarantees that no state-changing request in the public call was written, excluding a refused authentication attempt that is being retried. Earlier GET/HEAD requests do not count. After an unrefused write, a later connect failure returns:transport_error, or:timeoutfor a deadline. - Connections retry up to three times on fresh sockets, rotating all screened
addresses, within the existing total deadline. Each attempt has a three-second
timeout, configurable through
:req_options':connect_options:timeout. No transport retry occurs after the request starts, for any HTTP method.
[2.21.0] - 2026-11-15
Breaking
- Requires
attesto >= 2.21.0 and < 3.0.0. - The wallet fetches and enforces status references for SD-JWT VC and mdoc credentials, at issuance and before every presentation. A revoked or suspended credential, an invalid list and a failed fetch are refused.
:resolve_statusreplaces the default fetcher,Attesto.StatusList.fetch/3; no option turns enforcement off. An issuer has to publish the list entry before it returns the credential, or issuance fails. - A held credential now carries the issuer's public
:issuer_keyand, under certificate trust,:issuer_trusted_certificates. A credential saved by 2.20.0 has neither. If it has a status reference, verify it again or pass:trustedor trusted certificates before presenting it. - A
DPoP-Nonceresponse header is used only when there is exactly one, it is at most 1,024 bytes, and every byte is an RFC 9449 §8NQCHAR. - Client assertions, request objects and wallet proofs signed with an Ed25519 or Ed448 key use the RFC 9864 identifiers
Ed25519andEd448by default. Passalg: "EdDSA"for a peer that accepts only that. - The wallet accepts and presents
dc+sd-jwtonly.vc+sd-jwtis refused.
Changed
- The pinned connection is
Attesto.PinnedHTTP. Option screening, redirect refusal and error shapes are unchanged.
[2.20.0] - 2026-11-14
Breaking / Security
- Requires
attesto >= 2.20.0 and < 3.0.0. AttestoClient.ResourceServer.Plug.init/1(delegated toAttesto.Plug.Authenticate) now requires:originor a 1-arity:htucallback when:replay_checkis configured (accepting DPoP) and rejects malformed:htuvalues instead of falling back toHost-derived URIs. Bearer-only mounts (without:replay_check) require neither.AttestoClient.AuthorizationTransaction,AttestoClient.TokenSet, andAttestoClient.RefreshResultderiveInspectwith:onlyso PKCE verifiers, nonces, browser bindings, and tokens are omitted from crash reports andinspect/1, andAuthorizationTransaction.Store.ETScatchesGenServerexits ({:error, :store_unavailable}) instead of crashing with secrets in the exit reason.AttestoClient.Wallet.request_credential/3,Token.exchange_pre_authorized_code/2,Token.revoke/2, andWalletAttestation.fetch_challenge/2now enforce the loopback-issuer check for:allow_loopback_http.AttestoClient.Discovery.fetch_resource/2refuses:outboundwhen:metadata_urlis given, andAttestoClient.Discovery.authorization_server/2refuses it unless the caller passes:issuer. In both refused cases the address being fetched was written by the resource server, not chosen by the operator.private_key_jwtclient authentication takes its assertion audience from the trusted:issuer(or an explicit assertion:audience) and nothing else, as RFC 10070 §4 requires. The fallback that sent the endpoint URL as the audience when:issuerwas omitted is removed, with its[:attesto_client, :client_assertion, :legacy_endpoint_audience]telemetry event and warning;AttestoClient.Token.exchange_pre_authorized_code/2,AttestoClient.Token.revoke/2and any other call that authenticates withprivate_key_jwtwithout:issuernow return{:error, {:client_assertion, :invalid_audience}}and send nothing.
Fixes
AttestoClient.Wallet.Presentation.DCQLusesAttesto.VpToken.dcql_value_matches?/2and filters wildcard array claim paths so elements not listed in DCQLvaluesare not disclosed.AttestoClient.IDToken.verify/2delegatesmax_agechecking toAttesto.AuthorizationRequest.check_auth_time/4with optional:auth_time_allowance_seconds.AttestoClient.ResourceServernow supports plainAttestoClient.Issuercache references, bounds:clock_skew_secondsconsistently withIDToken, and reusesAttesto.Claims.typ_matches?/3andAttesto.Scope.parse/2.AttestoClient.Outbound.screen_options/2extends:allow_loopbacktohttpsliteral loopback URLs as well ashttp, andDiscovery+Issuer.Cachetreat:unresolvableas transient.AttestoClient.AuthorizationCodeandAttestoClient.Logoutpreserve existing query parameters withAttesto.URI.put_query_params/3and validate loopback redirects withAttesto.URI.https_identifier?/2.
[2.19.0] - 2026-11-13
Requires Attesto >= 2.19.0 (was >= 2.15.0).
- Update the published dependency lock, CI checks, and installation examples; remove older-core capability fallbacks and run all wallet tests against the supported core.
[2.18.0] - 2026-11-12
Changed
- Breaking: ID Token, signed UserInfo, and signed introspection verification read the clock after key retrieval and signature verification. Tokens that expire during a slow key fetch are now refused, including an ID Token that triggers an issuer-cache refresh (RFC 7519 §4.1.4). JARM and resource-server verification also read the clock immediately before their time checks.
- Breaking for
require_auth_time: trueonly: zero or negative integerauth_timereturns:auth_time_required, including when:max_ageis set. Other invalid values and future times remain refused. This is a local requirement for the option, not a restriction imposed by OIDC Core §2. - ID Token
typacceptsapplication/jwtas well asJWT, case-insensitively, using Attesto's media-type comparison (RFC 7515 §4.1.9). Other JWT types remain refused. - Breaking: a malformed explicit
:nowon ID Token verification returns:invalid_timeinstead of silently using the system clock. Its existingDateTimeform remains supported. A non-boolean:require_auth_timeis also refused when:max_ageis supplied, as it already was without:max_age. - Resolve the development dependency lock to published Attesto 2.17.0.
- Breaking: concurrent refresh callers with different ID Token verification options re-verify the shared token under their own options instead of inheriting the first caller's checks. The refresh request still runs once (OIDC Core §3.1.3.7; RFC 7519 §4.1.4).
Added
AuthorizationCode.callback/3andToken.refresh/4accept:nowas integer Unix seconds or a zero-arity function returning them. ID Token verification accepts the function too and reads it after signature verification. Callback transaction deadlines and DPoP proof times use the supplied clock; store TTLs and network deadlines still measure elapsed time. Invalid options and clock results are refused. These are clock-injection APIs, not new protocol rules.AuthorizationCode.start/2acceptsrequire_response_issuer: true. It requires metadata to advertiseauthorization_response_iss_parameter_supported: truebefore storing a transaction or sending authorization, otherwise returning:response_issuer_not_supported. The retained requirement refuses callbacks withoutissas:missing_response_issuer(RFC 9207 §2.4, §3). The default isfalse; advertised support already requiresisswithout this option. A malformed option is:invalid_require_response_issuer.IDToken.verify/2,AuthorizationCode.callback/3, andToken.refresh/4acceptrequire_typ: trueto refuse an absent JOSEtypas:unexpected_typ. The option defaults tofalse; a malformed value is:invalid_require_typ. RFC 7519 §5.1 makestypoptional. Requiring generic JWT typing does not distinguish every JWT purpose (RFC 8725 §3.11).
[2.17.0] - 2026-11-12
Changed
- Require Attesto
>= 2.15.0 and < 3.0.0and update the published dependency and CI core reference to 2.15.0. - Delegate X.509 certificate path validation to
Attesto.X509, retainingAttestoClient.Wallet.Presentation.CertificateTrust.verify/2anddecode_x5c/1as documented compatibility functions. Validation behavior and the existing contract tests are unchanged (RFC 5280 §6). - Decode wallet CBOR through
Attesto.StrictCBOR. Repeated map keys are refused in credential envelopes, COSE headers, presentation responses, and embedded issuer-signed items, including nested maps (RFC 9052 §3; RFC 8949 §5.6). Existing byte limits and error atoms are retained; core's default nesting limit of 32 also applies. Invalid embedded items return:invalid_credentialeven when claim selection would omit them.
[2.16.0] - 2026-11-12
Requires Attesto >= 2.14.0 and < 3.0.0. Attesto 2.14.0 has the CIDR
allowance in its outbound screen, the loopback-only http form of the
identifier check, and the stricter host rule used below.
Changed
An issuer or endpoint URL whose host contains a percent-encoded character (
https://auth.test%20evil/) or an empty label (https://auth.test../) is refused everywhere this package checks one::invalid_issuer,:invalid_endpoint,:invalid_jwks_urior:blocked_host, by call. No valid issuer metadata contains such a host (RFC 3986 §3.2.2). The rule is Attesto'sAttesto.URI.valid_host?/1. An upper-case scheme (HTTPS://) is still accepted, since schemes are case-insensitive (RFC 3986 §3.1), and one trailing dot (https://auth.test./) is still the fully qualified form of the name.AttestoClient.IDToken.verify/2rejects an ID Token whoseaudnames any audience other than this client, with{:error, :untrusted_audience}. OIDC Core §3.1.3.7 item 3 says the ID Token MUST be rejected if it "contains additional audiences not trusted by the Client". Until now anaudarray was accepted as long as it contained the client andazpnamed it, whatever else it listed. The new:trusted_audiencesoption lists the additional audiences the client trusts and is empty by default.AttestoClient.AuthorizationCode.callback/3andAttestoClient.Token.refresh/4take the same option and apply it to the ID Token they verify. Theazprules are unchanged.Behaviour change: a provider that puts another party in the ID Token's
audnext to the client (an API identifier, for example) now fails sign-in and refresh until that value is listed in:trusted_audiences. A malformed option is{:error, :invalid_trusted_audiences}.AttestoClient.Logout.url/1no longer requires:id_token_hintor:logout_hint, and no longer returns{:error, :missing_logout_hint}. RP-Initiated Logout 1.0 §2 makes every request parameter optional. With no hint the result is the validatedend_session_endpointwith whatever parameters were given, so a relying party that no longer holds the ID Token gets the checked URL without rebuilding it.AttestoClient.Logout.url/1returns{:error, :missing_client_id}for a:post_logout_redirect_urisent with neither:id_token_hintnor:client_id. Without one of them the provider has no client to validate the redirect against (§2, §3). This combination with only:logout_hintused to produce a URL.AttestoClient.Logout.url/1refuses provider metadata whose authorization, pushed-authorization or token endpoint carries a protocol parameter in its own query, asAttestoClient.AuthorizationCode.start/2already did. The two now share one document check.
Added
:outboundnames deliberate exceptions to the rules applied to every address this package connects to.AttestoClient.AuthorizationCode.start/2,callback/3andexchange/2,AttestoClient.IDToken.verify/2,AttestoClient.Token.refresh/4,AttestoClient.Logout.url/1, theAttestoClient.Discoveryfunctions,AttestoClient.IssuerandAttestoClient.ResourceServertake it;AttestoClient.Outbounddocuments it. A malformed value is{:error, :invalid_outbound}(anArgumentErrorwhen starting a cache).outbound: [allowed_cidrs: ["10.20.0.0/16"]]lets the issuer's hosts resolve into the listed non-public networks, for an identity provider reachable only at a private address. Until now such an issuer failed with:blocked_host. Every resolved address must be public or inside a listed block,httpsis still required, and there is no host-name form. The rule isAttesto.OutboundTarget's. This is an SSRF exception the operator takes on deliberately: the issuer's metadata can then direct this package's requests, including the token request, at any host in those networks.outbound: [allow_loopback_http: true]acceptshttpfor an issuer, and for the endpoints in its metadata, whose host islocalhostor a literal loopback address, for development against a local identity provider. Every other host still needshttps. The option is refused when the issuer is not a loopback host.
The option is not stored in an authorization transaction or a token set.
callback/3andrefresh/4apply only what they are passed, so nothing a transaction carries can widen what a later call connects to.The other calls that connect to an issuer, or to an endpoint the caller chose from its metadata, take it too and check it before connecting:
AttestoClient.UserInfo.verify/2,AttestoClient.SignedIntrospection.verify/2,AttestoClient.Token.exchange_pre_authorized_code/2andrevoke/2,AttestoClient.WalletAttestation.fetch_challenge/2andAttestoClient.Wallet.request_credential/3.Calls whose address is written by another party refuse it with
{:error, :outbound_not_supported}:AttestoClient.Wallet.CredentialOffer.fetch/2,AttestoClient.Wallet.PresentationRequest.fetch/3andfrom_uri/3, andAttestoClient.Wallet.Presentation.submit/3andpresent/3. A credential offer link or a verifier's request names those addresses, so an allowance there would let whoever wrote the link direct a request into the listed networks.AttestoClient.IssuerandAttestoClient.ResourceServertake:resolver, the two-argument host resolverAttestoClient.Discoveryalready takes. It is used for every metadata and JWKS fetch the cache makes, including a refresh on an unknownkid. Until now a cache always used the system resolver. A value that is not a two-argument function raisesArgumentErrorat start.AttestoClient.Discovery.validate_metadata/3checks an authorization-server metadata document for an issuer and returns{:ok, document}or the errorAttestoClient.AuthorizationCode.start/2would give for its content.protocol: :oidc(the default) validates OpenID Provider metadata;protocol: :oauthvalidates RFC 8414 metadata. It is the functionstart/2calls, so a document accepted here is not refused there for its content.AttestoClient.Issuertakes:protocol(:oidcor:oauth). With it, every refresh runs that check, and a documentstart/2would refuse is a refresh failure that never becomes a snapshot; a previously cached document stays in place. Without it the cache checks only the issuer andjwks_uri, as before, which is what a resource server's cache needs.
[2.15.0] - 2026-11-11
Added
AttestoClient.Issuer, a supervised cache of one issuer's discovery metadata and JWKS. Until now onlyAttestoClient.ResourceServercached them, soAttestoClient.IDToken.verify/2fetched the discovery document and the key set on every call that was not handed a:jwks. The cache has the fresh and stale intervals, the retry cooldown, and the single coordinated refresh on an unknownkid(RFC 7517 key rotation) thatResourceServeralready had.issuer/1,metadata/1,keys/1,warm/1,ready?/1, andrefresh/1read and drive it.issuer: {AttestoClient.Issuer, name}onAttestoClient.IDToken.verify/2,AttestoClient.AuthorizationCode.start/2andcallback/3, andAttestoClient.Token.refresh/4. The issuer identifier compared with the ID Token'sissand the RFC 9207 responseissis the one the cache was started with.start/2takes the discovery metadata from the cache;callback/3andrefresh/4take the ID Token's keys from it, and a caller-supplied:jwksstill takes precedence.callback/3returns{:error, :issuer_mismatch}for a cache whose issuer is not the transaction's. A cache that is not running returns{:error, {:jwks_refresh_failed, :server_not_running}}. A plain issuer string behaves as before.AttestoClient.IDToken.verify/2accepts:max_token_age_seconds, which rejects an ID Token whoseiatis older than that many seconds plus:clock_skew_secondswith{:error, :token_too_old}(OIDC Core §3.1.3.7 item 10). It is the optionAttestoClient.ResourceServeralready takes, and both now run the same rule. A value that is not a non-negative integer is{:error, :invalid_max_token_age_seconds}.AttestoClient.IDToken.verify/2acceptsrequire_auth_time: true, which requires theauth_timeclaim even when no:max_ageis given (§3.1.3.7 item 13) and returns{:error, :auth_time_required}without it.AttestoClient.AuthorizationCode.callback/3andAttestoClient.Token.refresh/4accept both options and apply them to the ID Token they verify.AttestoClient.AuthorizationCode.start/2accepts:returnin place of a store. Nothing is stored; the result carries the transaction under:transactionfor the application to keep, andcallback/3takes it back astransaction:. The response'sstatemust equal the transaction's, and every other callback check runs as it does for a stored transaction. The application then owns two things a store provided. It must encrypt the transaction before it leaves the server, because it holds the PKCE verifier. It must also make the transaction single use, becausecallback/3accepts a returned transaction again until it expires.AttestoClient.AuthorizationTransactionhas an:expires_atfield, the transaction's deadline in Unix milliseconds.callback/3refuses a transaction past it with{:error, {:invalid_state, :expired}}, whether it came from a store or from the caller. A transaction stored by an earlier version has no deadline of its own and relies on its store's lifetime, as before.AttestoClient.AuthorizationCode.exchange/2performs the authorization-code token request on its own (RFC 6749 §4.1.3, RFC 7636 §4.5): code,redirect_uri,code_verifier, client authentication, and DPoP when a key is given. It returns the validated token response as anAttestoClient.TokenSet. It is the requestcallback/3makes, for an application that ran the authorization request itself; such an application still has to checkstateand verify a returned ID Token.
Fixed
- Work run under the package's request deadline now carries
$callersand$ancestorsleading back to the calling process, asTaskdoes. The work runs in a separate process so it can be stopped at the deadline, and until now that process named no caller.Req.Teststubs, Ecto sandbox allowances and other ownership that follows$callersdid not reach token, PAR, discovery or JWKS requests made through it.
Changed
AttestoClient.ResourceServeris built onAttestoClient.Issuer, so there is one cache and one refresh logic. Its options, defaults, results, and error values are unchanged. The process it starts is anAttestoClient.Issuerprocess: its name can be passed asissuer: {AttestoClient.Issuer, name}to verify ID Tokens from the same issuer against the same keys. AResourceServerprocess started by an earlier version does not survive a hot code upgrade to this one, because its callback module changed; its supervisor restarts it with an empty cache.:issuer_aliasesonAttestoClient.IDToken.verify/2,AttestoClient.AuthorizationCode.start/2, andAttestoClient.Token.refresh: a list of extra exact strings accepted as the ID Token'siss. It is an opt-in interop workaround that deviates from OIDC Core §3.1.3.7 item 2, which says the issuer identifier "MUST exactly match" theissclaim. Some providers break that rule. Google issues ID Tokens with bothhttps://accounts.google.comandaccounts.google.com, and the second is not a valid issuer identifier because it has nohttpsscheme. The list is empty by default, soissis still compared exactly unless a caller opts in. Discovery, the JWKS, and the RFC 9207 authorization-responseisscheck stay pinned to:issuer.start/2pins the aliases in the transaction; a token set does not retain them, so pass them again toToken.refresh.:expiry_leeway_secondsonAttestoClient.IDToken.verify/2,AttestoClient.AuthorizationCode.callback/3,AttestoClient.Token.refresh, andAttestoClient.ResourceServer: how long pastexpa token is still accepted (RFC 7519 §4.1.4). An integer from 0 to 300. It defaults to 0, so an expired token is still rejected atexpunless a caller sets it.:clock_skew_secondsonAttestoClient.IDToken.verify/2,AttestoClient.AuthorizationCode.callback/3, andAttestoClient.Token.refresh: how far in the future an ID Token'siat,nbf, andauth_timemay lie. An integer from 0 to 300, default 60, the value that was fixed before. It has the meaning the option of the same name already has onAttestoClient.ResourceServer: it bounds future-dated claims and does not extendexp.
[2.14.0] - 2026-11-09
Security
- Require Attesto
>= 2.12.0 and < 3.0.0. Attesto 2.12.0 refuses a JWK Set where one JWK is expected. Earlier releases accepted such a value as a key in DPoP proofs, credentials and trusted key material, and computing the thumbprint of a set did not return. AttestoClient.Wallet.PresentationRequest.from_uri/3replaced a caller-supplied:client_idwith the unauthenticatedclient_idfrom the deep link. A verifier whose keys the caller passed as trusted could sign a request naming another verifier'sclient_id; the request verified as that other verifier, so the presentation's audience and nonce were bound to it and the response went to the signer'sresponse_uri. A caller:client_idthat differs from the deep link's now returns{:error, :invalid_client_id}before anyrequest_uriis fetched. Without a caller:client_id, the deep link's value is still bound to the signed request.- An SD-JWT presentation numbered array positions over the issuer's raw array, counting decoy digests and other placeholders the credential holds no Disclosure for, while DCQL matching and the held claims shown for consent number the reconstructed array, where those placeholders are absent. A claims path with an array index then disclosed a different element from the one selected. Array indexes are now counted over the reconstructed array.
- Outbound requests to DNS-screened addresses started one Finch instance under
Req per distinct hostname, because the TLS hostname was part of the
connection options Req keys its pools on, and Req never stops those
instances. Each hostname left about 8 processes, 9 atoms and 0.45 MB behind
for the life of the VM. Hostnames come from untrusted inputs such as
request_uri,credential_offer_uri,WWW-Authenticateresource_metadataandjwks_uri, so a wildcard DNS zone could exhaust memory and then the atom table. Screened requests now open one Mint connection to the checked address and close it when the response completes. Connections are no longer reused across requests, and Finch pool options such as:pool_timeouthave no effect on them. AttestoClient.ResourceServerappliedrefresh_retry_intervalonly after its first successful key refresh. While the issuer failed before then, everyverify/3call started its own discovery and JWKS fetch and waited for it, so each unauthenticated request cost an outbound request. A failure before the first snapshot now starts the same cooldown:verify/3returns the remembered{:error, {:jwks_refresh_failed, reason}}until it ends.warm/1andrefresh/1still fetch.
Fixed
- An SD-JWT presentation for a DCQL claims path with a
null(all elements) component, such as["degrees", null, "type"], left out the Disclosures of the selectively disclosable array elements the selected claims sit in.select/2reported a match, but the verifier rejected the presentation with:unused_disclosure, or saw an empty array when the elements were disclosed whole. Those element Disclosures are now kept. AttestoClient.Wallet.request_credential/3returned{:error, {:notification, reason}}when the OID4VCI Notification POST failed after the credentials had been issued and verified, discarding them. A pre-authorized code is single-use, so the wallet could not request them again. The result now carries the credentials, and the failure reason in a new:notification_errorfield, which isnilwhen the Notification succeeded or was not sent.{:error, {:notification, reason}}is no longer returned.
[2.13.1] - 2026-11-05
Security
Refuse a present JSON
nullwhere an omitted member places no restriction:- DCQL
trusted_authorities,meta.doctype_value, andmeta.vct_valuesinAttestoClient.Wallet.Presentation.select/2, which now return:invalid_dcql_queryinstead of treating the null as unrestricted and widening which held credentials match.doctype_valuemust be a non-empty string andvct_valuesa non-empty list of non-empty strings when present. - A recipient encryption key's
useandkey_ops, which now make the key unusable instead of reading as omitted.
- DCQL
Require Attesto
>= 2.11.0 and < 3.0.0.AttestoClient.ResourceServerchecks sender constraints throughAttesto.Token.check_confirmation/2, which in earlier Attesto releases accepted a"cnf": nullaccess token as an unbound bearer token under the Jason or Poison JOSE backend.
Changed
- Verified claims carry JSON
nullasnilwhichever JSON backend JOSE uses, following Attesto 2.11.0. Under JOSE's builtin OTP backend they previously carried:null.
[2.13.0] - 2026-10-31
Changed
AttestoClient.Walletbuilds themso_mdocsession transcript andDeviceAuthenticationbytes withAttesto.Mdoc, decodes SD-JWT Disclosures withAttesto.SdJwt.decode_disclosures/2, and checks DCQL claim paths withAttesto.PresentationRequest.claim_path?/2, so the Wallet applies the same rules as the Verifier. A held SD-JWT whose Disclosures name a reserved claim, repeat a digest, or carry a non-string salt or name is now refused before presentation, and a DCQL path element may be any string.- An
mso_mdocpresentation given an unusable:response_encryption_jwkreturns{:error, :invalid_key}; it leaked:malformed_jwkbefore. - Credential request encryption chooses a key only if it is a P-256 point on the curve with 32-byte coordinates and no private members, the rule OID4VP response encryption already applied. Such a key was selected before and failed later at encryption.
- Require Attesto
>= 2.9.0 and < 3.0.0for those functions.
[2.12.0] - 2026-10-31
Changed
AttestoClient.ResourceServer.Plugnow delegates bearer, DPoP, and mTLS request authentication, challenge formatting, and scope enforcement toAttesto.Plug.Authenticate, andAttestoClient.ResourceServerdelegatescnfsender-constraint checks toAttesto.Token.check_confirmation/2while preserving the client's documented challenges, status codes, and error atoms.AttestoClient.Discoverydelegates outbound endpoint URL validation, DNS resolution, and public-IP screening toAttesto.OutboundTarget.screen/2, and the client's internal strict JSON decoder delegates duplicate-key and depth-bounded decoding toAttesto.StrictJSON.decode/1.- Require Attesto
>= 2.8.0 and < 3.0.0in the 2.x line for the sharedAttesto.OutboundTarget,Attesto.StrictJSON,Attesto.Plug.Authenticate, andAttesto.Token.check_confirmation/2APIs.
[2.11.1] - 2026-10-27
Security
- Require JOSE 1.11.13 or later, which fixes CVE-2026-65625 through CVE-2026-65632. With earlier JOSE releases, ID token and request-object verification accepted ECDSA signatures padded with leading zero bytes. AttestoClient decrypts no JWEs, and wallet response encryption already accepted only a public P-256 verifier key.
[2.11.0] - 2026-10-19
Added
AttestoClient.Discovery.fetch_resource/2reads a protected resource's RFC 9728 metadata, from the well-known location derived from its identifier or from the URL aWWW-Authenticatechallenge advertised, and refuses a document whoseresourcediffers from the identifier it was requested for. Advertised authorization servers must be valid issuer identifiers andjwks_urimust behttps.AttestoClient.Discovery.authorization_server/2follows that document to the issuer's own metadata: it selects the single advertised authorization server or the:issuerchosen among several, tries the RFC 8414 document before the OpenID Connect one, and returns both documents with the issuer.AttestoClient.WWWAuthenticateparsesWWW-Authenticatechallenges (RFC 9110 §11.6.1), several per field, and reads the RFC 9728resource_metadatapointer. The DPoP nonce retry now reads challenges through it.AttestoClient.AuthorizationCode.start/2takes:resource, one or more RFC 8707 resource indicators. Each is sent as aresourceparameter on the authorization request or the pushed request, pinned in the transaction, and repeated on the token request;callback/3takes:resourceto narrow the token request to a subset of the pinned indicators. A malformed indicator, or one outside the pinned set, is{:error, :invalid_resource}.
Changed
- A
"resource"entry in:authorization_paramsis read as the:resourceoption: it is validated as an RFC 8707 indicator, pinned, and repeated on the token request, which previously never carried it. Supplying both is{:error, :invalid_authorization_params}. - Form bodies are encoded from parameter pairs, so a repeated parameter such
as
resourceis sent once per value.
[2.10.0] - 2026-10-18
Security
Bind every returned SD-JWT VC and JWT VC issuer claim to the Credential Issuer Identifier from the accepted offer. Certificate-backed credentials may still omit
isswhere the profiled credential format permits it.Evict the oldest live authorization transaction when the bounded ETS store reaches capacity, with telemetry for operators, so unauthenticated login starts cannot leave the store refusing every new login until expiry.
Apply the JWKS refresh retry cooldown to hard validation and HTTP failures as well as transient outages. Hard failures remain fail-closed and no longer make every token verification repeat the same upstream fetch.
Route all client JWT verification through Attesto's strict protected-header, candidate-selection, and signature-verification boundaries while preserving ambiguous-key rejection and the 2048-bit RSA minimum.
Use Attesto's strict URI validator at every client endpoint boundary. This closes weaker userinfo, fragment, malformed-percent, and hostless cases in key-attestation and wallet presentation paths.
Reject duplicate JSON object members in discovery metadata, JWKS documents, credential offers, and credential responses before protocol validation.
Bound OpenID4VP request objects to 64 KiB before reading their unverified claims, matching Attesto core's Request Object limit.
Changed
- Require Attesto 2.6.0 or later in the 2.x line for the shared JWS candidate, NumericDate, claim, URI, JWE, and secret-generation boundaries.
- Consolidate registered-claim validation without changing each protocol's established missing, malformed, expiry, and future-time error results.
- Split OAuth client authentication and challenge parsing from the HTTP transport, centralize bounded response collection and option validation, and remove nested request deadlines and repeat DPoP signing probes.
- Call
Attesto.JWEdirectly internally now that every supported core version provides the bounded implementation. The deprecatedAttestoClient.CryptoJWEcompatibility wrapper remains available throughout the 2.x line. - Retain the public
AttestoClient.OpenIDMetadata.validate/2validation entry point, the hidden DCQL matching/path helpers, and theAttestoClient.Verifier.compact_segments/0remote type throughout the 2.x line.
[2.9.0] - 2026-10-17
Security
- Defer DPoP replay-cache claims in the resource-server Plug until after the
access-token signature and
cnf.jktbinding verify. An unauthenticated proof can no longer reserve replay identifiers or grow the replay store before its token establishes the caller's identity. - Route local JWT verification through Attesto's shared strict verifier so client-side verification applies the same canonical parsing, candidate filtering, malformed-result handling, and exact RSA-PSS salt and MGF1 checks as core protocol verifiers.
- Build DPoP proofs through
Attesto.DPoP.Proof, which requires HTTPS targets, rejects userinfo and malformed percent escapes, and preserves key-declared algorithms and identifiers. Resource metadata challenge URLs now use the same strict URI policy. - Use Attesto's IANA-registry-based public destination policy for discovery and JWKS fetches. Non-global and special-use destinations remain blocked across IPv4, IPv6, mapped, compatible, NAT64, and 6to4 forms, while the registries' applicable globally reachable exceptions remain available. ORCHIDv2 and Drone Remote ID non-locator identifiers remain blocked from fetches.
Changed
- Require Attesto 2.5.0 or later in the 2.x line.
AttestoClient.DPoPnow delegates proof building and algorithm resolution to the core implementation, and discovery delegates destination classification toAttesto.IPAddress.public_fetch_destination?/1.
[2.8.0] - 2026-10-15
Security
- Send OID4VCI Nonce Endpoint requests through the unauthenticated open-POST path. In split Credential Issuer and Authorization Server deployments this prevents forwarding the AS client secret, private-key assertion, client attestation, or DPoP proof to the Credential Issuer; endpoint screening, pinning, response bounds, and the overall deadline still apply.
- Reject malformed or duplicate
req_optionsbefore network I/O with:unsafe_transport_options, including nested connection and transport options used by unauthenticated by-reference requests. - Reject private JWK members in verification keys and reject empty, malformed, or struct-backed JWKS inputs. A malformed candidate no longer prevents a separate valid public verification key from being selected.
- Validate optional
nbfclaims in JARM, signed UserInfo, signed introspection, and resource-server tokens, and compare registered JWTtypvalues case-insensitively where required. - Validate wallet and attestation inputs before signing or network I/O,
including duplicate holder keys, malformed optional claims, protected-header
values, grant objects, credential issuer identifiers, notification IDs, and
symmetric keys. Key Attestation
certificationvalues are now limited to absolute HTTP(S) URLs.
Added
- Support anonymous OID4VCI pre-authorized-code redemption when
client_auth: :noneby allowingclient_idto be omitted. Authenticated client methods continue to require a non-empty client identifier. - Propagate
:alg,:kid, and:nowthrough DPoP-enabled authorization-code, token, credential, refresh, and nonce-retry paths. Each retry receives a freshjtiwhile retaining the selected key algorithm and identifier.
Changed
- Builders now honor a signing JWK's declared
algwhen:algis omitted and return:unsupported_algwhen an explicit algorithm conflicts with that declaration. This enables RSA DPoP keys declared for PS256 instead of silently forcing RS256. - A present
kidmust be a non-empty string. Explicitkid: nil, other malformed values, and malformed embedded JWKkidmembers now return:invalid_kidinstead of falling back to another identifier. Token.revoke/2now requires:client_id.Verifier.normalize_jwks/1returns:invalid_jwksfor empty key sets, and protected algorithms outside the accepted set return:unsupported_alginstead of:invalid_signature.- An explicit OID4VCI
credential_configuration_idmust be present in the credential offer; a mismatch fails before metadata lookup or HTTP. - Stop requiring every OpenID Provider metadata document to advertise RS256. The selected ID Token algorithm must still be advertised, allowing clients configured for ES256, EdDSA, or another accepted algorithm to use providers that intentionally omit RS256.
Fixed
- Preserve callback JWKS resolver, timeout, and response-size options while using the transaction's pinned issuer metadata.
- Parse every
WWW-Authenticatefield and combined challenge, recognize the DPoP scheme case-insensitively, and retry only for an exacterror=use_dpop_nonceparameter. - Derive canonical DPoP target URIs for IPv6 authorities and carry RSA PS256,
explicit
kid, deterministic time, and nonce options through DPoP retries. - Compute SD-JWT Key Binding
sd_hashwith the issuer-selected_sd_alg, restoring SHA-384 and SHA-512 interoperability with conforming verifiers. - Validate and expose
notification_idconsistently for immediate and deferred credential responses, reject invalid credential-offer grant values, and reject duplicate holder keys before issuing a request. - Return controlled errors for malformed builder inputs and symmetric attestation or holder keys instead of backend exceptions.
[2.7.0] - 2026-10-08
Fixed
- Retain the selected ID Token algorithm in
TokenSetthrough authorization and successive refreshes, including responses without an ID Token. FAPI's default ES256 selection now refreshes without repeatingid_token_alg. Reject conflicting explicit algorithms before HTTP and reject shared refresh results that do not match the caller's retained algorithm.
Security
- Require Attesto 2.3.1 or later for exact JWA PSS verification and fail-closed algorithm policies, including mixed allowlists. Upgrade core and client together.
- Require authenticated PAR and token requests plus locally bound DPoP in HAIP/FAPI flows. Persist profile, client/issuer identity and authentication binding through callback and refresh; reject changed or omitted material. FAPI supports private-key JWT authentication here; unverified mTLS claims cannot substitute for a DPoP key.
- Reject unsolicited DPoP token responses when no local signing key exists, including pre-authorized, authorization-code and refresh exchanges.
- Require a bounded certificate chain in
x5cfor HAIP client-attestation authentication. Bind the stable client and instance-key identity while permitting renewed attestations at callback and refresh. Authorization servers remain responsible for attester signature and trust. - Require the complete profile-bound
TokenSetfor externally supplied HAIP credential access tokens. Passaccess_token: tokenswith the retained DPoP key; a bare token string cannot establish the required binding. - Reject reserved parameters, bracket aliases and duplicate roots in discovered authorization/PAR/token endpoint queries before performing HTTP requests.
- Require signed HAIP verifier metadata to advertise both A128GCM and A256GCM; retain this profile when building or submitting presentation responses.
- Require
digitalSignaturewhen a signing certificate declares KeyUsage. Reject RSA-PSS-constrained SubjectPublicKeyInfo throughout the selected certificate path, including the used trust anchor, until its algorithm restrictions can be preserved and enforced. Reject non-NULLrsaEncryptionparameters; absent parameters remain accepted for interoperability. Additional ecosystem EKU and revocation checks remain application-owned. - Reject empty, invalid and weak wallet algorithm allowlists. HAIP and explicitly selected FAPI policy cannot be weakened through caller options.
- Require a DPoP token response whenever pre-authorized issuance requests DPoP,
before contacting nonce or credential endpoints. HAIP/FAPI authorization-code
transactions require response
isseven when discovery omits its support flag; the policy is pinned at start and cannot be weakened at callback. - Preserve DPoP across refresh: require signing material before any network request, reject Bearer responses, and compare any locally retained binding thumbprint. Legacy manually constructed token sets lack historic key provenance and acquire a binding after a successful DPoP refresh.
- Require PAR in HAIP/FAPI authorization-code flows, reject contradictory options before discovery, and reject bracketed aliases of protected extra authorization/PAR parameters.
- Require verifier format metadata and enforce advertised issuer and holder
algorithms during presentation generation and caller-built submission.
Registered authoritative
verifier_metadataoverrides signed fields; certificate-bound requests require metadata in their signed request. - Strip caller cookies, authentication, custom headers and routing options from unauthenticated by-reference request and credential-offer fetching.
- Enforce OID4VP request typing, required response mode, URL-safe nonce/state, unique nonempty bounded encryption-key IDs, and aggregate response bounds. Request URI responses require the request-object media type. Presentation response endpoints must return HTTP 200 and a JSON object with the JSON media type; malformed or duplicate JSON is rejected.
Added
- Add plain OAuth authorization-code transactions with S256 PKCE using
protocol: :oauth, RFC 8414 discovery, and no ID Token requirement. Keep issuer, browser-session, and one-time state checks; pin the selected protocol and any initiating DPoP key in the transaction. - Support Pushed Authorization Requests with client authentication and DPoP. Honor servers requiring PAR, reject explicit downgrades, and remove stored transactions when PAR fails or state expires during the operation. Require HTTP 201 and cap the returned redirect lifetime to the remaining state and PAR lifetimes. Authorization redirects carry only the client identifier and returned request URI.
- Add encrypted OID4VCI credential exchanges, bounded deferred issuance
polling, and encrypted OID4VP
direct_post.jwtresponses. These encrypted wallet features require Attesto 2.3.1 or later. - Verify HAIP
x509_hashpresentation requests against explicit DER certificate anchors, bind outer client identities and POST wallet nonces, and use the response encryption key in the mdoc session transcript. - Add opt-in
haip: trueissuer-chain verification for SD-JWT VC and mdoc credentials using explicittrusted_certificates. Verify credentials with the validated leaf key and attach only verified issuer-chain provenance. Recognize the critical mdoc document-signer usage only for mdoc issuer certificates; retain rejection of unknown critical extensions. Fixed-key trust remains the default. Status and revocation policy remain application-owned. - Reject undersized PS256 issuer keys in HAIP issuance and accept a missing SD-JWT issuer claim only after verifying certificate identity with Attesto 2.3.1 or later.
- Evaluate DCQL nested paths, claim alternatives, credential sets and trusted authority constraints before disclosure; validate explicit selections too.
- Add a pure
Wallet.Presentation.build_response/3for consent previews and application-owned transports, a progressive credential-wallet guide and an encrypted presentation example in the interactive Livebook. - Allow Client Attestations to include the trusted attester's
issuer:claim. - Add
WalletAttestation.fetch_challenge/2for proactive attestation challenges and preserve an optional DPoP nonce for subsequent PAR and token requests.
Changed
- When a DCQL query omits
claims, disclose only mandatory presentation contents, as required by final OID4VP §6.4.1. Selectively disclosable claims require an explicit query. - Ignore
issin all signed presentation requests as required by final OID4VP; retain audience, client identity, signature and certificate checks. - Parse encoded OAuth callbacks containing an issuer URL as form bodies, while retaining duplicate-parameter detection and callback URI checks.
- Reject bearer token responses when an authorization-code exchange requests DPoP, and reject a changed or omitted DPoP key when the transaction started with one.
- Bind the requested credential format and returned SD-JWT
vctor mdoc document type to the selected configuration when Credential Issuer configuration metadata is supplied. - Return
:unsupported_mdocwhen the optional CBOR dependency is absent, including before issuance makes network requests. - Use nonempty presentation arrays in both final OID4VP response modes; scalar plaintext inputs are rejected. Deferred credential responses require HTTP 202 and a positive integer interval; reject duplicate response JSON, ambiguous encryption keys, and invalid batch holder bindings.
- Use advertised optional credential encryption under
credential_encryption: :auto; unsupported or malformed advertisements fail closed.:disabledremains an explicit opt-out only when the issuer permits plaintext.
[2.6.1] - 2026-10-04
Security
- Bound compact JWS values and their protected/signature segments before splitting or decoding, require canonical Base64URL, and reject duplicate JSON members at every nesting depth before verifying signed claims.
- Accept an original callback URI or raw form body in the authorization-code client, bound the encoded input to 1,000,000 bytes, and reject repeated or percent-encoded alias parameter names before state is consumed. Map input remains available for integrations whose parser already enforces uniqueness.
- Bound encoded mdoc credentials before Base64URL decoding and normalize signing failures so exception text cannot expose private key material.
- Keep Attesto 1.x compatibility. Deploy with Attesto 2.2.2 or later in the 2.x line to include hardening of delegated core JOSE and credential verification.
[2.6.0] - 2026-10-03
Changed
- Default private-key client assertion audiences to the trusted authorization
server issuer and emit
typ: client-authentication+jwtfor rfc7523bis-11. Passissuer: metadata["issuer"]to select this profile. Calls without an issuer retain endpoint audiences in 2.x and emit deprecation telemetry. Assertiontyp:can be overridden or omitted for a legacy server. - Retry an attestation Challenge or DPoP nonce at most once each, generating fresh proofs and preserving both challenges when the server requires them.
- Validate and expose optional refresh-token expiration response durations.
- Forward DPoP and attestation Challenge callbacks during authorization-code redemption and document browser and cross-device deployment policies.
- Require patched Mint and refresh its development/test lock.
- Keep Hex dependency declarations during package tasks even when
ATTESTO_PATHis inherited from a source-development shell.
[2.5.0] - 2026-08-31
Changed
- Support both Attesto 1.x and 2.x. Attesto 2.0 changes authorization-server storage contracts that AttestoClient does not implement; the protocol and verification APIs used by this package remain compatible.
- The published package dependency is
>= 1.13.0 and < 3.0.0, so ordinary Hex resolution can select either supported Attesto major line. No AttestoClient application-code migration is required; source checkouts may opt into the coordinated Attesto 2 path withATTESTO_PATH=1.
[2.4.1] - 2026-08-27
Security
- Carry the screened IP address through every OAuth, wallet, discovery, and
JWKS request while retaining the external hostname for TLS verification,
SNI, HTTP authority, DPoP
htu, and client-assertion audiences. DPoP nonce retries reuse the same screened address. This closes the remaining DNS- rebinding interval in the shared OAuth HTTP path. - Isolate protected requests from Req application defaults and caller options that can replace routing, credentials, protocol bodies, redirects, TLS peer identity, or the screened origin. Unsafe proxies and incompatible Finch pools now fail closed; URL-keyed Req caching is disabled because different HTTPS authorities can share a pinned IP and path.
- Keep metadata and JWKS retrieval unauthenticated, force discovery requests to use GET, remove hop-by-hop request headers, and include DNS resolution and request preparation within the caller's overall deadline. OAuth POST response bodies are now bounded before decoding as well as by-reference GET bodies.
- Refresh the IPv6 special-purpose address policy from IANA's registry, rejecting the dummy, deprecated protocol-assignment, and documentation ranges and all reserved space outside conventional global unicast, while retaining ordinary globally reachable allocations.
Upgrade notes
- Protected network requests now reject caller-owned proxies, Finch pools,
adapters, and Unix sockets because they can bypass the screened destination
or its TLS identity. Applications that previously supplied one of those
routing overrides will receive
{:error, :unsafe_transport_options}and should move controlled egress routing outside the request process.
[2.4.0] - 2026-08-11
Security
- Pin discovery and JWKS connections to an address that was screened against
special-use networks, while retaining TLS SNI, certificate verification, and
the HTTP Host authority on the original hostname. This closes the DNS-
rebinding interval between the prior pre-flight lookup and the socket connect.
A host that resolves to no address is now rejected (
:blocked_host) rather than handed to the transport — the screening path is fail-closed. - Bound discovery and JWKS response bodies before JSON decoding and disable transparent response decompression on those trust-root fetches.
- Reject unsafe RSA modulus/exponent parameters from a remote JWKS before JOSE constructs bignums or attempts signature verification, preventing scheduler- pinning verification work.
- Require
attesto >= 1.13.0, carrying the matching raw-key bounds and current parser, wallet, status-list, and ID-JAG hardening into every client installation. - Make the ID-JAG builder enforce the server's signed-claim constraints before
signing: a 256-byte
jticap, validscopeandresource, exactly one supportedcnf.jktmember, and rejection of unsupportedauthorization_details.
[2.3.1] - 2026-08-03
Added
- Add an end-to-end digital wallet Livebook (
guides/digital_wallet.livemd), now rendered in the docs. Issue an SD-JWT VC PID credential, hold it, and present it to a verifier with an interactive selective-disclosure form — request onlyage_over_21and watch name and birthdate stay in the wallet. Runs entirely on the publishedattesto+attesto_clientlibraries.
[2.3.0] - 2026-08-03
Added
- Add the OID4VCI/OID4VP wallet-holder role.
AttestoClient.Walletdrives pre-authorized_code issuance end to end — credential offer, token exchange,c_nonce, holder key proof, Credential Request, and verification of each returned credential (SD-JWT VC,jwt_vc_json, or mdoc) — with support for OID4VCI 1.0 final's pluralproofs, batch issuance (a list of holder keys → one credential per key), and the §10 Notification Endpoint. - Add
AttestoClient.DPoP(RFC 9449 proof generation), threaded through the token and credential requests via a:dpopoption with ause_dpop_noncesingle retry; a DPoP-bound access token is presented with theDPoPauthentication scheme. - Add
AttestoClient.WalletAttestation(OAuth Attestation-Based Client Authentication — Client Attestation JWT + per-request PoP) and a{:client_attestation, ...}client-auth method, andAttestoClient.KeyAttestation(OID4VCI Key Attestation) carried in the holder proof'skey_attestationheader. These are the client-side mirrors of the matching attesto verifiers. - Add OID4VP presentation (
AttestoClient.Wallet.Presentation/PresentationRequest): verify a signed Authorization Request, select held credentials by DCQL, and build adirect_postvp_token(SD-JWT VC with a holder Key Binding JWT, or an ISO 18013-5 mdoc DeviceResponse).
Security
- Bind each issued credential to the holder key whose proof requested it
(thumbprint membership, one credential per proof), and fail closed with
:missing_trustedbefore any network call when no issuer trust anchor is supplied. - Scope SD-JWT claim minimisation to top-level Disclosures (digest present in
the issuer payload's
_sd), so a nested claim sharing a requested top-level name is never disclosed; refusedirect_post.jwtinsubmit/3; check the signing key against the credential's holder binding before disclosing any contents; and validate the DCQL query shape so a signed-but-malformed request cannot crash selection. - Refresh client-auth
jtis on a DPoP-nonce retry (no replay), send a single Authorization header, require an explicit audience for the client-attestation PoP, and bound by-reference fetch bodies (with decompression disabled).
[2.2.0] - 2026-07-25
Added
- Support RFC 9864
Ed25519andEd448identifiers across issuer-signed JWT verification and client artifact builders while retaining legacyEdDSA. - Add independent Node crypto parity for Ed25519 and Ed448 signatures and OIDC detached hash claims.
Security
- Bind ID Token
at_hash,c_hash, ands_hashcalculation to the verified issuer JWK. LegacyEdDSAnow selects SHA-512 with a 32-byte left half for Ed25519 and SHAKE256 with 114 bytes of output and a 57-byte left half for Ed448. - Move JARM onto the shared hardened verifier: require a unique eligible key,
honor JWK
alg,use, andkey_ops, reject RSA keys below 2048 bits, bind every algorithm to its key type and curve, and apply FAPI's Ed25519-only Edwards policy by default. An explicitaccepted_algslist remains a deliberate non-FAPI override unlessenforce_fapi_alg_policy: trueis set. - Validate every explicit outbound signing algorithm against its private key before signing, including exact Edwards curve binding.
Changed
- Require Attesto 1.3 or later for key-aware OIDC hashing and trusted-key algorithm validation.
- Keep the JOSE security floor at 1.11.12 while widening the upper-compatible range to all 1.x releases, so a future 1.x release with native OTP SHA-3 and Ed448 detection is reachable without another AttestoClient release.
[2.1.1] - 2026-07-17
Security
- Restrict the optional Plug integration to the security-patched releases on every supported minor line: Plug 1.16.6, 1.17.4, 1.18.5, 1.19.5, and 1.20.3 and later 1.x releases.
- Raise the JOSE floor to 1.11.12, excluding releases affected by
GHSA-9mg4-v392-8j68 / CVE-2023-50966, the 1.11.7-1.11.8 packages that
included development-only tooling as runtime dependencies, and the
1.11.9-1.11.10 releases with broken EC key conversion on OTP 28. JOSE
1.11.11 fixed that conversion but could encode Elixir
nilas the JSON string"nil"with OTP's built-in JSON module; 1.11.12 fixes that too. - Refresh the development lock to Mint 1.9.3, resolving EEF-CVE-2026-59249 / CVE-2026-59249.
- Extend discovery and JWKS SSRF checks across non-global IPv4, translated IPv6, deprecated site-local, and local-use NAT64 destinations while retaining globally reachable anycast and public NAT64 targets.
- Require a replay callback for every DPoP request; the former test-only acknowledgement flag can no longer disable replay protection.
- Keep internal token, DPoP, certificate, and nonce rejection reasons out of OAuth error responses.
[2.1.0] - 2026-07-16
Added
- Add
AttestoClient.ResourceServer, a supervised remote-issuer RFC 9068 JWT access-token verifier. It performs exact issuer and audience checks, strict algorithm/key selection, required claim and time validation, exact scope enforcement, optional subject/client and token-age/lifetime policy, explicit warming/readiness, and fail-closed DPoP/mTLS confirmation binding. - Add coordinated discovery/JWKS caching with bounded key count, configurable
fresh and stale intervals, transient-error-only stale-key use, single-flight
refresh, unknown-
kidrotation refresh, response-size limits, and refresh- storm throttling/backoff. - Add
AttestoClient.ResourceServer.Plugfor Bearer, DPoP, and mTLS protected resources, including fail-closed DPoP replay wiring and RFC 6750 error and insufficient-scope responses. Upstream key availability failures produce a detail-free503rather than aninvalid_tokenchallenge. - Add bidirectional PyJWT parity coverage for RFC 9068 signing and verification,
including an independently signed unknown-
kidkey-rotation flow.
Security
- Remote discovery and JWKS refreshes retain HTTPS, exact-issuer, SSRF, and redirect protections; disable Req retries and bound each coordinated refresh with an application-configured deadline.
[2.0.0] - 2026-07-16
Security
- Add a complete OpenID Connect Authorization Code flow that always uses S256 PKCE, binds callbacks to high-entropy state, nonce, and a mandatory opaque application browser-session value, validates the response issuer when supplied, atomically consumes expiring transaction state, pins the registered ID Token algorithm, and gives the code exchange a bounded deadline with retries disabled.
- ID Token verification now rejects ambiguous eligible JWKS keys and RSA keys
below 2048 bits, honors JWK
use/key_ops, validates optionalnbf, and uses constant-time nonce/subject comparisons. A missingkidremains valid only when exactly one eligible verification key exists. - Add bounded single-flight refresh-token rotation. Concurrent callers for one application key share one request and one result; timeout and worker failure wake all waiters and clear the flight.
- Require HTTPS redirect URIs except for native-client loopback HTTP redirects.
- Raise the Req dependency floor to 0.6.1, the first release patched for EEF-CVE-2026-49755 decompression-bomb denial of service.
Added
AttestoClient.AuthorizationTransaction.Storeand a bounded, single-node ETS implementation with atomic insert/consume and monotonic expiry.AttestoClient.Tokenrefresh and RFC 7009 revocation operations,AttestoClient.RefreshCoordinator,AttestoClient.TokenSet, and verified refresh ID Token results.AttestoClient.Logout.url/1for OpenID Connect RP-Initiated Logout.- Structural discovery validation for required OIDC endpoints and capability fields before an authorization flow uses them.
- Adversarial coverage for replay and concurrent state consumption, expiry, issuer/audience/nonce confusion, ambiguous or ineligible keys, weak RSA, malformed discovery, refresh races, independent refreshes, and deadlines.
- Authorization-request
max_ageis retained in the transaction and enforced against the callback ID Token'sauth_time.
Changed
- Supplying
:access_tokentoAttestoClient.IDToken.verify/2validatesat_hashwhen present but no longer requires the claim for a token-endpoint ID Token, where OIDC Core permits omission. Passrequire_at_hash: truefor front-channel or profile rules that require it. - Authorization decisions, durable token persistence, refresh-result compare-and-swap, and session-retention/termination remain application-owned.
- The Elixir floor remains 1.18: this package and its required
attestodependency both depend on Elixir's built-inJSONmodule.
Migration
AttestoClient.AuthorizationCode.start/2andcallback/3now require the same opaque:browser_binding. Generate or retain it in the initiating user agent's secure application session; callbacks with a missing or different binding consume state and fail before token exchange.- The key-selection and minimum-RSA checks intentionally reject tokens that 1.x
could accept. Applications with duplicate
kidvalues, multiple eligible kid-less keys, encryption-only verification keys, or RSA keys below 2048 bits must correct their JWKS before upgrading. - Because those security checks tighten existing public verification APIs, this release is a 2.0.0 major release.
[1.1.0] - 2026-07-07
Changed
AttestoClient.Discovery.fetch/2now compares the document'sissuerexactly against the supplied issuer (RFC 8414 §3.3 / OpenID Connect Discovery 1.0 §4.3) instead of normalising a trailing slash away. A slash-terminated path issuer (e.g. a multi-tenant issuer, or the OpenID conformance suite'shttps://.../test/a/<alias>/) was previously rejected with:issuer_mismatch; conversely, two identifiers that differ only by a trailing slash no longer match. The trailing slash is still removed when constructing the well-known request URL, as both specs require.
Added
AttestoClient.IDToken.verify/2acceptsallow_unsigned: true, an explicit opt-in for the OIDC Core §3.1.3.7 case: a client that registeredid_token_signed_response_algnoneand received the ID Token directly from the token endpoint over TLS may accept an unsigned (alg: "none") token. All claim checks still run; the signature part must be empty; signed tokens are unaffected; the default remains to reject unsigned tokens.
[1.0.0] - 2026-07-04
First stable release; the public API is now under semantic versioning. No
functional change from 0.6.0. Requires attesto ~> 1.0.
[0.6.0] - 2026-06-21
Security
AttestoClient.Discoveryhardens its discovery/JWKS fetches against SSRF: redirects are no longer followed (a 3xx surfaces as{:http_status, _}rather than being chased to itsLocation), and a URL whose host resolves to a loopback, private, link-local, or unique-local address is rejected with:blocked_host— so an attacker-influencedissuer/jwks_uricannot point a server-side fetch at an internal service or the cloud metadata endpoint. An unresolvable host is left to the transport.
Added
AttestoClient.IDToken- verify OpenID Connect ID Tokens against authorization server JWKS/discovery, including issuer, audience,azp, expiration, issued-at, nonce,max_age/auth_time, and detachedat_hash/c_hash/s_hashvalidation. Interop-tested againstAttesto.IDToken.mint/4.AttestoClient.IdentityAssertion- build Identity Assertion JWT Authorization Grant assertions (ID-JAG / EMA) with theoauth-id-jag+jwtheader and the requirediss/sub/aud/client_id/jti/iat/expclaims. Interop-tested againstAttesto.IdentityAssertion.verify/3.AttestoClient.PKCE- generate S256 PKCE verifier/challenge pairs, delegating challenge computation toAttesto.PKCE.challenge/1so generated pairs verify underAttesto.PKCE.verify/3.AttestoClient.SignedIntrospection- verify RFC 9701 signed token introspection responses against authorization-server JWKS/discovery. Interop-tested againstAttesto.SignedIntrospection.response_jwt/4.AttestoClient.UserInfo- verify signed OpenID Connect UserInfo JWT responses, including issuer/audience/subject checks and optional binding to a previously verified ID Token subject.- Internal AttestoClient.Verifier shared by the AS-signed JWT verifiers (not public API; hidden from docs).
AttestoClient.ClientAssertion- buildprivate_key_jwtclient authentication assertions (RFC 7523 / OpenID Connect Core §9), signed with the client's own key. Carries a cross-language parity test against an independent PyJWT reference verifier, plus in-family interop againstAttesto.ClientAssertion.verify/5.AttestoClient.RequestObject- build signed authorization request objects (JAR, RFC 9101 / FAPI 2.0 Message Signing §5.3.1): the caller's authorization parameters wrapped with the iss/aud/iat/nbf/exp/jti envelope and theoauth-authz-req+jwttyp, signed with the client's key. The lifetime is bounded to the FAPI 60-minute window. Parity-tested against an independent PyJWT reference and in-family againstAttesto.RequestObject.verify/3under the FAPI Message Signing policy.- Internal AttestoClient.Builder shared by the builders (not public API; hidden from docs).
AttestoClient.JARM- verify a signed authorization response (JARM, FAPI 2.0 Message Signing §5.4): JWS signature against the authorization server's JWKS (FAPI algorithm allow-list,nonerejected, kid selection), plusiss/aud/iat/exp, returning the response parameters. Parity-tested by verifying a JARM token signed by an independent PyJWT signer (the flipped external direction) and one signed byAttesto.JARM.response_jwt/4(in-family).AttestoClient.Discovery- fetch and read OAuth 2.0 / OpenID Connect authorization-server metadata and JWKS (RFC 8414 / OpenID Connect Discovery 1.0) overReq, withhttpsand RFC 8414 §3.3 issuer-match validation. Verified in-family againstAttesto.OpenIDDiscovery.metadata/2output.
Changed
- Require
attesto ~> 0.9so the client mirror can use the current ID Token, ID-JAG, PKCE, signed introspection, signing-algorithm, and hash primitives.