All notable changes to this project are documented here. The format is based on Keep a Changelog. Public functions and behaviour contracts remain compatible within 2.x where security permits; security and correctness fixes may tighten validation or derived defaults in a minor release.
[2.28.0] - 2026-11-16
Added
Attesto.Plug.ResourceAuthenticate's:principalcallback can return{:error, {:temporarily_unavailable, reason}}, the result a verifier already returns for an outage. It is answered with the same 503temporarily_unavailable, with no challenge and noRetry-After, and the reason is discarded. Until now it got 401invalid_token, which a client can take to mean its token is bad, for example while the database holding principals is unavailable. Every other result still gets 401, and an exception the callback raises still reaches the host's error handling.:principal_unavailable_send_erroron the same plug renders that 503 and lets an adapter record it as:principal_unavailable, apart from:verifier_unavailableand:policy_rejected. Without it,:send_errorrenders the response.
[2.27.0] - 2026-11-15
Breaking
Attesto.AuthorizationRequest.validate/2answersinvalid_requestwhen a parameter defined as a single string arrives as anything else: a list, a map, a number, a boolean ornil. Until nowstate,prompt,login_hintand the other optional ones were dropped as if absent. A non-stringscopeisinvalid_request, where it wasinvalid_scope. A non-stringclient_idorredirect_uriis still answered directly, since there is no trusted address to redirect to; the others are redirected. Pushed authorization requests are parsed the same way. Request Object values are unaffected: they are converted to strings before validation, as before.
[2.26.0] - 2026-11-15
Breaking
Attesto.DPoP.ReplayCachestarts only withsingle_node?: truein its start options, a statement by the host that the deployment runs one node. Without it the cache refuses to start, with or without connected BEAM peers, and it no longer accepts:multi_node_acknowledged?. ChangeAttesto.DPoP.ReplayCachein a supervision tree to{Attesto.DPoP.ReplayCache, single_node?: true}. A deployment with more than one node configures a shared:replay_checkon every node and does not supervise the cache. Until now nodes that were not connected as a BEAM cluster each kept their own cache and nothing failed at boot.- The one
Logger.errormessage is a fixed string, with the store module and the connected nodes in the Logger metadata keys:storeand:peers. The README lists the message and the formatter setting that prints the keys.
Added
Attesto.Test.LogMessages.errors/1lists theLogger.errorcalls under a directory and the literal message each one passes, for a test that keeps log messages fixed.
[2.25.0] - 2026-11-15
Breaking
Attesto.Keystore.rotation_health/2now exercises the signing key with a fixed diagnostic message and verifies it against the published public key.:signing_key_mismatchmakes the result:invalid, including signing failures. AnAttesto.Signercallback is invoked, with its latency and cost.- Private JWK signing now requires an absent
key_opsor a string list containingsign, and an absentuseorsig.Attesto.DPoP.Proof.build/4refuses incompatible usage.Attesto.Key.public_map/1omits private-key operation metadata when deriving the public half; public-only verification material retains its restrictions.
Added
Attesto.Key.validate_kid/3checks identifier requirements against the full key set before candidate filtering. Its:require_kidpolicy supports always requiring an identifier or requiring one for a set with multiple keys.Attesto.Key.import_pem/1returns matchable:malformed_keyand:unsupported_keyreasons without exposing key material. The existing raising PEM helpers remain available.Attesto.Key.signing_jwk/1accepts private JWK maps andJOSE.JWKvalues as well as PEMs and validates their signing permissions.
[2.24.0] - 2026-11-15
Breaking
Attesto.OutboundTarget.screen/2preserves the original:urland returns all checked IP tuples in:addresses, in resolution order, alongside:hostand:authority. Callers must dial those addresses throughAttesto.PinnedHTTP.Attesto.PinnedHTTP.request/2,request_inline/2andpassive_request/2take a screened target and an options list. The previous positional APIs are removed.:deadlineis an absolute monotonic millisecond deadline;:body_limit,:connect_timeout(3,000 ms) and:max_attempts(3) bound work. Failed connects retry on fresh sockets, rotating checked addresses. Nothing is retried after the request starts. Connect failures now return{:error, {:not_sent, cause}}, including:deadline_exceeded, rather than an undifferentiated transport error or timeout. Failures after the request starts return{:error, {:maybe_sent, cause}}. All three entry points use normalized transport/protocol causes,:deadline_exceeded,:too_largeor:invalid_request; no Mint error struct leaves the module. No stored data changes.
Added
Attesto.Test.CodeStoreContract,Attesto.Test.CodeStoreDelegatesandAttesto.Test.CodeStoreAgentprovide shared code-store contract tests, overridable callback delegates and an Agent-backed fixture for a host's tests.Attesto.Telemetryemits[:attesto, :http, :connect_attempt]once per connection attempt with duration, checked address, attempt number and outcome.
[2.23.0] - 2026-11-15
Breaking
Attesto.CodeStoreis now one required behaviour with explicit live, claimed and redeemed states. Reads never write; atomic claim, replay flagging and finish callbacks retain immutable bindings and redemption records, with one revocation flag for replay or grant cut-off. Access-token linkage and revocation callbacks are required. Custom stores must migrate to this contract; the upgrade guide maps every previous callback.Attesto.AuthorizationCode.redeem/4compares client, redirect URI, PKCE when challenged and DPoP when bound before any state change. A failed comparison no longer spends the code. Reuse revocation applies only to a matching presentation, including after code expiry and during token issuance. Expiry prevents claiming live codes only. This departs from the literal wording of RFC 6749 §4.1.2 so possession of a code alone cannot revoke another client's tokens.- Authorization-code redemption always requires the bound client identifier; the client-id opt-out is removed. A verifier presented for a code issued without a PKCE challenge is refused.
[2.22.0] - 2026-11-15
Added
Attesto.Plug.ProtectResourceprotects one OAuth resource in one plug: resource-bound authentication, principal loading and per-route scopes, withprepare/1,authenticate/2andauthorize/3for a route that decides its scopes per request.Attesto.Plug.ResourceAuthenticateandAttesto.Plug.ResourceScopesare the two steps on their own.resource_audience: :resourcederives the token audience from a pinned:base_urlor:originand the:resource_path; the requestHostnever chooses it. An explicit audience policy is required, a mount that accepts DPoP needs its pin at boot, and anhttppin is accepted only on a loopback host underallow_http: true.Attesto.ResourceMetadatabuilds an RFC 9728 document per resource andAttesto.Plug.ResourceMetadataserves it, publicly cacheable only when the resource is statically pinned. Each resource declares its own:scopes_supported.
[2.21.0] - 2026-11-15
Breaking
Attesto.SigningAlg.infer/1andAttesto.Federation.EntityStatementinfer the RFC 9864 identifiers"Ed25519"and"Ed448"for OKP keys, where 2.20.0 inferred"EdDSA". A host with an Ed25519 or Ed448 signing key and no explicit algorithm signs new tokens with the curve-specific identifier and publishes it as the JWKSalg; keeping the same key does not keep the old identifier. Verification accepts"EdDSA"and the curve-specific identifier for an OKP key on the matching curve, within any explicit:accepted_algs, so tokens signed before the upgrade still verify. A relying party whose JOSE library does not know the RFC 9864 identifiers rejects the new tokens; set"EdDSA"in keystore metadata to keep the old identifier.Attesto.SdJwtVc.verify/3,Attesto.Mdoc.verify/3,Attesto.Mdoc.verify_device_response/4andAttesto.VpToken.verify/2fetch and enforce a credential's status reference by default, throughAttesto.StatusList.fetch/3. A revoked or suspended credential, an invalid list and a failed fetch are errors.resolve_status: falseskips the check for offline inspection; a 1- or 2-arity function replaces the fetch. Status1returns:credential_revoked,2returns:credential_suspended, and any other non-zero value returns{:credential_status, value}.Attesto.SdJwtVcfollowsdraft-ietf-oauth-sd-jwt-vc-26:issue/2emits andverify/3acceptstyp: "dc+sd-jwt"only."vc+sd-jwt"is refused.Attesto.ClientIdMetadatafollowsdraft-ietf-oauth-client-id-metadata-document-03. It refuses a Client Identifier URL whose path is"/"; treats a document with neithertoken_endpoint_auth_methods_supportednortoken_endpoint_auth_methodas"none"; prefers the plural member and refuses a singular value that is not in it; refuses symmetric methods in either member; requiresjwksorjwks_uriforprivate_key_jwtand refuses both together; and refuses a redirect URI whose query carries an authorization request or response parameter.Attesto.AuthorizationRequest.resolve_request_object/2andvalidate/2answer:invalid_request_objectfor analg: "none"request object whenrequire_request_object: trueis set, where they answered:request_not_supported.
Added
Attesto.StatusListverifies JWT and CWT status lists and ISO mdoc identifier lists (check_status/4,verify_cwt/3,verify_identifier_list_cwt/3) and issues the CWT forms (issue_cwt/4,issue_identifier_list_cwt/4).fetch/3is a bounded HTTPS fetcher: it screens the target address, pins the connection, refuses redirects, requires the requested media type, and needs the optional:mintdependency.Attesto.Mdocreads and issues MSO status references and exposespeek_status/1.Attesto.StatusList.Cacheholds lists fetched by the default fetcher. Only a list that verified is stored, a hit is verified again under the caller's trust, and an entry expires at the earliest of its signedttl, its signedexpand five minutes. It holds at most 64 entries and 16 MiB. A custom resolver is cached only withcache_status: true.Attesto.CredentialEncryption: OpenID4VCI 1.0 Credential Request decryption and Credential Response encryption (ECDH-ES on P-256 with A128GCM or A256GCM), recipient key validation, and thecredential_request_encryptionandcredential_response_encryptionmetadata blocks. A wallet may requestzip: "DEF"for the response;Attesto.JWE.encrypt_deflated/4compresses outbound plaintext only, and every inbound JWE path still refuseszip.Attesto.CredentialIssuerMetadataaccepts:credential_request_encryptionand refuses a key that carries private JWK members.Attesto.IdentityAssertion.sign/3signs a JWT authorization grant as the configured issuer, withtyp: "oauth-id-jag+jwt"by default or"JWT"for a plain RFC 7523 grant used in identity chaining. Missing or malformed attributes return:missing_claimor:invalid_claims.Attesto.PinnedHTTP: a one-shot Mint connection to a caller-screened address that keeps TLS SNI and hostname verification on the original host, with bounded response reads. Requires the optional:mint >= 1.10.2 and < 2.0.0.Attesto.CodeStorehas an optionalpending_revoked?/1callback, implemented byAttesto.CodeStore.ETS.Attesto.AuthorizationCode.issue_refresh_and_finalize/6uses it to revoke the refresh family and access token of a code that was taken before a subject, client or session revocation and finalized after it. A custom store that does not implement the callback keeps that race.Attesto.X509.verify/2returns the selected:trust_anchor.Attesto.Cose.peek_headers/2;Attesto.Cose.sign1/3takes:typ,:taggedand:protected_x5chain;Attesto.Cose.verify1/3takes:allow_tagged.Attesto.DPoP.Proof.build/4andAttesto.DPoP.verify_proof/2takeallow_http: trueto accept anhttphtuon a loopback host.Attesto.Plug.Authenticate.normalize_options/2validates plug options for a wrapper plug that supplies:htuper request.Attesto.Scope.new_catalog/2takes:hierarchy, a map from a broader scope to the scopes it implies;Attesto.Plug.RequireScopestakes:scope_hierarchy.Attesto.RedirectURI.reserved_query_params/0andreserved_query_param?/1detect a redirect URI whose query carries an authorization request or response parameter.Attesto.ClientIdMetadata.auth_methods/1returns the token endpoint authentication methods a CIMD document declares.
Changed
Attesto.StatusList.verify/3andAttesto.SdJwtcompare thetypheader as a media type, so"application/statuslist+jwt"and"application/dc+sd-jwt"are accepted beside the short forms.- ID tokens, request objects, SIOP, credential proofs and requests, key attestations and federation statements share one implementation of audience, nonce, expiry and trusted-key signature checks.
[2.20.0] - 2026-11-14
Security
Attesto.Plug.Authenticate.init/1now raisesArgumentErrorwhen DPoP is accepted (accepts_dpop?/1: a 2-arity:replay_checkfunction ordpop_replay_unprotected_acknowledged?: true) without a pinned:originor a 1-arity:htucallback, or when:htuis not a 1-arity function. It no longer falls back to the requestHostheader, and anilreturn from:htuis refused. Bearer-only mounts (where DPoP replay checking is omitted anddpop_replay_unprotected_acknowledged?is nottrue) are unaffected.Attesto.PairwiseSubjectnow restrictssector_identifier/1to non-loopbackhttpsredirect URIs sharing one host and providesseal_subject/3/unseal_subject/3(block-padded AES-256-GCM with per-token derived keys andpairwise_subAAD) soAttesto.Token.mint/3(via:pairwise) carries the derived pairwisesubin pairwise access tokens instead of exposing the host subject to pairwise clients. Same-deployment callers verifying pairwise tokens viaAttesto.Token.verify/3must pass:pairwise_subject_salt.Attesto.X509.verify/2now enforces constraints (includingBasicConstraints,KeyUsage,pathLenConstraint, andNameConstraints) on both self-signed and non-self-signed CA trust anchors via:public_key.pkix_path_validation/3, refuses non-CA certificates used to issue chains, enforces CAdNSNameNameConstraintsagainst leafuniformResourceIdentifierSAN hosts unless the CA defines a permitted URI subtree, rejects MD5 and SHA-1 signatures anywhere in the chain, and returns:untrusted_certificateunder:haipwhen the leaf is self-signed or any chain certificate matches a trust anchor (was:invalid_certificate).Attesto.Key.public_map/1andAttesto.Coserefuse JWK Sets (%{"keys" => _}) where a single JWK is expected.Attesto.CIBAboundsbinding_messageby UTF-8 byte length rather than only grapheme count and rejects C1 control characters in CIBA display text.Attesto.ClientIdMetadatarequires a non-emptygrant_typeslist in client metadata documents.Attesto.IPAddressrefuses IPv4-mapped networks and IPv6 zone IDs in CIDR lists.Attesto.SessionState.origin/1refuses userinfo and percent-encoded hosts in origin comparison.Attesto.DeviceCodeStore.ETS,Attesto.CIBAStore.ETS, andAttesto.PreAuthorizedCodeStore.ETSimplementdelete_unconsumed/1for subject, client, and session revocation across unconsumed pending and approved grants.
Breaking
Attesto.Plug.Authenticate.init/1requires:originor:htuat boot whenever the mount accepts DPoP (:replay_check2-arity function ordpop_replay_unprotected_acknowledged?: true).Attesto.Token.verify/3requires:pairwise_subject_saltwhen verifying access tokens carrying the sealed"attesto.pairwise_subject"claim; otherwise verification fails closed with:invalid_claims.Attesto.PairwiseSubject.sector_identifier/1refuses non-httpsand loopback redirect URIs.Attesto.X509.verify/2rejects MD5 and SHA-1 signatures anywhere in the chain and refuses non-CA trust anchors used as issuers.Attesto.ClientIdMetadatarejects metadata documents with emptygrant_types.Attesto.CIBArejects C1 control characters in CIBA display text.Attesto.IPAddress.parse_cidrs!/1rejects IPv4-mapped networks and zone IDs.Attesto.SessionState.origin/1rejects userinfo and percent-encoded hosts.
Added
- Shared cross-package helpers on core modules:
Attesto.AuthorizationRequest:check_auth_time/4,check_nonce/2,resolve_request_object/2Attesto.CIBA.Request.valid_acr_value?/1Attesto.Claims:storable_text?/1,no_terminal_controls?/2Attesto.Cose.alg_id/1,Attesto.Key.public_map/1,Attesto.JWE.peek_protected_header/1,Attesto.Mdoc.decode_issuer_signed/1,Attesto.Mdoc.extract_x5chain/1Attesto.IPAddress.unmap_ipv4/1Attesto.Plug.Authenticate:accepts_dpop?/1,classify_refusal/2(classifying HTTP503responses as:verifier_unavailablebefore inspecting"error"),sender_constraint_reasons/0,origin_htu/2,expected_htu/2,parse_authorization/1Attesto.Plug.OAuthError.format_challenge/2Attesto.ProtectedResourceMetadata:well_known_path/1,well_known_uri/1Attesto.URI:origin/1,same_origin?/2,origin?/2,issuer_identifier?/2,valid_percent_encoding?/1Attesto.PresentationRequest.valid_dcql_id?/1andAttesto.VpToken:dcql_value_matches?/2,resolve_json_path/2Attesto.X509:max_cert_bytes/0,max_chain_length/0,max_trust_anchors/0(64),valid_trust_anchors?/1,x509_hash_client_id/1Attesto.PairwiseSubject:seal_subject/3,unseal_subject/3,sealed_claim/0:pairwiseoption onAttesto.Token.mint/3- Size limit accessors (
max_proof_bytes/0,max_cbor_bytes/0,max_assertion_bytes/0,max_presentation_bytes/0,max_key_binding_bytes/0,max_protected_segment_bytes/0,max_signature_segment_bytes/0,max_request_object_bytes/0,max_attestation_bytes/0,max_pop_bytes/0,max_jti_length/0,max_status_list_token_bytes/0,max_token_bytes/0)
[2.19.0] - 2026-11-13
Added
Attesto.URI.put_query_params/3adds response parameters to a registered redirect URI's query. A registered pair whose name the response sets, or that:replacenames, is dropped first; every other registered pair is kept byte for byte (RFC 6749 §3.1.2). A registeredhttps://rp.example/cb?state=staticno longer yields?state=static&state=abc123, where a first-value parser reads the registered value.
Fixed
Attesto.EndSession.confirm_redirect/2replaces astatealready in the registeredpost_logout_redirect_uriinstead of adding a second one, andAttesto.FrontChannelLogout.logout_uri/3does the same forissandsid.
[2.18.0] - 2026-11-12
Added
Attesto.AuthorizationRequest.check_prompt_login/4checks whether a host'sauth_timesatisfiesprompt=loginagainst a supplied request or park time, with explicit allowance, current-time, and future-skew options. The function has no clock or store side effects (OpenID Connect Core §3.1.2.1, §3.1.2.3).Attesto.EndSession.parse/3andAttesto.IDToken.verify_logout_hint/3acceptrequire_typ: true, off by default. Missing required types use the existing invalid-hint/type errors. JWT media typesJWTandapplication/jwtare accepted case-insensitively by ID Token verification (RFC 8725 §3.11; RFC 7515 §4.1.9).- Optional
Attesto.RefreshStore.with_family_lock/2callback serializes retry recovery with rotation and revocation. Recovery re-reads the parent and successor under the lock when available (RFC 9700 §4.14.2; RFC 7009 §2.1). Store behaviours document the code/refresh-table and family lock order.
[2.17.0] - 2026-11-12
Added
Attesto.VpToken.verify/2andAttesto.Mdoc.session_transcript/1accept:dc_api_originto select the Digital Credentials API mdoc handover from OpenID4VP 1.0 §B.2.6.2. It binds the exact origin without anorigin:prefix, nonce, and response encryption key thumbprint when present. Redirect verification remains the default (§B.2.6.1).- mdoc issuerAuth verification accepts ES384/P-384 and ES512/P-521 through
:accepted_algs, following ISO/IEC 18013-5:2021 §9.1.2.4 and RFC 9053 §2.1. ES256 remains the default. Algorithm/curve mismatches return:algorithm_key_mismatch, including for validated X.509 leaf keys. Device authentication remains ES256/P-256 only (§9.1.3.6).
[2.16.0] - 2026-11-12
Fixed
- In 2.15.0,
:trusted_certificateswas reachable only throughAttesto.SdJwtVc.verify/3.Attesto.VpToken.verify/2andAttesto.PresentationSessionignored it and verified with the configured issuer keys instead, without error. Certificate trust combined with issuer keys or an issuer-key resolver now raisesArgumentError.
Added
Attesto.VpToken.verify/2accepts:trusted_certificatesas a third, mutually exclusive issuer trust source, with:certificate_trustand:haipoptions.Attesto.PresentationSessionstores DER anchors as{:trusted_certificates, anchors}and forwards those two verification options without storing the callback.Attesto.Mdocvalidates issuerAuth'sx5chain(COSE label 33) against configured anchors and verifies the signature using only the validated leaf key (ISO/IEC 18013-5:2021 §§9.1.2.4, 9.3.1–9.3.3). A missing or malformed chain is an error. No certificate-name binding to docType is imposed; the MSO-to-document docType check remains (§9.3.1 step 4). The defaulthaip: truerefuses self-signed leaves and embedded anchors; HAIP 1.0 §6.1.1 directly specifies these restrictions for SD-JWT VC, while ISO Annex B.1.1 excludes the IACA root from mdocx5chain.
[2.15.0] - 2026-11-12
Security
Attesto.CoseandAttesto.Mdocrefuse CBOR in which a map repeats a key. A COSE_Sign1 whose protected or unprotected header named a label twice was accepted: the general-purpose decoder builds a map as it reads, so one of the two entries was dropped before any check ran, and with two different values the one kept was whichever came last. RFC 9052 §3 says "if a label appears multiple times, the message MUST be rejected as malformed". The same applied to every map in an mdocDeviceResponse,IssuerSignedstructure and Mobile Security Object. All of them are now decoded throughAttesto.StrictCBOR, and such input is:invalid_coseor:invalid_mdoc. Two keys count as the same when they decode to the same value, so a key repeated in a non-minimal or indefinite-length encoding is refused too.Attesto.Mdoc.verify_device_response/4checks device-signed data elements against the Mobile Security Object'skeyAuthorizations. ISO/IEC 18013-5 §9.1.3.4 says "the mdoc reader shall validate this authorization as part of validating the mdoc authentication". Until now aDeviceSignedelement in any namespace was returned indevice_namespacesas long as the device signature verified. An element whose namespace is not authorized in full and which is not listed by name for its namespace is now refused with{:error, :unauthorized_device_element}. A presentation with no device-signed elements is unaffected.Behaviour change: a credential whose issuer set no
keyAuthorizationsauthorizes no device-signed element, so a presentation of it that carries one is refused where it used to be accepted.Attesto.VpTokenevaluates DCQL claims against issuer-signed namespaces only, so query results do not change; a host that readsdevice_namespacesis affected.Attesto.SdJwt.verify_key_binding/3enforces a Key Binding JWT'sexpandnbfwhen the holder included them. Onlyiatwas read, so a binding with anexpin the past, annbfin the future, or a non-numeric value for either was accepted while itsiatwas within the freshness window (300 seconds by default). RFC 9901 §7.3 requires the Key Binding JWT to be "a valid JWT in all other respects, per [RFC7519]", and RFC 7519 §4.1.4 / §4.1.5 say a JWT MUST NOT be accepted on or afterexpor beforenbf. Both are checked with the 60 seconds of clock allowanceiatalready had, and a value that is not a non-negative integer is refused. Both claims remain optional.
Fixed
Attesto.StatusList.verify/3refuses a status list whose ZLIB stream is cut short. The stream was read as a complete, shorter list: entries in the part that survived answered with their real values and an index in the missing part failed as out of range. No index could be read as a different status than the full list gives, and the list is inside the issuer's signature, so only the Status Issuer can produce one. It is now:invalid_status_list, as a list that fails its checksum already was. Bytes after the end of a complete stream are still ignored.
Added
Attesto.StrictCBOR.decode/2decodes one CBOR data item and refuses a map with a repeated key at any depth, input nested deeper than:max_depth(default 32), trailing bytes, and input longer than:max_bytes. It is the CBOR counterpart ofAttesto.StrictJSON.Attesto.Mdoc.issue/1takes:key_authorizations(:name_spacesand/or:data_elements) and writes it to the Mobile Security Object'sdeviceKeyInfo.keyAuthorizations(ISO/IEC 18013-5 §9.1.2.4). An issuer that wants holders to present device-signed elements has to set it.Attesto.Mdoc.verify/3returns the authorizations as:key_authorizations.Attesto.X509.verify/2validates a leaf-first DER certificate chain against explicit trust anchors using OTP PKIX and returns the verified leaf public JWK and authority key identifiers. It bounds chain length and certificate size, enforces signing key usage and RSA parameters, supports the mdoc document-signer purpose, and applies optional host policy after validation.decode_x5c/1decodes bounded JOSE certificate chains.haip: truerefuses self-signed leaves and embedded trust anchors (HAIP 1.0 §6.1.1).Attesto.X509.matches_issuer?/2binds a validated leaf to an HTTPS issuer using URI SANs first, then DNS SANs only when no URI SAN exists. SD-JWT VC draft -08 §3.5 describes both name forms but gives neither precedence; URI precedence is an explicit stricter policy. HAIP references draft -13 §3.5, which identifies the issuer by its certificate subject. Draft -26 §2.5 permits issuer binding policy and does not authenticateissmerely from a trusted certificate path.Attesto.SdJwtVc.verify/3accepts:trusted_certificatesto opt intox5cpath validation, leaf-key signature verification, and binding to a required signediss. This mode defaults tohaip: true, accepts an additional:certificate_trustcallback, and never falls back to caller-supplied keys. Verification without this option retains the existing behavior.
[2.14.0] - 2026-11-11
Changed
Attesto.Token.verify/3checks the JOSE headertypof an access token. RFC 9068 §4 says a resource server MUST verify that the headertypisat+jwt(orapplication/at+jwt) and reject any other value. Until now only thetypclaim was checked. The expected value isconfig.access_token_header_typ, compared case-insensitively with an optionalapplication/prefix (RFC 7515 §4.1.9); a mismatch or a missing header is{:error, :invalid_typ}. Refresh tokens carry no headertypand are not held to one, and a configuration withaccess_token_header_typ: nilskips the check.Behaviour change: an access token without the header is refused. That is a token minted by a release from before the header existed, a token minted while
access_token_header_typwasniland verified after it was set, or a hand-built token that never carried one.Attesto.Token.mint/3sets the header by default (access_token_header_typ: "at+jwt"). Access tokens live 15 minutes by default, so refusals of older tokens stop within one token lifetime of the upgrade.Attesto.OutboundTarget.screen/2withallow_loopback: trueacceptshttponly when every address the host resolves to is a loopback address. The option was documented as a development escape hatch for loopback, but it also let plainhttpreach a public address.Attesto.URI.https_identifier?/2refuses a host that contains a percent-encoded character (https://auth.example%20evil/) or an empty label (https://auth.example../). Neither is a name any issuer or endpoint metadata carries, and a host that reads as a name only after decoding is not the name it appears to be. One trailing dot, the fully qualified form, is still accepted. An upper-case scheme (HTTPS://) was and is accepted: it is lower-cased when the value is parsed (RFC 3986 §3.1).Attesto.OutboundTarget.screen/2applies the same host rule and returns{:error, :invalid_url}. An OpenID Federation Entity Identifier with such a host is no longer an identifier, so an Entity Statement naming one cannot be built.Attesto.AuthorizationRequest.validate/2answers arequestparameter given more than once (a list or map value) with a redirectableinvalid_request(RFC 6749 §3.1). It used to ignore the parameter and process the outer parameters as though no Request Object had been sent. An emptyrequestis still treated as omitted, as that section requires.
Added
Attesto.AuthorizationRequest.validate/2takesrequest_objects_supported: falsefor a server that does not support therequestparameter. A request carrying a Request Object is then answeredrequest_not_supported(OIDC Core §3.1.2.6). The default,true, keepsinvalid_request_objectfor an object that cannot be verified, including one from a client with no usable keys.Attesto.OutboundTarget.screen/2takesallowed_cidrs:, a list of CIDR blocks naming non-public networks a destination may resolve into, for a service reachable only at a private address. Every resolved address must be public or inside a listed block. There is no host-name form: allowing a name would trust its DNS answer. The list is an SSRF exception the operator takes on, and it never applies to plainhttp.Attesto.IPAddress.parse_cidrs!/1andin_any_cidr?/2. Parsing refuses a malformed block, a block with host bits set, and a zero-length prefix, which would match every address.Attesto.URI.valid_host?/1andloopback_host?/1, and theallow_loopback_http: trueoption ofhttps_identifier?/2, which acceptshttponly forlocalhostand literal loopback addresses.
Documentation
Attesto.RefreshTokenstates what happens when a consumed refresh token is presented under another client: the family is revoked, as for any reuse (RFC 9700 §4.14.2), and the client is not consulted first. A public client has no credential behindclient_id, so a check would stop nothing, and for a confidential client a consumed token under another client is the leak signal reuse detection exists for. An unconsumed token presented with the wrong client still fails with:client_mismatchand is left untouched.
[2.13.0] - 2026-11-11
Changed
Attesto.AuthorizationRequest.supported_response_modes/0includes"form_post"(OAuth 2.0 Form Post Response Mode), after"query".validate/2acceptsresponse_mode=form_postunless:response_modes_supportedleaves it out; it used to answer a redirectableinvalid_request. Rendering the form is the authorization endpoint's work. Plainfragmentstays unsupported.
Fixed
Attesto.ProtectedResourceMetadata.metadata/2omits a member whose value is an empty list. It used to publish the empty array, and RFC 9728 §3.2 says "Parameters with zero values MUST be omitted from the response".bearer_methods_supportedis the exception and is still published as[]: §2 gives that value a meaning of its own, that no bearer methods are supported.
Added
Attesto.PairwiseSubjectholds the two pairwise subject identifier rules of OpenID Connect Core §8.1:sector_identifier/1(the one host a client's redirect URIs share;sector_identifier_uriis not implemented) andderive/3(HMAC-SHA256 of the sector identifier and local subject under a salt of at least 32 bytes).Attesto.OpenIDDiscovery.metadata/2accepts:subject_types_supported(default["public"]) and:userinfo_signing_alg_values_supported, andAttesto.OpenIDDiscovery.signing_algs/1is public.Attesto.SignedUserInfo.response_jwt/4signs a UserInfo response for a client that registereduserinfo_signed_response_alg, withissandaud(OpenID Connect Core §5.3.2). It refuses any algorithm other than the current signing key's.Attesto.Plug.Authenticate.accepts_dpop?/1reports whether a plug built from the given options can accept a DPoP request::replay_checkis wired, ordpop_replay_unprotected_acknowledged?: trueis set. It is the rule the plug already applied, now public so resource metadata can advertise DPoP only where the plug accepts it.Attesto.CodeStorehas an optionaldelete_unconsumed/1callback andAttesto.RefreshStorean optionalrevoke_families/1callback. Each takes criteria (:subject,:client_idand/or:sid, ANDed) and returns{:ok, count}: the unredeemed codes deleted, or the families revoked.Attesto.CodeStore.ETSandAttesto.RefreshStore.ETSimplement them. Redeemed codes keep their reuse markers. Neither callback touches access tokens already issued; a self-contained JWT access token stays valid until it expires unless the protected resource consults introspection or a denylist.Attesto.RevocationCriteriavalidates those criteria and decides whether a stored grant matches them. Empty criteria are refused.:sid_claimnames the claims member that holds the session identifier (default"sid").Attesto.EndSession.parse/3takeson_invalid_hint: :discard. Anid_token_hintthat fails verification then yields a request withid_token_hint: :invalidand no client, subject,sid,post_logout_redirect_uriorstate, so the OP can ask the End-User whether to log out and never redirects for it (RP-Initiated Logout 1.0 §2, §4). The default,:reject, returns{:error, :invalid_id_token_hint}as before.%Attesto.EndSession{}has an:id_token_hintfield::verified,:absentor:invalid.Attesto.AuthorizationRequest.check_auth_time/4checks an authentication event against a validated request'smax_age(OIDC Core §3.1.2.1). It returns:ok, or{:error, :auth_time_required | :invalid_auth_time | :max_age_exceeded}.:allowanceadds seconds tomax_agefor an authorization server that re-authenticated the End-User and came back to finish the same request;:future_skewbounds anauth_timeahead of the clock. A request withoutmax_agealways returns:ok.Attesto.AuthorizationRequest.validate/2accepts:response_modes_supported, a non-empty subset ofsupported_response_modes/0. A request for a mode outside the list is a redirectableinvalid_request. A request with noresponse_modeasks forquery, so it is refused the same way when"query"is not listed. A redirectable error is delivered in the requested mode only when that mode is in the list. Without the option every supported mode is accepted, as before.response_modes!/1checks such a list and raisesArgumentErrorfor a bad one.Attesto.AuthorizationRequestcarriesid_token_hintandlogin_hint(OIDC Core §3.1.2.1) as the client sent them,nilwhen absent. After a pushed authorization request the raw parameters hold onlyrequest_uri, so the validated request was the only place a host could not read them.id_token_hintis not verified byvalidate/2; a host that acts on it verifies it first.Attesto.IDToken.max_lifetime_seconds/0returns the longest ID Token lifetimemint/4issues (3600 seconds), so a layer that exposes the lifetime as configuration can validate against it.
[2.12.0] - 2026-11-09
Security
- Refuse a JWK that carries a
keysmember wherever one key is expected. JOSE parses a map with bothktyandkeysas the outer key with the inner keys attached, andAttesto.JWS.verify_trusted/4expanded any map with akeyslist into those keys. A proof whosejwkheader named one key and listed another underkeyswas therefore validated and thumbprinted as the first key and signature-checked against the second. Anyone who knew a public key could pass proof of possession for it with a key of their own:Attesto.DPoP.verify_proof/2returned thejktof a key that had not signed the proof, so a party holding a DPoP-bound access token could present it without the bound private key.Attesto.Siop.verify/2accepted a Self-Issued ID Token for a subject whose key had not signed it.Attesto.CredentialProof.verify_jwt/2returned the named key as the proven key, including underrequire_key_attestation: truewhen the attestation covered only the named key. A credential issued to the returnedjwkcarried thekeysmember incnf, and its SD-JWT key binding then verified against the inner key.- The wallet attestation proof of possession in
Attesto.WalletAttestationpassed its key the same way.Attesto.Key.verification_jwk/2now returns:malformed_jwkfor a map with akeysmember or without a stringkty,verify_trusted/4treats a map withktyas one key, and those verifiers pass their key as a one-element list so it is never expanded.
- Return an error instead of not terminating when a JWK Set is given where one
JWK is expected. JOSE does not return from its thumbprint or public-map
conversion for a set, an empty one included, so a
jwkheader such as{"keys": []}, or akty-bearing key with a nested{"keys": []}, held the verifying process until its caller timed out. This was reachable without authentication through the DPoP, OpenID4VCI proof and SIOP verifiers,did:jwkresolution, and thejwksof a self-signed Entity Configuration.Attesto.Thumbprint.of_jwk/1returns:malformed_jwk,Attesto.Did.resolve/2returns:invalid_jwk,Attesto.SigningAlg.infer/1raisesArgumentErrorfor a parsed set, andAttesto.JWE,Attesto.JwtVcand the COSE verifier refuse the map before parsing it. Attesto.Plug.Authenticatebuilt the URI a DPoP proof'shtuis compared against from the request's scheme,Hostheader, and port unless an:htucallback was given. A resource server that answers requests whatever theirHosttherefore accepted a proof made for a different server: a party that received a DPoP-bound access token and its proof, for a token whose audience this server also accepts, could replay both here with the other server's name inHost. RFC 9449 §4.3 binds the proof to its target URI to prevent exactly this. The new:originoption names the origin clients address the resource server by, such as"https://api.example"; with it, thehtuis that origin followed by the request path, and the request's scheme,Host, and port are not consulted. The default is unchanged because the configuration does not say where a resource server is reachable. A host that accepts DPoP-bound tokens through this plug should set:origin, or:htuwhen it answers on several origins or behind a path-rewriting proxy.init/1raisesArgumentErrorfor an:originthat is not anhttpsURL with a host and no path, userinfo, query, or fragment, and when both:originand:htuare set.- Match OpenID Federation naming constraints against a host that HTTP
clients resolve the same way.
Attesto.Federation.TrustChain.validate/3compared each Entity Identifier's host asURI.parse/1returns it, with percent-encoding intact, so a Subordinate Statement could name an entity inside anexcludeddomain by escaping part of its host:https://leaf.bad%2eexamplepassed an exclusion of.bad.example, and common HTTP clients decode that host toleaf.bad.example. On thepermittedside, a host such asevil.test%2F.good.examplematched.good.exampleby suffix. A host that is not a DNS name of letter, digit, and hyphen labels, the syntax the constraints themselves must use, now satisfies no naming constraint, and the chain fails with:constraint_violationwhen a naming constraint applies to it. Under a naming constraint this also refuses a host containing_or an IPv6 literal. Chains without naming constraints are unaffected. - Refuse a
did:webpath segment that percent-decodes to.or.., or to a value containing/or\.Attesto.Did.resolve/2refused the literal dot-segments but returned{:needs_fetch, "https://example.com/%2e%2e/%2e%2e/admin/did.json"}fordid:web:example.com:%2e%2e:%2e%2e:admin, and a URL ending in/a%2Fb/did.jsonfordid:web:example.com:a%2Fb. RFC 3986 makes%2eequivalent to., and a server or proxy that decodes the path before removing dot-segments, or that splits on a decoded slash, serves a document outside the path the DID names. A host that allow-listsdid:webdocuments by path prefix relied on that not happening. These DIDs now return{:error, :invalid_web_did}, with or without a:resolver.
Added
Attesto.Key.single_jwk_map?/1, the check the fixes above share: a map with a stringktyand nokeysmember.
Changed
Attesto.DPoP.allowed_algs/0caches the algorithms it discovers from the JOSE backend, keyed by that backend's configuration: the crypto fallback setting, the Curve25519, Curve448, and SHA-3 modules, and FIPS mode.Attesto.DPoP.verify_proof/2also refuses analgoutside its fixed list before consulting the backend. Unlessprime_allowed_algs/0had been called, every proof, an unauthenticated one withalg: "none"included, ranJOSE.JWA.supports/0before its signature was checked, and that call costs more than verifying an ES256 proof. A backend change made through JOSE's or:crypto's functions is still picked up on the next call.clear_allowed_algs_cache/0now drops the cached result so that the next call discovers it again, rather than switching to discovery on every call;prime_allowed_algs/0still pins a snapshot that ignores backend changes.
Fixed
- Pass over a key in a trusted JWK Set that is well formed but cannot verify
a signature, instead of treating the whole set as malformed. A client or
identity provider that published an encryption key beside its signing keys
(
use: "enc",key_opswithoutverify, analgsuch asRSA-OAEPorECDH-ES, or an X25519 or X448 key) got:invalid_signaturefor every assertion fromAttesto.ClientAssertion.verify/5andAttesto.IdentityAssertion.verify/3, even when the headerkidselected the signing key. The wallet attestation, key attestation, request object, JWT VC, and trust mark verifiers rejected such a set the same way. RFC 7517 §5 has a reader ignore these keys, and keys of a type it does not implement. They are now skipped, and the signature is checked against the remaining keys. A key that is not a single public JWK, carries private members, cannot be parsed, or has ause,key_ops, oralgmember of the wrong JSON type still makes the set fail. Entity Statement verification keeps requiring every key in a federationjwksto be a signing key. - Verify a trusted JWK that has no
algmember with any algorithm its key type and curve support, within the verifier's accepted algorithms. Such a key was bound to the one algorithmAttesto.SigningAlg.infer/1derives, RS256 for RSA andEdDSAfor Ed25519, so a correctly signed JWS under another algorithm returned:invalid_signature. An RSA client key withoutalgcould not authenticate with any algorithm under the default FAPI list ofAttesto.ClientAssertion.verify/5, which excludes RS256, and an Ed25519 key withoutalgrefused the RFC 9864Ed25519identifier. RFC 7517 §4.4 places no restriction on a key that omitsalg. Such a key is now tried with the algorithm in the JWS header when its type can verify it, and is passed over when it cannot; the accepted list still decides which algorithms are used, and a key with analgmember is used with that algorithm only. - Accept an OpenID Federation Trust Chain that ends with the Trust Anchor's
Entity Configuration. OpenID Federation 1.0 §4 has a chain end with that
configuration and lets it be omitted, but
Attesto.Federation.TrustChain.validate/3accepted only the abbreviated form and returned:broken_trust_chainfor the full one. A trailing self-issued statement after at least one Subordinate Statement is now verified with the out-of-band Trust Anchor keys, itsjwksverify the Trust Anchor's Subordinate Statement, it must configure the issuer of that statement, and itsexpcounts toward the chain'sexp. - Keep the full grant on a rotated refresh token when the refresh request
names a narrower
scopeorresource.Attesto.RefreshToken.rotate/3stored the requested subset as the successor's scope and resource set, so one down-scoped refresh permanently removed the rest of the grant from the family. RFC 6749 §6 requires a new refresh token's scope to be identical to the presented token's, and RFC 8707 §2.2 keeps a refresh token bound to the full original grant. Rotated refresh tokens now keep the full grant: the successor copies the parent's scope and resource set unchanged, and the requested subset applies only to the returnedcontext, which the caller mints the access token from. A later refresh can obtain the full grant again. A request outside the grant is still:invalid_scopeor:invalid_targetand does not consume the token. A lost-response retry inside:rotation_grace_secondsno longer has to repeat the original request's scope and resource: it receives the same successor and acontextfor its own requested subset, while a retry from another client or binding, or one requesting anything outside the grant, still revokes the family.Attesto.RefreshStore.ETS.rotate/4returns{:error, :invalid_rotation}for a child whose scope or resource set differs from its parent's. TheAttesto.RefreshStorecallbacks are unchanged, and an adapter that accepted a narrower child needs no change.
[2.11.0] - 2026-11-05
Security
Refuse a
cnfclaim that is present with a JSONnullvalue, inAttesto.Token.verify/3andAttesto.Token.check_confirmation/2(:unsupported_confirmation) and inAttesto.JwtVc.verify/3(:invalid_cnf). Both lookedcnfup withMap.get, so anilvalue read as an absent claim: an access token passed as an unbound bearer token and a JWT VC as a credential with no holder binding. Whether a verifiednullarrived asnildepended on JOSE's JSON backend. The builtin OTP backend, JOSE's default on OTP 27 and later, decodes it as:null, which was already refused; Jason and Poison, selected on earlier OTP releases or throughconfig :jose, json_module: ..., decode it asnil. Claims returned by anAttesto.Plug.Authenticate:verifycallback were affected under any backend when the callback decoded them itself with a decoder that mapsnulltonil, such asJSON.decode/1.Distinguish a present JSON
nullfrom an omitted member in these checks, where an omitted member means "no restriction", so a null can no longer stand in for absence:- OpenID Federation
constraintsmembersmax_path_length,naming_constraints, andallowed_entity_typesinAttesto.Federation.TrustChain.validate/3(:constraint_violation). - Status List Token
expinAttesto.StatusList.verify/3(:invalid_status_list). - SD-JWT VC
cnfinAttesto.SdJwtVc.verify/3, which now returns the new:invalid_cnferror for a presentcnfthat is not a non-empty object,nulland{}included, instead of returning it as holder-binding data. - JWT VC
vc.idandcredentialSubject.idinAttesto.JwtVc.verify/3(:invalid_vc). - DPoP proof
athinAttesto.DPoP.verify_proof/2(:invalid_athwithout a bound access token,:missing_athwith one). - OpenID4VCI proof
key_attestationheader inAttesto.CredentialProof.verify_jwt/2when key attestation is checked (:invalid_key_attestation). - JWK
use,key_ops, andalginAttesto.Key.verification_jwk/2(:invalid_use/:alg_mismatch), which wallet attestationcnfkeys, SD-JWT key-binding keys, and federation Entity Statement keys pass through. - JWE recipient-key
useandalginAttesto.JWE(:invalid_key), matching its existing handling ofkey_ops.
For a signed artifact, each case needs the signer to have put
nullin the signed claim or protected header; none lets an attacker remove an existing signed restriction.Attesto.Key.verification_jwk/2andAttesto.JWEalso refuse a null member in a key map a caller passes directly. Under the Jason and Poison JOSE backends each null read as absent.- OpenID Federation
Changed
- Verified JWT claims now come from Attesto's strict decode of the signed
payload rather than from JOSE's
fields, so a JSONnullisnilat every depth whichever JSON backend JOSE selected. Under JOSE's builtin OTP backend, the default on OTP 27 and later, verified claims carried the atom:null. This applies to every Attesto JWT verifier, all of which verify throughAttesto.JWS; callers that matched:nullin returned claims must matchnilinstead. The signature is still verified by JOSE over the same bytes; only the decoded representation changes. Observable effects under the OTP backend:- A Request Object's nested
nullre-encodes as JSONnullrather than the string"null". - An
authorization_detailsentry with anullextension value is accepted, as it already was under Jason and Poison. - An Entity Statement whose metadata parameter is
nullis rejected with:invalid_entity_statement. - A federation metadata policy
"value": nullremoves the parameter, as OpenID Federation specifies.
- A Request Object's nested
[2.10.0] - 2026-11-01
Added
Attesto.StrictJSON.decode_value/2decodes any JSON value (object, array, or scalar) while rejecting duplicate object member names and container nesting beyond:max_json_depth(32).Attesto.URI.valid_port?/2validates that a parsedURIcarries a port in1..65_535with no malformed, non-numeric, or empty:portsegment in the raw URI string.
Changed
- Reject malformed, empty, or out-of-range ports in
Attesto.DPoP.verify_proof/2(htuand:http_uri) andAttesto.URI.https_identifier?/2.URI.parse/1fell back to default port443on non-numeric ports (:abc,:443xyz) and returnedport: nilfor ports above65535(:99999); both paths now parse viaURI.new/1and require ports in1..65_535with no trailing empty:. - Decode SD-JWT Disclosures in
Attesto.SdJwt.verify/3andAttesto.SdJwt.decode_disclosures/2throughAttesto.JWS.decode64/2andAttesto.StrictJSON.decode_value/2, and switchAttesto.Did(did:jwk) andAttesto.AuthorizationRequest(claimsandauthorization_details) toAttesto.StrictJSON. Disclosures previously usedBase.url_decode64(..., padding: false)andJSON.decode/1, admitting=-padded or non-canonical base64url segments, nesting past 32 levels, and duplicate JSON object keys. - Require
"version" => "1.0"on the outer ISO/IEC 18013-5DeviceResponsemap and validate thatdeviceSigned.nameSpacesmaps non-empty string namespaces to plain maps with non-empty string element identifiers inAttesto.Mdoc.verify_device_response/4andAttesto.Mdoc.peek_doc_type/1. - Reject
redirect_urisentries inAttesto.ClientIdMetadata.validate_document/2that lack a URI scheme, carry a#fragment(forbidden by RFC 6749 §3.1.2), or contain a malformed, empty, or out-of-range authority port.
[2.9.0] - 2026-10-31
Added
Attesto.Mdoc.session_transcript/1returns the OID4VP 1.0 redirect-flowSessionTranscriptfor anmso_mdocpresentation, andAttesto.Mdoc.device_authentication_bytes/3the ISO/IEC 18013-5DeviceAuthenticationBytesa Wallet signs.verify_device_response/4rebuilds both with the same functions, so a Wallet built on them derives byte-identical structures.Attesto.SdJwt.decode_disclosures/2decodes and indexes Disclosures by digest with the rulesverify/3applies (shape, reserved names, duplicate digests), for a Holder choosing which Disclosures to present.Attesto.PresentationRequest.claim_path?/2checks a DCQL claims path pointer for a credential format.
Changed
Attesto.PresentationRequest.dcql_query/1requires both elements of anmso_mdocclaim path to be non-empty strings; it accepted empty strings before.Attesto.CIBAandAttesto.DeviceCoderedeem, approve, and deny through one internal polling-grant engine, and their ETS reference stores share their poll, consume, and decision transitions. Outcomes, error values, and store contracts are unchanged.
[2.8.0] - 2026-10-31
Security
- Validate arguments inside
Attesto.SessionState.mint_browser_state/2andbrowser_state_valid?/3,Attesto.JWS.sign_compact/3andsign_compact_jwk/3,Attesto.Key.jwk/1andsigning_jwk/1, andAttesto.JwtVc.issue/2instead of in function-head guards. A caller's type error now raises anArgumentErrorthat names the bad argument rather than aFunctionClauseErrorwhose logged arguments include the OP browser-state secret or the private signing key.JwtVc.issue/2also stops interpolating the PEM it was given into its own error message. Same class as Plug.Crypto CVE-2026-105963. - Reject an OpenID Federation Entity Identifier that carries userinfo.
https://entity.example:secret@evil.examplenamesevil.exampleto a fetcher andentity.exampleto a reader, and handssecretout as a Basic credential; identifiers now passAttesto.URI.https_identifier?/1. Surfaced by mining the class behind go-openid-federation's October 2026 Entity Identifier fix. - Compare naming-constraint hosts without a trailing dot, so
https://le.bad.test.can no longer step around anexcludedentry for.bad.test. Same class as the FAPIgo trust-chain fix of 2026-10-04.
Added
Attesto.StrictJSON.decode/2decodes JSON with duplicate object member names rejected at every nesting level and container depth bounded to 32 levels by default (:max_depth).Attesto.JWSandAttesto.JWEnow delegate their strict JSON decoding to it.Attesto.OutboundTarget.screen/2validates an outboundhttpsURL (or loopbackhttpwhenallow_loopback: true), refuses userinfo, fragments, malformed percent-encoding, IP literals, localhost,.local, and single-label hosts, resolves bothAandAAAArecords, screens every returned address throughAttesto.IPAddress.public_fetch_destination?/1(loopback is admitted only withallow_loopback: true), and returns a%Attesto.OutboundTarget{}pinning the first verified address.Attesto.Plug.OAuthError.missing_credentials/2renders the RFC 6750 §3.1 bareBearerchallenge (401withWWW-Authenticate: Bearerand{}JSON body) when credentials are absent.Attesto.Plug.Authenticateaccepts:missing_credentials_challenge(:invalid_tokendefault or:bare_bearer),:include_error_description,:dpop_max_age_seconds,:now, and:allow_ambient_mtls. It also distinguishes a malformedAuthorizationheader from a missing one, fails closed when:nonce_issuereturns a non-binary or:cert_derreturns a non-nil non-binary, and maps{:certificate_error, reason}toinvalid_token.Attesto.Token.check_confirmation/2acceptsallow_ambient_mtls: true(defaultfalse) for resource-server callers that permit unprompted client certificates on tokens withoutcnf["x5t#S256"].
Changed
Attesto.CNonceStore.ETS,Attesto.DPoP.NonceStore.ETS, andAttesto.DPoP.ReplayCachenow share one internal ETS store implementation, preserving their public contracts, table options, and atomic replay claims (insert_newplus compare-and-swap replacement of expired rows, swept on monotonic time).
[2.7.0] - 2026-10-27
Security
- Require JOSE 1.11.13 or later. It fixes CVE-2026-65625 through
CVE-2026-65632, among them unbounded recursion when an ECDH-ES ephemeral
key's type differs from the recipient key's, prime recovery from an RSA
private JWK without CRT members, and acceptance of zero-padded ECDSA
signatures.
Attesto.JWEalready rejected compressed payloads, short GCM tags, and ephemeral keys other than public P-256 keys before calling JOSE. Attesto.JWS.verify_strict/3accepts an ES256, ES256K, ES384, or ES512 signature only in the fixed-length R || S encoding of RFC 7518 §3.4, whatever the JOSE version. Earlier JOSE releases also accepted R and S padded with leading zero bytes, giving one signature many accepted encodings.
Added
- Opt-in VM-wide DPoP capability snapshots through
prime_allowed_algs/0andclear_allowed_algs_cache/0. Hosts with a fixed crypto backend can discover signing support once before serving. Unprimed callers retain per-call discovery; priming with no supported asymmetric algorithm clears any previous snapshot and returns an error. Signature, key, claim, target, freshness, and replay verification still run for every proof.
Changed
- JOSE 1.11.13 detects native Ed448 support and no longer enables its
pure-Erlang
crypto_fallbackby default.Attesto.DPoP.allowed_algs/0, and thedpop_signing_alg_values_supportedmetadata derived from it, now includeEd448where the crypto backend provides it, and omit any algorithm that only the fallback supplied.
[2.6.1] - 2026-10-18
Security
- Bound JSON nesting to 32 containers when decoding compact JWS headers and
claim sets, in unverified peeks and in strict verification alike, so a
deeply nested segment cannot turn one bounded request into disproportionate
scheduler time and process heap before any signature check. A trusted
caller may raise the bound with
:max_json_depth. - Cap the compact size each verifier reads before authentication, instead of
the shared 1 MiB default: client assertions, DPoP proofs, Key Binding JWTs,
and client attestation proofs of possession at 16 KiB; identity assertions,
Self-Issued ID Tokens, access tokens, ID Tokens, Trust Marks, and Request
Objects at 64 KiB; JWT VCs, credential proofs, key and wallet attestations,
and Entity Statements at 256 KiB, matching SD-JWT presentations. Status List
Tokens keep 1 MiB.
JWS.peek_json/3andJWS.protected_header/2keep their 1 MiB default for callers that pass no bound.
[2.6.0] - 2026-10-18
Breaking
- Durable logout-delivery integrations must require atomic
lease_targets/4,acknowledge_targets/2, andrelease_targets/2callbacks. Delivery targets carry a stabledelivery_id; this lets workers retry failed back-channel logout deliveries without losing them or letting a stale worker acknowledge a newer lease. The callbacks are optional in the core behaviour during 2.x so existing stores still compile, while integrations such as AttestoPhoenix 4.2 validate them at startup. Custom stores must also schedule a bounded retry driver for released rows and expired leases. TrustMark.verify/3now requires an explicit non-empty:subjectoption so a valid Trust Mark cannot be accepted for the wrong entity.- Issuer-derived token and JWKS endpoint URLs now preserve issuer path
prefixes. For example, issuer
https://id.example/tenantderiveshttps://id.example/tenant/oauth/token; hosts that intentionally published endpoints at the origin root must configure those endpoint URLs explicitly.
Security
- Bind client assertions to their token-endpoint role. Verification now accepts
only the absent,
JWT, orclient-authentication+jwttypvalues, rejects authorization-request claims, and limits the remaining lifetime at verification to 300 seconds by default. Setmax_lifetime: :unboundedonly for an intentional exception. - Enforce
cnfsender constraints after every custom access-token verifier and safely normalize non-text verifier errors instead of letting malformed host callback results raise while rendering an OAuth response. - Reject SD-JWT VCs that reconstruct
iss,vct,exp,nbf,status, orcnffrom disclosures. These claims must be in the issuer-signed payload when present; selectively disclosedsubandiatremain valid. - Bound reference refresh-token retention by removing expired consumed ancestors after their successor retry deadline, while keeping a family index so revocation and cleanup do not scan the complete token table.
- Validate every trusted JWK's public-only status, signature use, key operations, declared algorithm, key type and curve before verification. Explicit RSA, Edwards, and ES256K algorithm identifiers must match their key.
- Limit decoded mdoc CBOR input to 256 KiB before parsing, and fail closed on
invalid UTF-8 in resource indicators, Client ID Metadata identifiers, device
verification URIs, and
did:webidentifiers. - Add a default cap of 16 presentations per OID4VP query, including queries
permitting multiple credentials. Hosts can set a smaller positive
max_presentations_per_queryvalue when verifying a response. - Trust chains now default to at most ten statements and reject repeated entity identifiers as cycles.
- Protect the ETS code, device-code, CIBA, and authorization-code replay-marker tables from writes by arbitrary co-resident processes; all mutations now run through their owning store processes.
Changed
- Document the public verification-option families and their protocol-specific algorithm defaults. Internal option, record, store-contract, query-policy, and refresh-rotation paths now use shared validators without changing their accepted inputs or return values.
- Treat omitted OID4VP
multipleconstraints asfalse, normalize Federationscopepolicy values for every entity type, and require multi-audience ID Tokens to carry a matchingazp. - Make Trust Mark subject binding mandatory and add the configurable
max_chain_lengthtrust-chain verification option with a default of ten. - Normalize a pathless HTTPS DPoP target to
/in both proof construction and verification, following RFC 3986 equivalence rules. - Widen CIBA's decision-time tolerance to 60 seconds for ordinary cross-node clock skew.
Fixed
- Preserve the issuer authority when an appended endpoint path begins with a
colon-bearing segment such as
/org:tenant; URI resolution no longer mistakes that segment for a new scheme. - Detect a keystore whose active signing algorithm is absent from its published
verification algorithms and report
:signing_algorithm_not_publishedin rotation health. - Reject conflicting outer
response_typeandrequest_uriparameters when a signed authorization Request Object is present instead of silently ignoring them. - Check refresh-token expiry before client binding so expired grants do not disclose whether a supplied client identifier matches.
- Implement
CodeStore.ETS.mark_consumed/2replay markers for bounded, unbounded, and no-refresh authorization-code outcomes so reuse detection also works with the reference store. The reference store also supports the capability-detected code-to-access-token linkage and revocation operations used by AttestoPhoenix 4.1, preserving authorization-code issuance when core is upgraded independently.
[2.5.0] - 2026-10-17
Security
- Route core JWT verification through shared strict protected-header, trusted-candidate, and signature-verification paths. Protocol verifiers now apply consistent canonical parsing, critical-header handling, algorithm and key compatibility checks, malformed-result policy, and exact RSA-PSS parameter verification.
- Validate untrusted verification candidates before expensive key conversion,
support protocol-selected RSA minimum sizes, and let callers reject an
ambiguous key selection whether the protected header includes
kidor not. - Add one shared HTTPS identifier policy that rejects userinfo, fragments, hostless values, whitespace, control characters, and malformed percent escapes. HTTP remains available only through an explicit development opt-in.
- Add an IANA-registry-based public destination policy for outbound fetches. It rejects non-global, scoped, multicast, documentation, benchmarking, and reserved IP addresses, checks embedded IPv4 in transition forms, and retains applicable globally reachable exceptions. Non-locator ORCHIDv2 and Drone Remote ID identifier prefixes remain blocked from network fetches.
- Require HTTPS DPoP target URIs without userinfo when building proofs, while
continuing to omit query and fragment components from the signed
htu.
Added
- Add
Attesto.DPoP.Proof.build/4andresolve_alg/2for production DPoP proof construction with key-bound algorithms and identifiers, bounded input, public embedded JWKs, access-token hashes, nonce support, and exact PSS signing. - Add shared JWS protected-header construction,
verification_candidates/2,verify_trusted/4, andverify_strict/3as shared verification boundaries, plusAttesto.SigningAlg.compatible_algs/1for trusted key inspection. - Add
Attesto.URI.https_identifier?/2andAttesto.IPAddress.public_fetch_destination?/1for consistent URI and outbound-address policy across the Attesto family. - Add
Attesto.Token.check_confirmation/2so already verified claims can be bound to presented DPoP or mTLS evidence without repeating JWT verification.
Changed
- Let
Attesto.Plug.Authenticateresolve configuration through a function or MFA and accept a function or MFA token verifier. Custom verifiers must return a plain claims map and may preserve 403 insufficient-scope or 503 dependency outage semantics through tagged failures. Protected-resource metadata can now be resolved per request, withallow_http: trueas an explicit development-only exception;RequireScopescarries the same option. - Let
Attesto.ProtectedResourceMetadata.metadata/1build metadata directly from options as well as fromAttesto.Config, using the shared URI policy in either form. OAuth error challenges use the same per-request metadata and URI validation rules. - Make
Attesto.Test.DPoPuse the production proof builder while preserving its invalid-fixture helpers.
[2.4.0] - 2026-10-15
Security
- Evaluate the complete OID4VP DCQL response policy, including credential-set and claim-set alternatives, requested disclosures, cardinality, permitted query IDs, and the explicit optional-response case. Empty or incomplete presentations can no longer complete a request that requires a credential.
- Preserve refresh-token family replay evidence for as long as a live
descendant can remain valid. Authorization-code redemption now passes the
refresh-family deadline to
CodeStore.mark_consumed/2as:replay_retain_untilso persistent stores can apply the same rule. - Fail closed for required key attestation, issuer pinning, malformed or weak embedded JWKs, invalid SD-JWT digest graphs, unsupported COSE critical headers, and malformed Federation policy or trust data before expensive key conversion.
- Tighten assertion time ordering,
nbf, Trust Mark header/time requirements, Request Object resource arrays, redirect handling, concrete-scope checks, DPoP thumbprints, resource indicators, and holder-key algorithm policy. - Apply FAPI algorithm and key compatibility to the Wallet Attestation
cnfclient-instance key by default as well as to the attestation signer. Only an explicitenforce_fapi_alg_policy: falseaccepts a non-FAPI instance key.
Added
- Expose validated effective
authorization_detailsonAttesto.AuthorizationRequest, including values supplied by a signed Request Object, so an authorization server can persist OID4VCI entitlements from the request it actually verified. - Carry validated RFC 8707
resourcevalues through CIBA requests and grants so the authorization and token layers can enforce the requested audiences. - Add authorization-code replay-retention metadata for stores that keep a consumed marker after the code row itself expires.
Changed
- Reject an explicitly empty
dpop_jktauthorization-request parameter asinvalid_requestinstead of treating it as absent. - Enforce the final OID4VP DCQL identifier grammar for credential and claim IDs: letters, digits, underscores, and hyphens only. Request construction now raises for IDs containing spaces, dots, slashes, or other characters.
- Apply DCQL's
multiple: falsedefault to hand-built VP query constraints. Empty hand-builtclaims,vct_values,doctype_values, or claimvaluesconstraints now fail closed instead of silently becoming unconstrained.
Fixed
- Normalize malformed PEM, mTLS distinguished-name, mdoc resolver, end-session, pre-authorized-code, and JWS decoding failures to documented error results instead of crashes or silently weakened constraints.
- Keep revocation responses indistinguishable for unknown and foreign tokens, without allowing a foreign client to mutate the token family.
- Correct IPv6 DPoP target URI construction, hostless HTTP resource rejection,
prompt=nonecombinations, future step-up authentication times, and wildcard required-scope handling.
[2.3.1] - 2026-10-08
Security
- Preserve the default FAPI algorithm and key-strength policy for every explicit
allowlist, including mixed lists. Only
enforce_fapi_alg_policy: falseopts into a broader policy. Reject malformed, unknown, duplicate and non-string algorithm entries; an empty list continues to deny all algorithms. - Bind presentation responses to the requested credential-query IDs. Reject unsolicited IDs before credential processing, while retaining separate sets for permitted and required IDs.
- Return controlled errors for malformed presentation values, including scalar values in encrypted presentation-session responses.
Version 2.3.0 was tagged but not published to Hex. This release includes its changes below; its tag remains unchanged.
[2.3.0] - 2026-10-08
Security
- Treat explicitly empty signature algorithm allowlists as deny-all across public and composed verifiers. Low-level JWS verification retains its unrestricted trusted-key behavior only when the option is omitted.
- Preserve FAPI key-strength checks when an explicit algorithm list narrows
the default set. SD-JWT issuer verification now applies these checks by
default, including PS256 RSA moduli of at least 2048 bits. Broader algorithm
profiles remain explicit;
enforce_fapi_alg_policy: falsedeliberately relaxes key restrictions and never changes empty-list rejection. - Verify PS256, PS384 and PS512 signatures with exact 32-, 48- and 64-byte PSS salt lengths and the corresponding MGF1 hash, independent of JOSE backend defaults. Reject otherwise valid signatures with different salt lengths.
- Pin the same PSS parameters when the DPoP testing helper signs proofs, ensuring conforming signatures across native and fallback crypto backends.
Changed
- Require non-empty presentation arrays per query ID in
VpToken.verify/2and presentation sessions, as required by final OID4VP. Scalar values require explicitlegacy_scalar_values: true; array inputs retain list results. - Allow certificate-identified SD-JWT VC credentials to omit
issusingissuer_identity: :certificateafter the caller validates the issuer chain and supplies its verified leaf key. Existing issuer-claim requirements remain the default; a present malformed issuer still fails.
Added
- Add an explicit
RequestObjectOID4VP profile that enforces request typing and client identity while ignoringiss, as required by OpenID4VP 1.0. Existing JAR issuer-binding behavior remains the default. - Add
Attesto.JWE.encrypt/4anddecrypt/3for bounded compact credential encryption using ECDH-ES with P-256 and A128GCM or A256GCM. Callers select algorithms from trusted protocol metadata and can narrow the accepted set. - Validate encoded sizes, canonical Base64URL, duplicate protected JSON members, ephemeral public keys, fixed GCM parameters, and key-use constraints before decryption. Reject compression and unsupported critical extensions; return controlled errors for malformed input and authentication failure.
[2.2.2] - 2026-10-04
Security
- Bound compact JWS input and protected/signature segments before splitting or
decoding, require canonical Base64URL, and reject duplicate JSON members at
any nesting depth in signed headers and claim sets. Apply equivalent
pre-decode bounds to
did:jwkand mdoc credentials. - Add optional authorization-server issuer binding for refresh families. Rotation checks the issuer before any consume, retry, or reuse action; introspection treats mismatches as inactive and revocation treats them as an unknown token without mutating the family. Callers that omit the issuer keep the existing core behavior.
- Bound private-key JWT
jtivalues, compare credential/key-attestation nonces and cached refresh successors in constant time, and keep external signer failures from exposing backend errors or key material. - Document that attacker-controlled identifiers must not be used as telemetry metric labels because they permit unbounded series cardinality.
[2.2.1] - 2026-10-03
Changed
- Update CIMD to draft 02: accept explicitly nonredirecting grant profiles and reject private or symmetric keys in public client JWKS documents.
- Add optional absolute refresh-token family deadlines that remain fixed across rotation and grace retries, alongside the existing inactivity expiration.
- Apply client-attestation draft 11 Challenge and JWT time-claim rules.
- Preserve optional refresh-family
attestation_jktbindings through atomic rotation and grace retries; reject missing or changed instance keys. - Include the signing key ID in signed credential issuer metadata's public JWK.
- Preserve required mdoc
doctypemetadata and accept its integer COSE signing algorithm identifiers, while retaining JOSE names for JWT credential formats. - Reject invalid mdoc validity ordering during issuance and verification:
signed <= valid_from < valid_until. - Support OID4VCI 1.0 nested
credential_metadata, preserving ordered claim paths, display properties, and JSON extensions. Validate current metadata while retaining legacy top-level inputs for 2.x callers. - Cite SD-JWT RFC 9901 and document the RFC 10017 and RFC 10027 host policies.
[2.1.0] - 2026-09-11
Changed
- Document that
Attesto.OpenIDDiscovery.metadata/2normalizes Provider Metadata only. Authorization-server integrations must use the same effective OIDC scope catalog for registration and authorization policy so those surfaces cannot diverge from discovery.
[2.0.1] - 2026-09-02
Fixed
- Make
Attesto.Claims.portable_json_object?/1returnfalsefor structs at any nesting level instead of raising while attempting to enumerate them.
[2.0.0] - 2026-08-31
Breaking
Attesto.RefreshStorenow requires one family-serializedrotate/4transaction in place of the unsafeconsume/2theninsert/1thenremember_successor/3sequence. A winner returns{:ok, committed_parent, committed_child}; a loser returns the complete committed parent. The callback also distinguishes revoked, expired, retry-state-unavailable, random token-collision, invalid-rotation, and sibling-generation-integrity outcomes.get/1must provide strong reads consistent with rotation and revocation. Custom stores must migrate before upgrading.Attesto.DeviceCodeStorenow requiresget/1;lookup_user_code/1returns the full entry; and the decision callbacks areapprove/3anddeny/2, receive%{now: unix_seconds}, and return the committed post-transition entry. Decisions must atomically require a pending, unexpired code. Custom stores must update these callbacks.Attesto.RefreshToken.issue/3always starts a new family at generation zero. The former public:family_idand:generationcontinuation options are rejected; only the atomic rotation path can create descendants.- Authorization-code
:family_idis provenance metadata rather than a refresh-family injection point. Hosts issuing a refresh token from a redeemed code should callAttesto.AuthorizationCode.issue_refresh_and_finalize/6, which owns issuance, requires the refresh context's subject and client to match the grant, permits only scope/resource subsets, and binds the exact returned family ID; the three-arityfinalize/3remains for flows that issue no refresh token and records a nil family marker. Under RFC 9449 §5, hosts classify clients and choose a nil refresh binding for confidential clients or a DPoP binding for public clients; a DPoP-bound grant accepts nil or its exact JKT and rejects a different one. Build the access/ID-token response before calling the composition API, and add its refresh token only after successful return. Attesto.RefreshStore.insert/1reports{:error, :conflict}for an existing token hash or family generation and must leave the candidate row absent. Successfulrotate/4calls return the exact committed parent and child snapshots, including the committedconsumed_atand successor state; custom adapters must not substitute a racy post-commit read.- Device user codes now accept only lengths 8..64 (the default remains 8). The same bound applies to generation and normalization options, so custom verification pages should preserve the configured length when normalizing.
- OID4VCI pre-authorized-code
:authorized_scopesentries must now be valid OAuth scope tokens. Empty strings, whitespace, quotes, backslashes, control characters, and non-ASCII bytes are rejected as invalid attributes. - Authorization-code and refresh-token context claims, plus device-code and
CIBA approval claims, must now be portable JSON objects: recursively
string-keyed, valid UTF-8 without U+0000, proper arrays, and I-JSON exact-range
integers only (
-(2^53)+1 .. (2^53)-1). Floats, out-of-range integers, and other VM terms are rejected as:invalid_claims; composite nesting is capped at 64. This portable persisted-JSON subset lets JSON-backed stores preserve the canonical context without key conversion or value loss. - Explicit policy and lifetime options must now carry their documented type;
omit an option to use its default instead of passing
nil. This applies to client-assertion:enforce_fapi_alg_policy/:max_lifetime, wallet attestation:enforce_fapi_alg_policy/:max_age_seconds, authorization request:require_nonce/:require_pkce, key attestation:require_exp/:enforce_fapi_alg_policy, CIBA request policy and length options, and CIBA issuance:expires_in/:max_expires_in/:interval. Introspection's:authorizeoption must be a one-argument function ornil.
Adapter migration
- Before upgrading a custom store, audit every callback against the Attesto 2
contracts.
RefreshStorerequires family-serializedrotate/4and strongget/1reads;DeviceCodeStorerequires full-recordget/1andlookup_user_code/1; andCodeStore,PreAuthorizedCodeStore,CIBAStore, andPresentationSessionStorenow reject unexpected callback returns and malformed records with constant contract errors. Return the documented tuples, maps, and atoms exactly, preserve the required record bindings, and keep state transitions atomic before deploying a custom adapter. - Persisted-claims upgrade note: Attesto 1.x accepted arbitrary maps for
authorization-code and refresh-token context claims and device/CIBA approval
claims. Attesto 2 requires the exact portable JSON subset described above.
Before a rolling upgrade, quiesce every 1.x writer or otherwise prevent it
from creating records with atom keys, floats, out-of-range integers, invalid
strings, or other VM terms. Audit records as they are returned by the
adapter: a nonportable authorization code is atomically removed by
CodeStore.take/1before validation; a nonportable refresh record fails closed and may revoke its family when its identity is trustworthy; and an approved device/CIBA record is rejected before consumption. Migrate only with an explicit collision/precision policy; otherwise expire and reissue those records. Records already returned as canonical portable JSON continue to work.
Security
- Refresh rotation now commits the parent transition, protected retry state,
and exact child in one atomic operation serialized against family
revocation. Simultaneous matching requests coalesce on one successor instead
of observing partial state. A pre-commit protection failure or documented
:invalid_rotationrollback leaves the parent usable and returns:temporarily_unavailablewithout revocation; an ambiguous callback failure or corrupt committed state attempts family revocation. Every path emits a distinct[:attesto, :refresh_token, :rotation_state_failed]event instead of reporting success or falsely alleging token reuse. A callback that raises, throws, or exits gets the same sanitized event and cleanup attempt before its original failure is propagated unchanged. - Rotation grace must be a non-negative integer and is fixed when the
successor is issued via a stored
retry_untildeadline. Clock rollback, malformed recovery state, a missing successor, and an expired successor can no longer return a cached refresh credential. The ETS reference store redacts retry credentials after their deadline; strict zero-grace rotation stores only an exact non-secret tombstone, and revoked-family markers are retained for the store lifetime rather than expiring after a fixed 30-day interval. A consumed parent's own expiry is also authoritative, so retained rows and later grace configuration cannot extend successor recovery beyond that boundary. A backward clock difference between serving nodes, no larger than the configured grace, is tolerated during that fixed retry window; larger rollback remains fail-closed. Generation lookup is constant-time, and a pre-existing sibling generation atomically revokes the corrupt family. An expired ancestor remains a valid family-revocation handle when the caller is authorized, so live descendants cannot survive revocation. - Client-binding and sender-constraint opt-outs now require exact booleans.
Malformed
:allow_missing_client_id?and:require_confirmation_bindingvalues can no longer disable their checks; omitted means the secure default and explicitnilis not an opt-out. - Unexpected replay-, nonce-, and refresh-store callback returns now fail loudly, including a refused successor-persistence callback that older code could ignore. Constant contract errors no longer copy adapter return data into exception messages or telemetry.
- Persisted Refresh, CIBA, device-code, and authorization-code contexts now
reject unexpected sibling keys at validation; host-specific values remain
inside the documented string-keyed JSON
:claimsobject. - Refresh-reuse telemetry is emitted even when family revocation raises, throws, exits, or violates its return contract. The event carries only a bounded cleanup status, and the original cleanup failure is preserved.
- Refresh-token introspection keeps RFC 7662's indistinguishable inactive
response when its store violates the callback contract, raises, throws, or
exits, while emitting the sanitized
[:attesto, :introspection, :refresh_store_failed]operational event. - Refresh-rotation lookup exceptions and malformed records now emit the
sanitized
rotation_state_failedevent withoperation: :lookup; when the presented hash and family ID are still trustworthy, the family is revoked before the constant contract error is returned or the original callback failure is re-raised. - Presentation-session store results are now validated before use, including the consuming result read. Unexpected callback returns and malformed records fail loudly with constant errors instead of becoming ordinary missing-state outcomes. Authorization-code reads and consumption, device/CIBA state transitions, and OID4VCI pre-authorized-code redemption enforce their documented store contracts the same way. Consumed records must match the requested code identity and preserve the security context validated immediately before the atomic transition; a malformed or changed record can no longer construct a grant.
- Device and CIBA approvals cannot widen the originally requested scope;
persisted decisions must retain their subject and required authentication
context. CIBA propagates the approved
acrandauth_timeinto its grant; a one-second approval/redeemer clock difference is tolerated, while larger future timestamps and impossible persisted records remain rejected before grant construction. - Authorization-code, OID4VCI pre-authorized-code, refresh-token, device-code, and CIBA clock/lifetime options are validated before any destructive store transition, so malformed host input cannot burn an otherwise valid one-time grant.
Fixed
- Accept the optional
JWTandoauth-authz-req+jwtmedia types on signed CIBA authentication requests case-insensitively, including theirapplication/-prefixed forms, while continuing to reject unrelated explicit types. This restores interoperability with the FAPI-CIBA two-client flow.
[1.15.0] - 2026-08-13
Added
- RFC 8705 §2 client-certificate authentication primitives for both
tls_client_auth(all five registered DN/SAN identity forms) andself_signed_tls_client_auth(exact registeredx5cleaf matching). Attesto.Signer, an additive JWS signing contract for HSM/KMS/enclave keys whose private material cannot be exported. Existing PEM keystores retain the same path; token, ID Token, JARM, signed introspection, JWT VC, SD-JWT, and signed credential-metadata issuance can use a non-extractable signer.Attesto.Keystore.rotation_health/2and optionalverification_key_metadata/0expiry metadata. Health reports whether the current signing key is published, whether an overlap window is active, and whether verification keys are expired or approaching expiry.
Security
- External-signer output is verified locally against the advertised public JWK and selected algorithm before a compact JWS is returned, catching wrong KMS keys, message/digest mode mistakes, non-JOSE signature encodings, and RSA-PSS signatures whose salt length is not the JOSE hash-output length.
- An external signer's trusted public JWK
algmember now participates in signing-algorithm selection ahead of key-type inference; an RSA signer advertisingPS256cannot silently receive anRS256operation. - RFC 8705 certificate parsing is bounded to 1 MiB and registered identity values to 4 KiB. Email SAN comparison preserves the potentially case-sensitive local part while normalizing only the domain.
- Keystore callback contracts are validated when
Attesto.Configis built: an extractable keystore must exportsigning_pem/0, while an external signer must export bothsigning_jwk/0andsign/2. Misspelled or partial callback implementations no longer wait until the first mint to fail. - Rotation health rejects malformed expiry metadata, marks metadata for an
unknown
kidinvalid, and distinguishes an expired active signing key (:expired_signing_key, invalid) from an expired overlap key (warning).
[1.14.0] - 2026-08-12
SIOPv2 DID Subject Syntax support for connection-free DID methods. Self-issued
ID Tokens can now bind their subject and signature directly to a did:jwk or
did:key verification method without an issuer JWKS or network resolution.
Added
Attesto.Siop.verify/2now supports SIOPv2 Decentralized Identifier Subject Syntax for connection-freedid:jwkanddid:keysubjects. Verification requires the method-defined protectedkid, rejects a simultaneoussub_jwk, resolves the holder public key locally, enforces the JWK's signature usage and algorithm metadata, verifies the signature, and requiresiss == sub. Network-backed and unsupported DID methods continue to fail closed.
[1.13.0] - 2026-08-11
Hardening of the ID-JAG (urn:ietf:params:oauth:grant-type:jwt-bearer)
assertion verifier. Pairs with attesto_phoenix 2.12.0, which enforces the
signed resource and cnf.jkt constraints at the token endpoint; that
package now requires this release (>= 1.13.0).
Security
- ID-JAG verification now validates a present
scope,resource, andcnfinstead of allowing a malformed optional authorization constraint to be treated as absent. A signed constraint that could not be parsed previously degraded to "absent", erasing the IdP's ceiling; it now fails closed. An emptyscopeis rejected rather than read as an unbounded one. - Mixed confirmation methods are rejected. A
cnfcarryingjktalongside any other member (for example anx5t#S256certificate thumbprint) previously matched onjktalone, silently dropping the second constraint — an IdP that required both DPoP and mTLS possession got an assertion enforced as DPoP-only. Only a single-membercnf.jktis accepted. jtiis bounded (256 bytes) before it can reach a host replay store, so unbounded IdP-controlled input never becomes a store key.
Changed
- Potentially breaking: an ID-JAG carrying
authorization_details(RFC 9396) is now rejected with:invalid_claims. This verifier has no policy engine for their typed constraints, and ignoring a signed constraint would silently promote a narrowly-scoped assertion to broader scope-only authority. Fail closed until the constraints can be enforced end to end. Trusted IdPs that mint ID-JAGs includingauthorization_detailsmust stop doing so, or pinattesto ~> 1.12.2until they can. - An RFC 7800 confirmation claim using a method other than DPoP
jktis likewise rejected rather than treated as an unbound (bearer) assertion.
[1.12.2] - 2026-08-11
Second-round hardening from a review-of-the-fixes pass, a dedicated sweep of the shared crypto/infra primitives (never a prior review front), and fuzzing of the SD-JWT / mdoc / status-list parsers. mdoc and status-list parsing came through fuzzing fully clean.
Security
Attesto.Diddid:jwk DoS:resolve/2now rejects an oversized presenter-controlled RSA key on the raw map (viaSigningAlg.rsa_params_ok?) BEFOREJOSE.JWK.from_map/1bignum-decodes it — a ~256 KB modulus previously pinned a scheduler for ~3s per unauthenticated request. (did:jwk resolution is not yet wired to an HTTP endpoint, so this was latent.)Attesto.SdJwtVc.issue/2registered-claim integrity: subject claims are string-keyed before merging the registered claims, so an atom-keyed collision (e.g.claims: %{cnf: ...}) can no longer emit a duplicate JSON member and let a last-wins verifier bind to the wrong holder key. MatchesAttesto.JwtVc.
Fixed
Attesto.SdJwt.verify/3andAttesto.CredentialProof.verify_jwt/2now fail closed ({:error, _}) on a malformed host-suppliedjwks/accepted_algs(nil, non-list) instead of raising, honoring their documented contract (found by fuzzing).- The internal ETS store's
:directreset now clears every table the store owns, not just the primary — a store addingextra_tables:on the default reset mode would previously leave those rows intact.
Documentation
Attesto.Diddid:web resolver: explicit SSRF warning (the fetch URL is presenter-controlled — allow-list before dereferencing).Attesto.Mdoc: clarified that document-type binding requires:expected_doc_type(threaded viaAttesto.VpToken's:query_constraints).
[1.12.1] - 2026-08-10
Fixed
Attesto.PreAuthorizedCodeStore.ETS.reset/0(test-facing) now routes through the owner process (reset: :server), so it works on the:protectedtable introduced in 1.12.0. In 1.12.0 the macro-provided direct:ets.delete_all_objects/1raisedinsufficient access rightswhen a downstream test suite calledreset/0. Production is unaffected (reset is test-only).
[1.12.0] - 2026-08-10
Wallet-surface security-hardening release from a 6-front adversarial sweep of the EU-wallet code (SD-JWT/SD-JWT VC, mdoc/COSE, OID4VP verifier, OID4VCI issuer, OpenID Federation/DID/SIOPv2/attestation) plus an ecosystem-CVE and per-spec security-considerations cross-check. The cryptographic surface was found solid; the fixes close policy-enforcement gaps.
Security
- Status List Token freshness:
Attesto.StatusList.verify/3now rejects an expired token (exppresent and past, 60s clock-skew leeway).expremains optional per draft-ietf-oauth-status-list §11.5, so a no-exp token does not expire. Previously a stale/expired list verified indefinitely, letting a revoked credential read VALID. - SD-JWT VC registered claims:
Attesto.SdJwtVc.issue/2never makes registered claims (iss/vct/cnf/status/iat/exp/nbf/sub) selectively disclosable, closing a holder-binding / revocation-reference strip where a holder could removecnfand present as a bearer credential. - SD-JWT disclosure DoS:
Attesto.SdJwtcaps presentation byte-length and disclosure count before any base64/JSON decode work. - Pre-authorized code store isolation: the reference ETS store now uses a
:protectedtable (owner-only writes, single-usetakepreserved), matching the credential-offer store, so a co-resident BEAM process cannot forge a redeemable grant. - OpenID Federation trust marks: added
Attesto.Federation.TrustMark.verify/3for real signature/iss/sub/typ/expverification;validate_trust_marks/1is documented as structural-only.
Fixed
Attesto.PresentationSessioncreate_attrstype now lists:query_constraints(a latent dialyzer contract mismatch forattesto_phoenix).
[1.11.0] - 2026-08-10
Second security-hardening release, from two further adversarial audit rounds (under-covered flows + implementation-level classes) and three cross-model code reviews. Focused on denial-of-service resource-exhaustion classes and OID4VP verification correctness.
Security
- RSA verification-key parameter bounds (DoS).
Attesto.SigningAlg.rsa_params_ok?/1rejects an RSA verification key whose modulus exceeds 8192 bits or whose public exponent is not an odd integer in3..65537, evaluated on the RAW base64urln/ebefore any bignum decode. Without it, an attacker-supplied key with a multi-hundred-KB exponent pins a scheduler inmodexpfor seconds. Wired at every gate that admits an untrusted key:Attesto.Key.verification_jwk/2, the internal JWS candidate selector (viamap_candidate!), the SD-JWT holder Key Binding path (Attesto.SdJwt), andAttesto.JwtVc'scnfparse. - OID4VP format binding + query-ID requirement.
Attesto.VpToken.verify/2now (a) binds each presentation to the DCQL-requested format — a validly signeddc+sd-jwtcredential can no longer satisfy anmso_mdocquery (:format_mismatch) — and (b) treats every query id that carries a constraint as required, so a wallet cannot return a credential under a different id to dodge the type/claim binding.constraints_from_dcql/1accepts atom- or string-keyed queries. (Completes the DCQL binding introduced in 1.10.0.) - Token Status List decompression-bomb bound.
Attesto.StatusListinflates the status bitstring through a capped:zlib.safeInflateloop (16 MiB ceiling,:status_list_too_large) instead of:zlib.uncompress/1, so a signed zlib bomb from a compromised status issuer cannot expand to gigabytes. - CBOR/mdoc parse-amplification bound.
Attesto.MdocandAttesto.Cosereject CBOR input over 1 MiB before decoding, bounding the deep-nesting amplification the decoder would otherwise turn into heap ahead of any signature check. - Nonce single-use + store ceilings.
Attesto.CNonceStoregains a required atomicconsume/1(single-use OID4VCI c_nonces; see attesto_phoenix). TheAttesto.CNonceStore.ETSandAttesto.DPoP.NonceStore.ETSstores bound table growth from their unauthenticated endpoints with an O(1) best-effort ceiling.
Changed (breaking)
Attesto.CNonceStorerequires theconsume/1callback. The bundled ETS store implements it; custom stores must add it (a store that cannot single-use a nonce must not be used for issuance).Attesto.VpToken.verify/2: a query id present in:query_constraintsis now required in the response even if absent from:expected_query_ids.
[1.10.0] - 2026-08-10
Security-hardening release from an adversarial audit against four public
vulnerability classes (broken tenant/authorization isolation, alg:none /
decrypt-then-verify signature bypass, DPoP session theft, and unbounded-batch
DoS). The audit found the JWT-verification and DPoP surfaces already
fail-closed; the fixes below close authorization-isolation seams and add
defense-in-depth.
Security
- Credential-offer id is now generated by the library.
Attesto.CredentialOffer.store_by_reference/3mints the by-reference offer id with a 256-bit CSPRNG (Attesto.Secret.generate/0) and stores it, so a host can no longer supply a guessable id. The by-reference offer endpoint is unauthenticated and a pre-authorized offer embeds a redeemablepre-authorized_code, so a weak id let an attacker enumerate the endpoint and redeem a victim's code. Use this instead of calling the store'sput/1with a self-chosen id.:ttlis validated (a positive integer <= 3600 s). - OID4VP verified results are single-use.
Attesto.PresentationSession.result/2now reads the completed result through the store'stake/1and clears it, and the reference store'sget/1no longer returns the result payload at all. The OID4VPresponse_codehanded to the browser is the session id and transits the address bar, history,Referer, and logs; reading results once means a capturedresponse_codecan no longer be replayed to re-read the presented claims. - Credential Request
proofsare bounded.Attesto.CredentialRequest.parse/2caps the total proofs per request (default 50, override with:max_proofs; validated to a non-negative integer) and rejects an over-cap request with{:error, :too_many_proofs}before any signature is verified, closing an authenticated proof-verification amplification-DoS. - Key-attestation signer strength parity.
Attesto.KeyAttestation.verify/2now applies the FAPI RSA-modulus / Edwards-curve strength policy to the attestation signer (via:enforce_fapi_alg_policy), matchingAttesto.ClientAssertionandAttesto.WalletAttestation. - Reference stores hardened to
:protectedETS. The presentation-session and credential-offer ETS tables (which hold plaintext session data / redeemable codes) drop:public, so a co-resident BEAM process can no longer directly:ets.insert/2to overwrite a verified result, bypass the atomicpending -> completedguard, or inject a forged offer. - Introspection multi-tenant guidance. Documented that any deployment where
more than one client can authenticate to introspection MUST set
:introspection_authorize(without it, one client can introspect another's token). No behavior change.
Changed (breaking)
Attesto.PresentationSession.result/2is now single-use: it consumes the completed session, and a second read (or a read of a still-pending/expired session) returns:error. Hosts that read the result more than once must read it once and cache their own outcome.Attesto.PresentationSessionStorerequires thetake/1callback (moved out of@optional_callbacks), andget/1MUST NOT return a completed session'sdata.result. Custom store implementations must providetake/1; the bundledAttesto.PresentationSessionStore.ETSis unaffected.
[1.9.0] - 2026-08-05
Added
A third redirect-URI matching mode,
:exact_allow_loopback_port_including_localhost, which applies the RFC 8252 §7.3 port allowance to the bare hostnamelocalhostas well as the127.0.0.1/[::1]literals.Native clients exist that register a portless
http://localhost/callbackin their client-id metadata document and then bind an ephemeral port. Under:exact_allow_loopback_portevery such request failsredirect_uri_not_registered: exact comparison fails on the port, and the §7.3 exception does not cover the name. Claude Code is one such client, so no Attesto deployment could serve it over the loopback flow.The literal-IP-only reading remains correct and remains the behavior of
:exact_allow_loopback_port— §7.3's MUST is scoped to "loopback IP redirect URIs", and 1.4.1's reconciliation of RFC 9700's wider wording still stands. What this adds is the observation that nothing forbids a server allowing the name, and that §8.3's case againstlocalhostis stated entirely in terms of what the client does (which interface it binds, its firewall, its host-name resolution) — none of which a server changes by refusing the request. The residual risk is the combination of two allowances the module already makes separately: a registeredlocalhostURI is already reachable by exact match, and §7.3 port flexibility is already mandated for the IP literals. Permitting only that combination is why this is a separate opt-in rather than a change to the existing mode.No behavior change unless selected.
:exactand:exact_allow_loopback_portare byte-for-byte as before —localhoststill gets no port flexibility under either, and the existing test asserting that is unchanged.localhostis a distinct host identity from the IP literals and never cross-matches them, and every other constraint is preserved: byte-exacthttp://scheme, anchored authority (localhost.evil.example,sub.localhost,evil-localhost,localhost.and userinfo all stay outside), no fragment, exact path and query, and the asymmetric request / registered port rule.
[1.8.1] - 2026-08-03
Fixed
- Clean compile for consumers without the optional
:cbordependency.Attesto.VpToken's mdoc verification path pattern-matched onAttesto.Mdoc, which compiles to a raising stub when:cboris absent. Under Elixir 1.19+'s set-theoretic type checker the stub types asnone(), so those clauses were reported as unreachable — a warning that surfaced for any downstream app (e.g. a LivebookMix.install) that didn't pull:cbor. The mdoc verification cluster is now gated behindCode.ensure_loaded?(CBOR): with:cborpresent the behavior is unchanged; without it, an mdoc presentation fails closed with{:error, {id, :mdoc_unsupported}}and SD-JWT VC /jwt_vc_jsonverification is unaffected. A dedicated CI job now compiles the library with no optional deps present and fails on any such warning.
[1.8.0] - 2026-08-03
Added
- OpenID for Verifiable Credentials (OID4VC / EU digital identity) — the
conn-free core of the issuer and verifier roles, targeting the HAIP profile.
Issue and verify IETF SD-JWT VC (
Attesto.SdJwt/Attesto.SdJwtVc), ISO 18013-5 mdoc (Attesto.Mdoc, CBOR + COSE_Sign1), and W3Cjwt_vc_json(Attesto.JwtVc), all with holder key binding. OID4VCI issuance primitives (Attesto.CredentialOffer,CredentialRequest,CredentialResponse,CredentialProof,CredentialIssuerMetadata,WalletAttestation,KeyAttestation) and OID4VP presentation primitives (Attesto.PresentationRequest,VpToken,PresentationSession+ store) including DCQL,direct_post/ encrypteddirect_post.jwtwith a per-request ephemeral response-encryption key, and the x509client_idschemes. PlusAttesto.StatusList(IETF Token Status List),Attesto.Siop(SIOPv2 Self-Issued ID Token verification for the RP role, withsub_jwkself-signature, RFC 7638 subject binding, and fail-closed nonce/exp/iat/nbfchecks), and OpenID Federation support. - Signed Credential Issuer Metadata (
CredentialIssuerMetadata.signed/2), thex5cheader anddc+sd-jwttyp for SD-JWT VC issuance, and the response- encryption-key binding threaded into mdocdirect_post.jwtverification — the interoperability details exercised while driving the OIDF OID4VCI/OID4VP conformance suites green.
[1.7.0] - 2026-08-02
Security
DPoP replay identities are now namespaced by the proof key.
jtiuniqueness is only guaranteed per key (RFC 9449 §4.2), so recording the rawjtilet two keys sharing ajticollide in the replay store — a cross-client false replay and a targeted DoS in which an authenticated attacker pre-burns a victim'sjtiunder the attacker's own key.Attesto.DPoP.verify_proof/2now returnsreplay_key, a fixed-length digest ofjkt:jti, and every replay path (the plug, the token endpoint, PAR, device authorization) records THAT.Upgrade note: the recorded identity's format changed (raw
jti→ digest). During a rolling upgrade, old and new nodes write different formats to a shared replay store, so a single proof could be accepted once on each side within its acceptance window (max_age + skew, default ~120s). Drain old nodes and wait out one proof lifetime, or briefly stop the world, to close that window. A fresh deployment is unaffected.A batch of fail-closed / correctness fixes found by a full-surface adversarial sweep and two rounds of external review:
Attesto.DPoPreplay TTL now retains thejtione second past the inclusive freshness boundary, closing a sub-second edge-of-life replay gap.Attesto.IdentityAssertionrejects a present non-integernbfinstead of treating it as absent (:invalid_claims).Attesto.RequestObjectparameter coercion is total: a request-object claim that is a list with a non-string member is dropped rather than raising.- CIBA signed authentication requests reject an authorization-endpoint
request object (
typ: oauth-authz-req+jwt);typcomparison follows RFC 7515 §4.1.9 for theapplication/prefix. Attesto.JARMreserved claims (iss/aud/iat/exp) can no longer be shadowed by a caller's atom- or charlist-keyed duplicate.Attesto.SessionStaterejects an OP browser-state secret under 32 bytes and asession_statesalt containing a space or., and serializes the browser origin closer to the WHATWG form (lowercase scheme/host, bracketed IPv6).
Changed
The
:replay_checkcallback andverify_proof/2'sreplay_keycarry an OPAQUE replay identity (a digest), not the rawjti; do not parse it. The[:attesto, :dpop, :replay_detected]telemetry still carries the raw clientjtifor correlation.Attesto.Scope.grants_all?/3is now linear in the requested-scope count. It previously rescanned the granted set and re-split resource wildcards for every (required, granted) pair, so a large caller-suppliedscopevalue - on which RFC 6749 §3.3 places no bound - was a denial-of-service lever: 500,000 scope tokens took ~20 seconds. Classifying the granted set once and testing each required scope against that index in O(1) drops the same input to ~40ms. For every proper-list input (the typespec's contract) the result is identical to the naive form, pinned by a generated property test; an improper list now raises rather than short-circuiting, a louder failure on a value the contract already forbids. Surfaced by mining the class behind Keycloak CVE-2026-4634.
[1.6.0] - 2026-08-01
Security
Claim a DPoP proof's
jtionly after the access token has verified.Attesto.Plug.Authenticateran:replay_checkduring proof validation, two steps beforeverify_token. That callback is check-AND-record — the default claims the identifier with:ets.insert_new/2in the same step that tests it — so an unauthenticated caller wrote a row on every request. A DPoP proof is signed by a key the caller generated, so anyone can mint a valid one, pair it with any string in theAuthorizationheader, and grow an unbounded ETS table for the cost of a signature.The guarantee is unchanged: the claim still happens before the request is served, it is still the same atomic check-and-record, and a replayed
jtion an otherwise-valid request is still refused (RFC 9449 §11.1).The authorization-server path needed the same fix, in
attesto_phoenix— an earlier draft of this entry claimed it did not, on the grounds that%Request{}carries an authenticated client. That is false for a public client (RFC 6749 §2.1), which presents aclient_idand no credential, so the same unauthenticated write was reachable at the token endpoint. See that package's changelog.Attesto.SecureCompare.equal?/2no longer short-circuits on a length mismatch. Both operands are hashed to 32 bytes and those digests are compared, so the comparison no longer separates "wrong length" from "right length, wrong bytes" — the distinction an attacker probes with. A matching pair does one extra byte comparison to rule out a digest collision; that branch separates right from wrong, which the answer already reveals.Attesto.PKCE.verify/3was never exposed - it gates onAttesto.Thumbprint.valid?/1, which requires an exact byte size - butAttesto.DPoP'sathcomparison takes an arbitrary-length value straight from the presented proof, so it was, and it is the caller this most benefits.Note what the change does and does not buy: the comparison no longer reveals HOW the operands differ, but hashing reads every byte, so its duration still depends on their total size.
Added
Attesto.Telemetry—:telemetryevents for the refusals that mean someone holds a credential they should not:Event Fires when [:attesto, :refresh_token, :reuse_detected]a rotated token is presented again; the family has been revoked [:attesto, :dpop, :replay_detected]a proof carries an already-recorded jti[:attesto, :token, :sender_constraint_mismatch]a sender-bound token is presented with the wrong proof of possession Previously these returned an atom and nothing else, so a host that wanted to alert had to wrap every call site. Metadata carries correlation handles (
family_id,client_id,subject,jti,binding,reason). No credential or digest of one is ever copied into an event, but some handles are read out of credentials -jtifrom the proof,client_idfrom the token - andjtiis the client's to choose, so a handler should treat metadata as untrusted input. The events are indicators to correlate, not proof of theft. Ordinary failures — expired, unknown client, wrong scope — are deliberately not events. Event names and metadata keys are public API; see the module docs.Adds
:telemetryas a dependency.Attesto.DPoP.verify_proof/2now reports thereplay_ttlit derived, so a caller claiming thejtiitself uses that verification's own acceptance window rather than re-deriving the formula.
Documentation
Attesto.DPoP.ReplayCachenow namesAttestoPhoenix.Store.EctoReplayCheckas the shared-store implementation to use on a multi-node deployment. It previously described one in the abstract ("e.g. a Postgres-backed cache"), which read as an instruction to go and build something the family already ships.
[1.5.0] - 2026-07-28
Security
Reject a Client ID Metadata Document whose
redirect_uriscontain a URI that RFC 3986 and the WHATWG URL Standard read differently ({:error, :invalid_redirect_uris}).A CIMD document is fetched from a URL the client itself chose, so its
redirect_urisare supplied by the client in a way a host-registered set is not. Elixir'sURIfollows RFC 3986 while the browser that receives theLocationfollows WHATWG, and the two disagree about some authorities: inhttps://evil.example\@client.example/cb, RFC 3986 readsevil.example\as userinfo andclient.exampleas the host, while WHATWG treats the backslash as a path separator and navigates toevil.example.Any check phrased in terms of a host or an origin — the CIMD draft's same-origin tightening, a deployment's origin allow-list — is decided with the first parser and enforced by the second, so such a URI could pass the check and still send the authorization response off-origin. Refusing the document keeps the URI out of the registered set those checks ever run against.
Byte-exact matching (RFC 6749 §3.1.2.3) was never affected: it compares strings, not origins. The RFC 8252 §7.3 loopback exception was never affected either, because it anchors on the whole authority rather than the parsed host —
http://evil.example\@127.0.0.1/cbwas already refused.
Added
Attesto.RedirectURI.unambiguous?/1, the predicate behind the above: whether every URL parser agrees which origin a URI names. It refuses backslashes, userinfo, and C0 controls/whitespace anywhere in the URI. Exposed so a host applying its own origin-level policy to a redirect URI can gate on the same rule.This governs what may be registered; it is not a matching mode and does not change what
registered?/3accepts.
Changed
- The WHATWG parity suite now pins a second invariant alongside the loopback
one: for every URI
unambiguous?/1admits, the host RFC 3986 reads and the host WHATWG reads are the same string.
[1.4.1] - 2026-07-28
Documentation
Reconcile RFC 9700's wording of the loopback exception with the rule
Attesto.RedirectURIactually implements. RFC 9700 §2.1 and §4.1.3 phrase it as applying to "localhostredirection URIs of native apps", which reads wider than this module's literal-IP-only rule and could be mistaken for a conformance gap. Both texts define the exception by reference — "as described in Section 7.3 of [RFC8252]" — and §7.3 constructs the URI from the loopback IP literal, not the name, solocalhostthere is shorthand for "the loopback interface" and §7.3's construction is the normative content.No behavior change: 1.4.0 already implements exactly this. A
localhostredirect URI still matches exactly; it just gets no port flexibility.State in the README's RFC table where the §7.3 opt-in lives — the core defaults to exact RFC 6749 §3.1.2.3 matching and the caller selects
:exact_allow_loopback_portper request — rather than the vaguer "opt-in, off by default".
[1.4.0] - 2026-07-28
Added
RFC 8252 §7.3 loopback interface redirection, as an opt-in redirect-URI matching mode.
Attesto.AuthorizationRequest.validate/2accepts:redirect_uri_matching, which is:exact(the RFC 6749 §3.1.2.3 simple string comparison) unless a host selects:exact_allow_loopback_port. Under the exception a native app's loopback redirect URI matches on any port, so an ephemeral port bound at runtime need not be registered ahead of time, while scheme, host, path, and query still compare exactly. The relaxation is scoped tohttp://127.0.0.1/...andhttp://[::1]/...; RFC 8252 §8.3 makeshttp://localhost/...unacceptable, andhttps, private-use schemes, and every remote host stay exact-match. An unmatched redirect URI is still classified{:direct, :redirect_uri_not_registered}and is never used as a redirect target. The new matching logic lives inAttesto.RedirectURI.The two sides of the comparison differ in one respect: a port on the request URI must be decimal
1..65535or absent, since it names an endpoint a browser is about to be redirected to, while the registered URI's port is discarded and so may be anything — including the conventional:0placeholder.Defaults are unchanged: without the option, redirect matching is byte-identical to previous releases. Enabling the exception is incompatible with profiles that mandate exact redirect-URI matching, so it must be a deliberate deployment decision. Redemption-time
redirect_uricomparison inAttesto.AuthorizationCodeis unaffected — the code is bound to the URI the client actually presented, ephemeral port included, and still matches exactly.
[1.3.0] - 2026-07-25
Changed
- Admit compatible JOSE releases through the 1.x line while retaining 1.11.12 as the minimum security- and runtime-compatible version. This lets hosts use newer native cryptographic adapters without another Attesto release.
Fixed
- Derive OIDC
at_hashandc_hashclaims for Ed25519-signed ID Tokens with SHA-512 and Ed448-signed ID Tokens with SHAKE256, matching their signature primitives and interoperable OIDC validators. Previously EdDSA used SHA-256 unconditionally, contrary to OIDC's generic hash rule when applied to RFC- ID Token and logout-token minting now snapshot the signing PEM once so
algorithm, curve-specific hash,
kid, and signature cannot straddle a keystore rotation. Algorithm selection remains bound to trusted keystore metadata and key material; Ed448 uses JOSE's configured Curve448 and SHA3 backends. The ambiguous keylesshash_alg/1andhash_half_bytes/1helpers remain Ed25519-compatible but are deprecated in favor of key-awareoidc_hash_profile/2andoidc_hash/3. A missing SHAKE256 backend now raises a direct configuration error.
- ID Token and logout-token minting now snapshot the signing PEM once so
algorithm, curve-specific hash,
- Support RFC 9864's exact
Ed25519andEd448JOSE identifiers in trusted key metadata, signing, verification, ID Token hash profiles, and DPoP while retaining legacyEdDSAinference for wire compatibility. DPoP discovery advertises the new identifiers only when the configured JOSE backend reports them available. Default FAPI client-assertion, signed-request-object, and CIBA policies accept EdDSA only over a trusted Ed25519 key and accept exact Ed25519, never Ed448, and require PS256 RSA moduli to be at least 2048 bits; an explicit non-FAPI allowlist can opt into Ed448 or a weaker RSA key, while named FAPI policies retain the key gate when their algorithm list is narrowed. DPoP rejects RSA proof keys with moduli below 2048 bits for every accepted RSASSA and RSA-PSS proof algorithm. FAPI server keystores must also provision RSA keys of at least 2048 bits; generic keystore resolution remains profile-neutral for backward compatibility.
Documentation
- Correct the token, ID Token, logout-token, and keystore documentation to describe Attesto's existing multi-algorithm support. Signing and verification bind RS256, PS256, ES256, ES384, ES512, legacy EdDSA, Ed25519, or Ed448 to trusted keystore metadata or the key type and curve; verification never learns algorithm policy from a presented JWS header.
[1.2.5] - 2026-07-17
Fixed
- Require JOSE 1.11.12 or later on the 1.11 release line. JOSE 1.11.9 and
1.11.10 cannot encode or decode EC private keys on OTP 28 after OTP changed
the
ECPrivateKeyversion representation. JOSE 1.11.11 fixed EC handling but introduced a builtin-JSON regression that encoded Elixirnilas the string"nil"; 1.11.12 is the first release to include both fixes. Attesto's public API and runtime policy are unchanged.
[1.2.4] - 2026-07-16
Security
- Require JOSE 1.11.9 or later on the 1.11 release line. This excludes releases affected by the PBES2 iteration-count denial of service and avoids the unintended runtime Dialyxir dependency published in JOSE 1.11.7 and 1.11.8.
[1.2.3] - 2026-07-16
Security
- Constrain the optional Plug dependency to advisory-safe patch lines while retaining compatibility across Plug 1.16 through 1.20. This prevents package resolution from selecting affected releases between otherwise-safe lower and upper bounds; Attesto's runtime behavior is unchanged.
[1.2.2] - 2026-07-16
Fixed
- Token verification, RFC 7662 introspection, and protected-resource Plug authentication can now validate access tokens against an explicit, trusted set of RFC 8707 resource audiences without disabling audience checks. The Plug policy is configured per protected resource. Scalar audiences must occur in the configured set; every member of an array audience must be trusted. The default verifier behavior remains unchanged when no trusted set is supplied, and malformed policy fails closed.
Security
- Raise the optional Plug dependency floor to 1.19.5, excluding releases with published multipart temp-file exhaustion, nested-parameter quadratic-time denial-of-service, and cookie attribute-injection advisories.
[1.2.1] - 2026-07-08
Fixed
Attesto.Keystore.Staticnow labels the signing key's ownkidwith the configured:signing_alg, so a keystore that signsPS256(or any alg other than the one inferred from the key type) with a single key no longer needs a redundant:key_algsentry to verify its own tokens. Previously, settingsigning_alg: "PS256"on an RSA key without a matching:key_algsmap made verification inferRS256from the key and reject the server's own tokens as:invalid_signature. An explicit:key_algsentry for thatkidstill wins.
[1.2.0] - 2026-07-08
Changed
Attesto.Confignow raises a guiding error when the:issueris not anhttpsURL (RFC 8414 §2). Instead of a bare rejection, the message points developers at mkcert to serve a locally-trusted certificate so the issuer stayshttps— local development never needs to downgrade to plain http. There is deliberately no https-disable switch in the library.
[1.1.0] - 2026-07-07
Added
- OpenID Connect Client-Initiated Backchannel Authentication (CIBA Core
1.0). New
Attesto.CIBAprimitive - the device grant's async sibling:Attesto.CIBA.Request.validate/3runs the §7.1 backchannel authentication request rules (scope-with-openid, exactly-one-hint, ping/pushclient_notification_tokenentropy/length/charset,binding_message/user_code/requested_expiryshape) and verifies §7.1.1 signed authentication requests against the client's registered JWKS (all six REQUIRED claims enforced; FAPI-CIBA's 60-minute lifetime bound by default);issue/4mints a 256-bitauth_req_id(only its hash is stored) with the §7.3 acknowledgement fields;approve/4/deny/3record the user's decision atomically and return the ping-mode §10.2 notification data;redeem/4runs the token-endpoint state machine with the exact §11 vocabulary (authorization_pending/slow_down/expired_token/access_denied/invalid_grant), single-use, expiry-beats-approval, client- and DPoP-binding checked before consume. PlusAttesto.CIBA.Grant, theAttesto.CIBAStorebehaviour (every transition a single atomic guarded operation; the poll interval is frozen into the record at issue time), and an ETS reference store. Attesto.RequestObject.verify/3gains:require_iat,:require_jti, and:require_client_id_claimoptions for the CIBA signed-request profile (defaults preserve the RFC 9101 behaviour).- Discovery (
Attesto.Discovery) accepts the CIBA Core §4 metadata:backchannel_authentication_endpoint,backchannel_token_delivery_modes_supported,backchannel_authentication_request_signing_alg_values_supported, andbackchannel_user_code_parameter_supported. - OpenID Connect Front-Channel Logout 1.0 (OP side).
Attesto.FrontChannelLogout.logout_uri/3builds the exact URI an OP logout page loads in an iframe for one Relying Party: the registeredfrontchannel_logout_uriwithiss+sidquery parameters appended whenever the session'ssidis known (both together or neither, §2).Attesto.LogoutSessionStorerecords both logout channels: an entry now carriesfrontchannel_logout_uri/frontchannel_session_requiredalongside the back-channel fields, andbackchannel_logout_uriis optional — a row exists for any RP that registered at least one logout URI.Attesto.Discoveryaccepts thefrontchannel_logout_supportedandfrontchannel_logout_session_supportedhost members (§3).
- OpenID Connect Session Management 1.0 (OP side).
Attesto.SessionStatecomputes the §3.2session_statevalue (lowercase-hex SHA-256 overclient_id <> " " <> origin <> " " <> op_browser_state <> " " <> salt, dot, salt) plus the browser-formorigin/1of aredirect_uriand the salt / OP-browser-state generators — the pure computation the OP's authorization response and thecheck_session_iframe's JavaScript recomputation must agree on.Attesto.Discoveryaccepts thecheck_session_iframehost member (§3.3).
[1.0.0] - 2026-07-04
First stable release; the public API is now under semantic versioning. No functional change from 0.13.0.
The authorization-server core (tokens, ID tokens, PKCE, DPoP, PAR, discovery, RP-Initiated and Back-Channel Logout) backs an OpenID Provider that passes the OpenID Foundation conformance suite for OpenID Connect Core (Basic), FAPI 2.0 Security Profile Final, FAPI 2.0 Message Signing Final, RP-Initiated Logout, and Back-Channel Logout.
[0.13.0] - 2026-06-23
Added
- OpenID Connect Logout (RP-Initiated Logout 1.0 + Back-Channel Logout 1.0).
Attesto.LogoutTokenmints a signed Back-Channellogout_token(§2.4):typ: "logout+jwt", theeventsclaim{"http://schemas.openid.net/event/backchannel-logout": {}},iss/aud/iat/jti/short-exp, at least one ofsub/sid, and never anonce.Attesto.EndSessionis the conn-free RP-Initiated Logout validator:parse/2verifies theid_token_hint, resolves the Relying Partyclient_id(rejecting aclient_idparameter that disagrees with the hint'saud), and extracts the sessionsub/sid;confirm_redirect/2honors apost_logout_redirect_urionly on an exact match against the client's registered set and appendsstate— an unregistered or unidentifiable return URI is refused (no open redirect).Attesto.IDTokengains asidclaim (:sidmint option, OIDC Back-Channel Logout §2.1) andverify_logout_hint/2, which validates a hint's signature- issuer while tolerating expiry and reading the RP from
audrather than requiring it up front (RP-Initiated Logout §2).
- issuer while tolerating expiry and reading the RP from
Attesto.LogoutSessionStorebehaviour: the OP-side(sid, client_id) -> backchannel_logout_uridelivery map, with an atomictake_targets/1(enumerate-and-delete) so concurrent logouts cannot double-deliver.- Discovery (
Attesto.Discovery) gainsend_session_endpoint,backchannel_logout_supported, andbackchannel_logout_session_supported.
[0.12.0] - 2026-06-23
Added
- RFC 8628 Device Authorization Grant. New
Attesto.DeviceCodeprimitive (issue + the §3.5 polling state machine:authorization_pending/slow_down/expired_token/access_denied, expiry-beats-approval, single-use consume),Attesto.DeviceCode.Grant, theAttesto.DeviceCodeStorebehaviour (every transition a single atomic guarded operation), and an ETS reference store. Theuser_codeuses an ambiguity-free base-20 alphabet and is normalized + charset-validated before any store lookup.device_authorization_endpointis now an accepted RFC 8414 metadata field.
[0.11.0] - 2026-06-22
Added
- RFC 9470 Step-Up Authentication Challenge. New
Attesto.StepUp+Attesto.StepUp.Requirementprimitive: a requirement is acceptedacr_valuesand/or amax_agefreshness bound;evaluate/3checks a verified token'sacr/auth_timeclaims (conjunction, fail-closed on absent/malformed) and returns the §3 challenge params. Attesto.Token.mint/3accepts optional:acr/:auth_time, written as access-token claims (the carrier a resource server enforces step-up against).Attesto.RefreshTokencarries the originalacr/auth_timeacross rotation unchanged, so a refresh-minted access token reports the real authentication event (auth_timeis never re-stamped).Attesto.Plug.OAuthError.insufficient_user_authentication/4(the RFC 9470 §3 401 challenge) and a:step_upoption onAttesto.Plug.Authenticatethat enforces a per-route requirement after token verification.acr_values_supportedis now an accepted protected-resource-metadata host field (RFC 9728), so a resource server can advertise theacrvalues it can demand.
[0.10.0] - 2026-06-22
Added
- RFC 8707 Resource Indicators. New
Attesto.ResourceIndicatorprimitive (validate/1for §2.1 absolute-URI syntax over the scalar/arrayresourceparameter;authorize/2for §2.2 allow-listing →:invalid_target). Attesto.Token.mint/3's:audienceoption now accepts a list of resource identifiers, written as a JWTaudarray (a single resource still collapses to a string).Token.verifyalready checks array membership, so a resource server validates that its own identifier is inaud.Attesto.AuthorizationCode/Attesto.RefreshTokenbind aresourceset alongside scope; refresh rotation carries it and narrows it subset-only (a requested resource outside the granted set is:invalid_target).Attesto.AuthorizationRequestparses and validates theresourceparameter, surfacing a malformed value as a redirectableinvalid_targeterror.
[0.9.0] - 2026-06-21
Changed
Attesto.Plug.Authenticatebearer presentation methods are explicit and header-only by default. The new:bearer_methodsoption accepts:header/"header"and:body/"body"; it defaults to[:header]. A resource server that intentionally accepts RFC 6750 §2.2 form-bodyaccess_tokencredentials must opt in withbearer_methods: [:header, :body]and advertise the matchingbearer_methods_supportedmetadata. URI-query bearer tokens remain unsupported. DPoP, mTLS, and host-provided:credential_from_connfallback credentials are unchanged.
[0.8.1] - 2026-06-21
Changed
Attesto.Plug.OAuthError.insufficient_scope/4now honors the transport hooks. The 403 scope-rejection path threads the same:send_error,:www_authenticate, and:no_storeoptionsunauthorized/4already honored, so a resource server can override the 403 response envelope and inject a per-conn challenge (e.g. a request-derived RFC 9728resource_metadatapointer) on the scope-rejection path, not just the authentication-rejection path. Theinsufficient_scopecode, 403 status, and theerror_description/scopechallenge semantics remain owned by the renderer; the default response is byte-identical when no hooks are passed.Attesto.Plug.RequireScopesnow threads those transport hooks onto both the 403insufficient_scopeand the 401invalid_tokenit renders, alongside the existing:resource_metadatapointer. Previously they were dropped, so a host could not override the scope-rejection envelope through this plug.
[0.8.0] - 2026-06-20
Added
Attesto.ProtectedResourceMetadata— renderer for the RFC 9728 OAuth 2.0 Protected Resource Metadata document (the resource-server analogue ofAttesto.Discovery).metadata/2returns the string-keyed map a resource publishes at/.well-known/oauth-protected-resource: the REQUIREDresourceidentifier (defaulting toconfig.audience, overridable via:resource) plus the nil-droppable RFC 9728 §2 host fields (authorization_servers,jwks_uri,scopes_supported,bearer_methods_supported,resource_signing_alg_values_supported,authorization_details_types_supported, theresource_name/documentation/ policy/ToS members,tls_client_certificate_bound_access_tokens,dpop_bound_access_tokens_required,dpop_signing_alg_values_supported, andsigned_metadata). A present-but-malformed:resource(the REQUIRED member) fails fast withArgumentError. Conn-free; mounting a serving endpoint is the host's concern.RFC 9728 §5.1
resource_metadatachallenge pointer.Attesto.Plug.OAuthError.unauthorized/4andinsufficient_scope/3,4now append aresource_metadata="<url>"auth-param to theWWW-Authenticatechallenge when a:resource_metadataopt is present, so a client refused with 401/403 can discover the resource's protected-resource metadata (and thereby its authorization server). Threaded throughAttesto.Plug.Authenticate(:resource_metadatainit opt) andAttesto.Plug.RequireScopes(:resource_metadatainit opt). Omitted when unset.Attesto.Token.mint/3:audienceoption — a per-call override for the access token'saudclaim, defaulting toconfig.audience. RFC 8707 §2: when a token request carries aresourceindicator the access token'saudMUST identify that resource; the host derives the resource identifier and passes it here. The override is conn-free and does not mutateconfig, so one issuer can mint resource-audienced tokens for one grant without changingaudfor any other. A present-but-malformed override (anil,"", list, or other non-string) is rejected{:error, :invalid_audience}rather than minted, so a miswiredresourcecannot produce a malformedaud.Attesto.IdentityAssertion— verification for the Identity Assertion JWT Authorization Grant (ID-JAG), the resource Authorization Server's half ofdraft-ietf-oauth-identity-assertion-authz-grant-04(the grant behind MCP Enterprise-Managed Authorization). Conn-free and side-effect-free:verify/3checks the assertion's signature against a caller-supplied trusted issuer JWKS (kid selection,RS256/PS256/ES*/EdDSA) and enforces the draft's claim rules — JOSEtyppinned tooauth-id-jag+jwt,issmatches the trusted issuer (NOT theclient_id),audis exactly this server's issuer (strict single value), the requirediss/sub/aud/client_id/jti/exp/iatclaims,client_idbinding, andexp/iat/nbfskew with an optional:max_lifetime_secondsbound.peek_issuer/1reads the unverifiedissso the caller can select the trusted issuer before verifying. The stateful concerns (JWKS fetch/cache,jtireplay, subject resolution, error mapping to RFC 6749invalid_grant) belong to theattesto_phoenixtoken layer. Distinct fromprivate_key_jwtclient auth (RFC 7523 §3) and the RFC 8693 token-exchange grant (which runs at the IdP).
[0.7.2] - 2026-06-16
Added
c:Attesto.CodeStore.get/1(OPTIONAL callback) — read a stored authorization code WITHOUT consuming it (unliketake/1). Implemented by the bundledAttesto.CodeStore.ETS. Lets the token endpoint run read-only pre-checks (e.g. a holder-of-key requirement) without burning the single-use code.Attesto.AuthorizationCode.dpop_bound?/2— returns whether a stored code is bound to a DPoP key (RFC 9449 §10), via the store's non-consumingget/1. Used to surface a holder-of-key (invalid_request/invalid_dpop_proof) rejection ahead of the client-auth error at the token endpoint (FAPI2ensure-holder-of-key-required), without consuming the code. Returnsfalsewhen the store has noget/1, so behaviour is unchanged for stores that don't implement it.
[0.7.1] - 2026-06-14
Security
- Refresh-rotation grace no longer replays an already-rotated successor.
RefreshToken.rotate/3's within-grace idempotent-retry path returned the parent's cached successor without checking it was still the live, unconsumed leaf. AfterA → B → C, a replay of the captured parentAinside the grace window re-issuedB(and minted a fresh access token from it) instead of detecting reuse — suppressing the OAuth 2.0 Security BCP §4.13 captured-token signal and forking a live chain. The grace retry now confirms the cached successor is still unconsumed; if it has been rotated onward, the replay is treated as reuse and the whole family is revoked.
Added
Attesto.AuthorizationRequestcarriesdpop_jkt. The validated request now exposes the RFC 9449 §10dpop_jktparameter, read from the EFFECTIVE (post-request-object-merge) params — so a signed request object'sdpop_jktis authoritative and an unsigned outer-query value is ignored when a request object is present. (Consumed byattesto_phoenix's authorization endpoint, which previously read it from the raw outer query.)
[0.7.0] - 2026-06-14
Added
Attesto.ClientIdMetadata— the pure core of Client ID Metadata Documents (CIMD,draft-ietf-oauth-client-id-metadata-document-01). CIMD lets a client identify itself with no prior registration by using an HTTPS URL as itsclient_id; the authorization server dereferences that URL to a JSON client metadata document. This module is the conn-free, HTTP-free half:client_id_url?/1andvalidate_client_id/1enforce the draft §2 URL grammar (https, path required, no fragment/userinfo/dot-segments);validate_document/2validates a fetched document (theclient_idmust equal the URL, no shared symmetric secret /client_secret_*auth method, a non-emptyredirect_uris) and normalizes it into the same client shape the RFC 7591 registration path produces. The network half (SSRF-guarded fetch, caching) lives inattesto_phoenix; this module touches no socket and adds no dependency.Attesto.Discoveryadvertises theclient_id_metadata_document_supportedauthorization-server metadata field when the host enables it.
[0.6.16] - 2026-06-13
Fixed
Authorization-code redemption is now atomic.
Attesto.AuthorizationCode.redeem/4no longer records the reuse marker (consumed_success) itself; that moved to the newfinalize/3, which the caller runs ONLY after the full token response is successfully built. So a code whose redemption validated but whose downstream issuance then failed (a mint or refresh-store fault, a hostbuild_principalcallback returning the subject under the wrong key) is left single-use-spent but NOT reuse-flagged: a replay is a cleaninvalid_grantinstead of a false reuse attack that revokes the family, and a legitimate retry of a transient failure is not mistaken for an attack. Previously any post-validation failure permanently bricked the code AND marked it a successful redemption.Caller change: after a successful token response, call
AuthorizationCode.finalize/3to record the reuse marker. The bundledattesto_phoenixtoken endpoint (>= 0.7.7) does this. Stores that do not implement the optionalmark_consumed/2are unaffected.
[0.6.15] - 2026-06-12
Fixed
Attesto.RequestObjectcompares the JOSEtypheader CASE-INSENSITIVELY (RFC 7515 §4.1.9typis a media type; RFC 2045 §5.1 media types are case-insensitive). The FAPI 2.0 Message Signing conformance suite signs request objects with a randomly-cased typ (e.g.OautH-auThZ-REQ+jWt) to exercise this; the previous exact-match rejected them asinvalid_typ, failing the Message-Signing happy-flow / user-rejects tests at the PAR endpoint. A wrong type is still rejected; an absenttypis still governed byaccepted_typ.
[0.6.14] - 2026-06-12
Fixed
Attesto.RequestObject.Policy.fapi_message_signing/0no longer requires the JOSEtypheader on signed request objects - it now accepts an absenttyp(accepted_typ: ["oauth-authz-req+jwt", nil]) while still rejecting a wrong one. FAPI 2.0 Message Signing §5.3.1 ("shall accept that typ") and RFC 9101 §4 maketypRECOMMENDED, not mandatory, and the OpenID FAPI conformance suite signs its request objects with notypheader - so the previous strict pinning rejected every conformant pushed request object and failed the FAPI2 Message Signing certification at the PAR endpoint.typis still validated for the RFC 9101 §10.8 explicit-typing defence when a client does send it.
Security
Attesto.DPoPnow applies the strict canonical-base64url check to the proof's JOSE header (no padding, no non-significant trailing bits) that the Token/IDToken/ClientAssertion/RequestObject verifiers already apply, so a DPoP proof header cannot be presented in a non-canonical/aliased encoding. Defense-in-depth (the signature is verified over the real bytes regardless).
[0.6.13] - 2026-06-04
The FAPI 2.0 Message Signing surface: signed request objects (JAR, §5.3), signed authorization responses (JARM, §5.4), and token introspection with signed responses (§5.5). All additions are backward-compatible; behaviour is unchanged unless a caller opts into the new policy/options.
Added
Attesto.JARM— JWT Secured Authorization Response Mode (§5.4). Signs an authorization response (success:code/state; error:error/error_description/state) into a JWT carryingiss/aud/exp/iat, using the keystore signing key (algorithm pinned, nevernone).Attesto.Introspection— OAuth 2.0 Token Introspection (RFC 7662). Access tokens are introspected statelessly with the fullAttesto.Tokenverifier except the sender-binding proof match (thecnfis echoed for the resource server); refresh tokens are checked against anAttesto.RefreshStore(active only while unconsumed and unexpired). Never an error — an invalid, expired, revoked, or unknown token is reported inactive (no existence oracle).Attesto.SignedIntrospection— the RFC 9701 signed introspection response (a JWT withiss/aud/iatand atoken_introspectionclaim, JOSE headertyp="token-introspection+jwt").Attesto.RequestObject.Policygainsrequire_request_object(false ingeneric/0, true infapi_message_signing/0) andrequire_request_object?/1.Attesto.AuthorizationRequest.validate/2rejects a request that carries no signed request object when the policy requires one (redirectableinvalid_request; non-redirectable when the client is untrusted, OIDC Core §3.1.2.6).Attesto.AuthorizationRequestparses and validatesresponse_mode(the RFC 6749queryplus the JARM modesjwt/query.jwt/fragment.jwt/form_post.jwt);supported_response_modes/0exposes the accepted set. Trusted redirectable errors carry the requestedresponse_modeand theclient_idso the transport can return the error as a JARM JWT.Attesto.Discoveryallowlists the RFC 9101 §10.5 metadata membersrequire_signed_request_objectandrequest_object_signing_alg_values_supported.Attesto.SigningAlg.keystore_algs/1— the unique signing algorithms across a keystore's verification keys (shared by the ID Token / JARM / introspection signing-algorithm metadata).Attesto.Token.verify/3acceptsrequire_confirmation_binding: falseto verify a token's signature/claims while skipping only the sender-binding proof match (used by introspection); thecnfshape is still validated.Attesto.Introspection.introspect/3accepts an:authorizepredicate(response -> boolean)consulted with the active response before it is returned (RFC 7662 §4 / RFC 9701 §5: the AS MAY restrict which tokens a caller may introspect). A non-truereturn — or a raise — downgrades the response to%{"active" => false}so a caller not authorized for the token learns nothing about it. When omitted, every authenticated caller may introspect any token (the single-trust-domain default).Attesto.Introspectionsurfaces the RFC 7662sub/scope/client_id/cnfmembers for an active refresh token from the stored record's own data contract (Attesto.RefreshTokenbuild context), when present, so a resource server — and an:authorizepolicy — can decide per refresh token rather than allow/deny every refresh token wholesale. A store that does not populate them yields the minimalactive+expresponse.
Security
Attesto.AuthorizationRequest.validate/2now judges the OIDCopenid-scope gate for therequire_noncepolicy on the EFFECTIVE (post-merge) request, so a direct JAR carryingscope=openidonly inside the signed request object can no longer bypass the host's nonce requirement. A plain OAuth request (noopenidscope) remains un-nonce-constrained.Attesto.RequestObject.verify/3rejects a signed request object whoseaudis an array containing any non-string member (RFC 7519 §4.1.3), rather than accepting it on a single matching member — matching the hardened Token/IDToken/JARM audience handling.Attesto.RequestObject.verify/3rejects a request object that itself carries arequestorrequest_uriclaim (RFC 9101 §4 forbids them) instead of silently dropping them, so a nested-request smuggle fails closed at the verifier.
[0.6.12] - 2026-06-03
Added
Attesto.RequestObject.Policy— a data-only JAR verification policy for signed authorization request objects (RFC 9101).generic/0is the OpenID Connect §6.1 baseline (the default:nbf/exp/typnot required);fapi_message_signing/0is the FAPI 2.0 Message Signing §5.3.1 profile (nbfrequired ≤60 min past,exprequired ≤60 min afternbf, JOSE headertyp="oauth-authz-req+jwt").Attesto.AuthorizationRequest.validate/2accepts a:request_object_policyoption (default%Policy{}, generic) and threads it intoAttesto.RequestObject.verify/3. Anaudthat is an array containing the issuer is already accepted. Behaviour is unchanged unless a caller opts into the FAPI profile.
[0.6.11] - 2026-06-03
Added
:accepted_algsoption onAttesto.ClientAssertion.verify/5andAttesto.RequestObject.verify/3(defaultAttesto.SigningAlg.fapi_algs/0), so the accepted client-authentication / request-object signature algorithms are caller-supplied policy rather than a hardcoded constant. The default preserves current behaviour.Attesto.SigningAlg.default_client_algs/0as a named helper for the default client-presented signature verification policy.- Strict JAR policy options on
Attesto.RequestObject.verify/3for the FAPI Message Signing 2.0 (§5.3.1) / RFC 9101 profile::require_nbf,:max_nbf_age_seconds,:require_exp,:max_lifetime_seconds, and:accepted_typ(e.g."oauth-authz-req+jwt").:require_nbf/:require_expdemand a non-negative integer NumericDate (a missing or malformed value fails);:max_lifetime_secondsrequires bothnbfandexpanchors. These default to the prior lenient behaviour, so callers opt into strictness with explicit policy.
Fixed
Attesto.RequestObject.verify/3now honoursnbfas a not-before claim (RFC 7519 §4.1.5): a request object withnbfin the future is rejected as:not_yet_valideven in lenient mode (clock skew tolerated).
[0.6.10] - 2026-06-02
Changed
- Require a single-valued string
audin client-authentication assertions (FAPI 2). An arrayaudis now rejected even when it contains an accepted value, and the string must match an expected audience exactly.
[0.6.9] - 2026-06-02
Changed
- Restrict client-authentication assertions (
private_key_jwt) and request objects to the FAPI 2 signing algorithms PS256, ES256, and EdDSA. Assertions or request objects signed with RS256 are now rejected.Attesto.SigningAlgexposes the permitted set viafapi_algs/0. The provider's own token signing (allowed/0) is unaffected and still admits RS256.
[0.6.8] - 2026-06-02
Fixed
- Canonicalize DPoP
htuURI comparison by ignoring query/fragment, normalizing scheme and host case, and treating an explicit HTTPS default port as equivalent to an omitted port. Non-HTTPS URIs, host/path mismatches, and non-default port mismatches remain rejected.
[0.6.7] - 2026-06-01
Fixed
- Accept DPoP proof
iatvalues up to 60 seconds ahead of the server clock, matching Attesto's JWT verifier clock-skew policy. Proofs remain short-lived throughmax_age_seconds, and replay-cache TTLs now cover the full acceptance window.
[0.6.6] - 2026-06-01
Fixed
- Sign
PS256JWTs with the RFC 7518 salt length (32 bytes for SHA-256) instead of JOSE/OpenSSL's maximum salt length. This makes PS256 access tokens and ID Tokens verifiable by strict FAPI/OIDF validators while keeping Attesto's key-derived algorithm policy unchanged. - Treat signed authorization request object parameters as authoritative
(RFC 9101 §6.3). When a
requestJWT is present, unsigned query parameters no longer supplement missing signed parameters such as PKCE inputs. - Require signed request objects to carry
iss, matchingclient_id, and a configuredaud, preventing cross-client or cross-issuer replay of otherwise valid request objects. - Reject access-token-shaped payloads during ID Token verification even when the
access token JOSE
typheader is intentionally disabled.
[0.6.5] - 2026-06-01
Fixed
- Allow an authorization code that was not pre-bound with
dpop_jktto be redeemed at the token endpoint with a DPoP proof. Codes explicitly bound withdpop_jktstill require the exact same proof key at redemption. This matches FAPI-style DPoP flows where the authorization request does not pre-bind the code, but the token endpoint proof sender-constrains the access token being minted.
[0.6.4] - 2026-06-01
Fixed
- Load keystore modules before checking optional callbacks such as
verification_pems/0,key_algs/0, andsigning_alg/0. Cold modules now advertise and use their configured per-key algorithms deterministically instead of briefly falling back to inferred RSARS256metadata.
[0.6.3] - 2026-06-01
Added
- Allow OAuth authorization-server metadata (RFC 8414) hosts to advertise
authorization_response_iss_parameter_supportedandtoken_endpoint_auth_signing_alg_values_supported. These are host capability declarations; Attesto still drops nil values and ignores unlisted metadata keys.
[0.6.2] - 2026-06-01
Fixed
- Unsigned OpenID Connect request objects (
requestJWTs withalg: "none") are now rejected with the redirectablerequest_not_supportederror instead ofinvalid_request_object. Attesto still deliberately does not accept unsigned request objects; this change makes the unsupported-feature signal match OIDC Core §3.1.2.6 and the OpenID conformance suite.
[0.6.1] - 2026-05-31
Added
Attesto.Test.DPoPVerifier- a server-side DPoP verification harness for host application suites, the counterpart toAttesto.Test.DPoP. From a plain request description (method,url,headers) it verifies the presented DPoP proof and, whenverify_token: true, the access token, returning{:ok, verified}or an{:error, challenge}map carrying the HTTP status, theWWW-Authenticatechallenge, and an optionalDPoP-Nonce. It does not reimplement RFC 9449: it delegates every decision to the production verifiersAttesto.DPoP.verify_proof/2andAttesto.Token.verify/3, and mirrors the resource server's scheme handling (a DPoP-bound token presented as Bearer surfaces aDPoPchallenge, RFC 9449 §7.1; a missing required nonce surfacesuse_dpop_nonce, §8). It depends on neither Plug, Phoenix, nor any HTTP client, so it runs from any ExUnit suite.Attesto.Test.DPoP- DPoP test fixtures for host application suites (RFC 9449). Ships underlib/so a consumer can call it from itstest/tree without depending on Attesto's own test support.generate_key/1mints a proof key (EC P-256 /ES256by default);mint_access_token/4mints a DPoP-sender-constrained access token bound to that key viacnf.jkt(RFC 7800);proof/4builds a valid proof JWT for a(htm, htu)pair, optionally carryingath(RFC 9449 §4.3) and a servernonce(§8);invalid_proof/5builds a proof with a single deliberate defect (:wrong_htm,:wrong_htu,:missing_ath,:expired) for negative tests. Every fixture is built through the same primitives the production code uses (Attesto.Token.mint/3,Attesto.DPoP.compute_jkt/1,Attesto.DPoP.compute_ath/1,Attesto.SigningAlg.infer/1,JOSE.JWS), and embeds only the proof key's public half (RFC 9449 §4.2), so a fixture is correct by construction againstAttesto.DPoP.verify_proof/2and stays in step with it.
[0.6.0]
Added
Attesto.IDToken.mint/3rounds out the OpenID Connect Core §2 ID Token claim set:auth_time(REQUIRED when the request asked for it or carriedmax_age),acr,amr, andazpare accepted as optional inputs and omitted when absent. Arbitrary additional claims requested through the OIDC Core §5.5claimsparameter or a host userinfo mapping are supplied via:extra_claims, a string-keyed map merged after the protocol claims. The merge is non-overriding: a key colliding with a reserved protocol claim (iss,sub,aud,exp,iat,nonce,azp,auth_time,acr,amr,at_hash,c_hash) is rejected with:reserved_claim_conflict, and a non-map or non-string-keyed value with:invalid_extra_claims.at_hash/c_hash(OIDC Core §3.1.3.6, §3.3.2.11) were already present.Attesto.AuthorizationRequest.validate/2-:require_nonceoption (defaultfalse). Whentrue, a request with nononceis rejected with a redirectableinvalid_requesterror (OIDC Core §3.1.2.1); whenfalse,noncestays OPTIONAL and is carried through unenforced (RFC 6749 keeps thecodeflow at SHOULD). The OP policy is the host's, signalled per call.- Authorization-code reuse detection (OAuth 2.0 Security BCP §4.13 /
RFC 6749 §4.1.2).
Attesto.AuthorizationCode.issue/3accepts an optional:family_idthat links a code to the refresh-token family it spawns; it rides onto the redeemedAttesto.AuthorizationCode.Grant(new:family_idfield).Attesto.CodeStoregains an OPTIONAL reuse-tracking pair: amark_consumed/2callback and a thirdtake/1return value{:error, :consumed, meta}. When a store implements them,redeem/4records the spent code'sfamily_id/subjectand surfaces a later replay of that code as{:error, {:reuse, meta}}so the caller can revoke the descendant family. The addition is purely additive and fail-safe: a store that does not implement the pair keeps the{:ok, entry} | :errortake/1contract and a re-presented code stays{:error, :invalid_grant}, with single-use atomicity unchanged. - Refresh-token rotation grace for honest retries.
Attesto.RefreshToken.rotate/3now returns the same successor when the just-consumed parent is immediately retried by the same client, DPoP binding, and narrowed scope within:rotation_grace_seconds(default10). Outside that window, or on any mismatch, reuse still revokes the whole family.Attesto.RefreshStoreentries now carry:consumed_atand:successor, and stores may implementremember_successor/3to support the idempotent retry path. Attesto.Plug.Authenticateaccepts a:credential_from_connfallback hook for host-owned credential channels such as first-party cookies. TheAuthorizationheader remains authoritative when present; the callback is consulted only when no usable header credential exists.Attesto.Plug.OAuthErrorsupports transport hooks (:send_error,:www_authenticate,:no_store) so hosts can preserve their API error envelope while Attesto owns the OAuth status/challenge semantics.
Changed
Attesto.AuthorizationRequest.validate/2-prompttokens are now validated against the fixed OIDC set{none, login, consent, select_account}; an unknown token is a redirectableinvalid_requesterror (OIDC Core §3.1.2.1). The parsed list is still exposed for the controller, which enforces semantics such asprompt=none(the OP MUST NOT show UI).- The former
consume/2callback onAttesto.RefreshStorereceives rotation options such as the claim timestamp and returns consumed records with enough metadata for retry/reuse decisions. This is the intentional 0.6 store-contract change.
Security
- Closed a JWS signature-malleability gap in the compact-form boundary of
both
Attesto.Token.verify/3andAttesto.IDToken.verify/3. The boundary previously checked each segment against the base64url alphabet only (RFC 4648 §5), which accepts a non-canonical final character: the 342-byte RS256 signature segment is a partial quantum (342 rem 4 == 2) whose last character carries four unused low-order bits, so several distinct characters decode to the same signature bytes (RFC 4648 §3.5). JOSE's liberal decoder normalises such a variant and verifies it, so a tampered serialization that is not byte-identical to the issuer's token was accepted. The boundary now requires each segment to round-trip throughBase.url_decode64/2andBase.url_encode64/2byte-identically, rejecting padding, non-alphabet bytes, and non-zero unused trailing bits in one check, before the token reaches JOSE. Canonical unpadded base64url tokens are unaffected; the empty signature segment of analg:nonetoken still round-trips and is classified:invalid_signature.
[0.5.1]
Added
Attesto.IDToken- mint and verify OpenID Connect ID Tokens (OIDC Core 1.0 §2), includingat_hash/c_hashgeneration,nonce, and the client-id audience and genericJWTtypthat distinguish an ID Token from an RFC 9068 access token. Shares the keystore/kid/RS256 path withAttesto.Token.Attesto.AuthorizationRequest- protocol-shape validation for the authorization endpoint (RFC 6749 §4.1.1, OIDC Core §3.1.2.1, PKCE §4.3):response_type,client_id, exact-matchredirect_uri, scope/openiddetection, and the PKCE parameters.Attesto.OpenIDDiscovery- the OpenID Provider Metadata document (OIDC Discovery 1.0 §3) served from/.well-known/openid-configuration, built on top ofAttesto.Discovery.mix checkalias running formatting,--warnings-as-errorscompile, property tests, and Credo strict in one command.
Security
- DPoP replay cache: closed a race in the expired-entry re-admission path.
Attesto.DPoP.ReplayCache.check_and_record/2performed a non-atomic lookup-then-insert, so at the exact TTL boundary two concurrent callers could both re-admit a just-expiredjtiand a proof could be replayed more than once. Re-admission is now a single atomic compare-and-delete (:ets.select_delete/2guarded on expiry) followed byinsert_new/2, so exactly one caller wins and the losers see:replay. - Token verification now enforces canonical compact-JWS form at its own
boundary.
Attesto.Token.verify/3andAttesto.IDToken.verify/3reject any=padding or non-base64url byte in a compact segment before the token reaches JOSE, refusing to verify a serialization the issuer never emitted (JOSE's decoder would otherwise tolerantly normalize trailing padding). Unpadded base64url tokens are unaffected.
Fixed
- Documentation: the authorization-code single-use note now links the
Attesto.CodeStoretake/1callback with the correct callback reference, clearing a docs-build warning.