Skip to content

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

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

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

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 are 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 as well, independent of this change: panic: unknown rule: no-useless-default-assignment from tsgolint, an oxlint / oxlint-tsgolint version mismatch. check-format, check-types, test and build all pass.

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:47
@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:47pm 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

An active documentation issue incorrectly describes ML-DSA key support for the repository’s pinned jose and Node versions, which could mislead users about runtime verification.

1 open issue
What changed in this PR

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

Changes:

  • Added ML-DSA-65 and experimental-warning guidance.
  • Regenerated the search index.
File Description
contents/​docs/​zero-cache-config.mdx Adds documentation that Auth JWK signatures may use jose-supported algorithms, including ML-DSA-65.
assets/​search-index.json Updates the generated search index for the revised 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.
@arv

arv commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #340, which carries the same change on a properly signed commit. The commit on this branch was unsigned and the Verify Signed Commit Authors check rejected it.

@arv arv closed this Dec 4, 2026

This branch was successfully deployed

1 active deployment
Preview — 4aedca7a 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