Harden draft 0.3 clauses: query canonicalization (§4.2) + authorization token (§9) - #3
Closed
koishore wants to merge 1 commit into
Closed
Harden draft 0.3 clauses: query canonicalization (§4.2) + authorization token (§9)#3koishore wants to merge 1 commit into
koishore wants to merge 1 commit into
Conversation
…on token (§9) Refines the 0.3 draft (not-yet-in-reference) clauses only; no change to implemented 0.2 behaviour, the receipt payload, shipped-field canonicalization, or any CTK vector. §4.2 — exact query canonicalization (fragment exclusion, split on first '=', RFC 3986 percent-decoding with '+'→space, repeat/duplicate preservation, code-point ordering); clarified policy evaluates params only (query is bound, not evaluated). §9/§9.1 — token hardening: verifier MUST pin alg=EdDSA (reject none / algorithm confusion) and never trust the unverified header; token key SHOULD be separate from the audit key; kid added for rotation; exp MUST NOT exceed 300 s; skew SHOULD be ≤60 s; cross-instance brokers MUST share jti state; noted token↔receipt non-linkage. §11 — algorithm-confusion + key-separation considerations. CHANGELOG updated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Refines the draft 0.3 clauses (tagged 0.3, draft — not yet in reference) after a close read of the 0.3 frontier. No change to implemented 0.2 behaviour, the receipt payload, the canonicalization of shipped fields, or any existing CTK vector.
§4.2 — query canonicalization, now exact. The prior text ("parsed into
[name,value]pairs, sorted") left a parser-differential gap — the exact class of bug this protocol exists to prevent. Now specified precisely: fragment exclusion, split on the first=, RFC 3986 percent-decoding with+→space, repeat/duplicate preservation, code-point ordering. Also clarified that policy (§5) evaluatesparamsonly —queryis bound by the fingerprint but not policy-evaluated, so decision-relevant values must live inparams.§9 / §9.1 — authorization-token hardening.
alg = EdDSA, rejectnone, and MUST NOT take the algorithm orkidfrom the unverified header — closes the classic JWT algorithm-confusion hole (prior step 1 only said "verify the signature").kidadded to the header for rotation.expMUST NOT exceed 300 s (was SHOULD ≤ 60 only); clock skew SHOULD be ≤ 60 s.jtistate (cross-instance replay was unaddressed).jtiis not in the signed receipt payload, so token and receipt aren't cryptographically linked — flagged as a candidate future breaking change rather than slipped in.§11 — added algorithm-confusion and key-separation considerations. CHANGELOG updated under
[0.3-draft].AI assistance disclosure (required)
spec.md/CHANGELOG.mdedits. Awaiting the maintainer's line-by-line review; the human author is accountable per CONTRIBUTING.Kind of change
Checklist
python validate.pyis green (examples/vectors validate against the schemas).python conformance.pyis green (reference0.2 ≤ spec 0.3; every CTK vector reproduced).For a normative change (additionally)
conformance.pystays green.0.2 ≤ spec 0.3(conformance confirms).