v0.4.0.
Post-quantum exports and audit logs that don't name the people in them.
Released 6 December 2026. All releases
Highlights
Post-quantum exports
An export of your users is encrypted only to hybrid ML-KEM-768 + X25519 keys or a passphrase, so password hashes and second-factor secrets in it stay safe even from a future quantum computer. Read the docs: Post-quantum exports
Audit logs that don't name people
Addresses and federated identities in the audit log are HMAC pseudonyms under a secret audit key, so a copy of the log can't be matched against a list of addresses or GitHub user IDs. Read the docs: Audit logs that don't name people
All changes
Changed
Show 2 changed entriesHide changed
- **
password.Newrequires an audit key.** Create the service withauth.WithAuditKey(key), wherekeyis at least 32 random bytes kept for the life of the audit log.auth.EmailLabelis replaced byService.EmailLabel, andService.PseudonymandService.HasAuditKeyare added. A service without an audit key labels every addressemail. - The server generates an audit key on its first start, sealed under the master key as key kind
audit. It doesn't rotate, because a new key gives every address a new label. A server that imports an export generates its own key, so labels from before and after the import differ.
Security
Show 7 security fixesHide security
- Address labels in the audit log no longer reveal the address to anyone with a list of candidates. A label was the first 8 bytes of a plain SHA-256 of the normalized address, so anyone with a copy of the audit log could hash candidate addresses and confirm who appears in it. Labels are now an HMAC-SHA256 under a secret audit key, truncated to 128 bits, and per-address rate-limit keys, which a backend such as Redis stores, use the same key. Events recorded before the change keep their old labels, and the hash chain stays valid.
- Federated identity labels in the audit log no longer name the person to anyone with the log.
federationlabelled an identityfederated:<provider>:and the first 8 bytes of a plain SHA-256 of the issuer and subject. A GitHub subject is the public numeric user ID, so anyone with a copy of the audit log could hash every ID up to about 250 million and name each GitHub sign-in. With an audit key fromauth.WithAuditKey, the label isfederated:<provider>:and a 128-bitService.Pseudonymof the issuer and subject; without one, it isfederated:<provider>, which names no identity, asemailnames no address. Identities are still looked up by issuer and subject, so linked identities keep working. Events recorded before the change keep their old labels, the hash chain stays valid, and link and unlink events from before and after the change carry different labels for the same identity. - **
auth.Newrefuses an audit key whose bytes all have the same value.** It checked only the length, so an all-zero key frommake([]byte, auth.MinAuditKeySize), which every test in the repository used, passed, and an application that copied that code got a key anyone could guess, which turns every label back into an unkeyed hash.auth.Newrefuses such a key withErrInvalidInput, and the tests use random keys. - Exports are encrypted only to post-quantum keys. An export holds password hashes, TOTP secrets, and recovery codes that must stay confidential for years, and a classic X25519 age key could be broken later by a quantum computer, exposing files recorded today.
authexport.Exportrefuses, withErrClassicRecipient, any recipient that age doesn't label post-quantum: a classic X25519, SSH, or plugin key, or a type that wraps another recipient, andtensile-auth-server exportaccepts only hybrid ML-KEM-768 + X25519 recipients (age1pq1…, fromage-keygen1.4 or later) or a passphrase. Importing a file encrypted to a classic key still works. Thefilippo.io/agedependency moves to v1.4.0. - A return path with dot segments can't send a person to another site after sign-in.
authhttp.SafeReturnToand the elements'safeReturnTorefused a path that starts with//, but not one that starts with//only after a browser removes its.and..segments, for example/.//evil.example,/x/..//evil.example, or/%2e//evil.example. Both refuse any.or..segment, plain or percent-encoded. The Next.js example'snextPathreturned such a resolved path,//evil.example, and sent the person there after sign-in or step-up; it refuses it and returns an absolute URL on the app's origin. ThenextPathand step-up snippets in the Node.js guide refuse a backslash, a control character, and a path that resolves to//. - **The SDK's
rebuildRequestkeeps the request on the app's own origin.** A forwarded path such as/\evil.exampleor one with a tab or newline resolved to another host, because URL parsing reads a backslash as a slash and drops control characters. Such a path now resolves to/. - **
mcpauthrefuses a request in which any message has aparams.namethat isn't a string.** The fuzzer found a body that this parser accepted and another JSON decoder refused, so the two could read the request differently.
CHANGELOG.md in the library repository is the source.