Skip to content

docs: note that the auth JWK may use any jose-supported algorithm - #340

Open
arv wants to merge 1 commit into
mainfrom
arv/document-ml-dsa-auth-jwk
Open

arv wants to merge 1 commit into
mainfrom
arv/document-ml-dsa-auth-jwk

Conversation

@arv

@arv arv commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Adds one sentence to the Auth JWK entry in contents/docs/zero-cache-config.mdx:

Any signature algorithm supported by jose may be used, including the post-quantum ML-DSA-65 (kty: "AKP"). Node prints an experimental-feature warning the first time an ML-DSA key is used.

This comes out of a post-quantum crypto audit finding on zero-cache's JWT verification. No engine change was needed: packages/zero-cache/src/auth/jwt.ts passes the configured JWK to jwtVerify without pinning an algorithms allowlist, so the accepted algorithm is simply whatever the key declares. Verified empirically on Node 24.18.0 with jose 6.2.19 — an ML-DSA-65 JWT signs and verifies through exactly the shape of call zero-cache makes, with the exported JWK coming back as kty: "AKP" / alg: "ML-DSA-65", and Node emitting ExperimentalWarning: The ML-DSA-65 Web Crypto API algorithm is an experimental feature and might change at any time.

Release caveat — please read before merging

ML-DSA support requires Node 24 and jose 6, both of which landed on mono-internal main only today (2026-12-04) and are not in any tagged release yet. Latest stable is zero/v1.12.0; latest canary is zero/v1.13.0-canary.4 — neither contains jose 6.

So this sentence is true only from whichever release first ships jose 6. This doc change should land with or after that release, not before it. I deliberately did not guess a version number in the doc text; a reviewer may want to add one (e.g. "as of Zero x.y") once that release is cut.

Scope

Only the Auth JWK entry is touched. assets/search-index.json is the regenerated search index, as in previous docs PRs.

Two things noticed but deliberately left alone:

  • jwk, jwksUrl, secret and issuer are all marked deprecated in packages/zero-cache/src/config/zero-config.ts in favour of cookie or auth-token authentication, and this page does not say so. (These entries do sit under the page's Deprecated Flags heading, but with no per-entry note explaining what to use instead, unlike the other entries in that section.) Documenting that was considered and ruled out for this change.
  • pnpm lint crashes in this repo on main too — verified by running it against origin/main in a clean worktree: panic: unknown rule: no-useless-default-assignment from tsgolint, an oxlint / oxlint-tsgolint version mismatch. Unrelated to this change, which touches no TypeScript. check-format, check-types, test and build all pass.

Supersedes #339, which carried an unsigned commit (the signed-author check rejected it) and which I could not force-push over.

The JWK passed to --auth-jwk is handed to jose without an algorithms
allowlist, so verification accepts whatever algorithm the configured key
declares. Say so in the Auth JWK entry and call out post-quantum
ML-DSA-65 specifically, along with the experimental-feature warning Node
prints for it.
Copilot AI lite review requested due to automatic review settings December 4, 2026 14:48
@vercel

vercel Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
zero-docs Ready Ready Preview Dec 4, 2026 2:49pm UTC

Request Review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A moderate documentation issue remains because the ML-DSA guidance is incompatible with the currently supported Node and jose versions, potentially causing users to encounter unsupported-algorithm failures.

1 open issue
What changed in this PR

Documents supported JWT signature algorithms for the zero-cache Auth JWK configuration, including ML-DSA-65.

Changes:

  • Adds jose algorithm and ML-DSA-65 guidance.
  • Regenerates the documentation search index.
File Description
contents/​docs/​zero-cache-config.mdx Adds algorithm support and ML-DSA-65 guidance to the Auth JWK documentation.
assets/​search-index.json Updates the search index for the revised Auth JWK documentation.

Review effort: Lite


A public key in JWK format used to verify JWTs. Only one of jwk, jwksUrl and secret may be set.

Any signature algorithm supported by [jose](https://github.com/panva/jose) may be used, including the post-quantum ML-DSA-65 (`kty: "AKP"`). Node prints an experimental-feature warning the first time an ML-DSA key is used.

This branch was successfully deployed

1 active deployment
Preview — 73d68160 Deployed Dec 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants