fix(e2e): the id_token typ is the standard JWT, not id+jwt - #16
Merged
Conversation
auth.provider#394 (shipped in v0.10.0) changed the id_token's `typ` header from
the nonstandard `id+jwt` to the standard `JWT`. That landed on the provider's
develop after this repo's last E2E run, so the suite had never seen it and the
first run after the release cut failed on the pin.
The pin itself stays — it is the only discriminator between the three token
kinds, and the negative tests in tests/abac depend on it. What keeps an id_token
out of /verify is being disjoint from RFC 9068's `at+jwt`, and `JWT` satisfies
that exactly as `id+jwt` did, so the abac refusals are unchanged.
Pinning the MINTED value, so no dual accept here: the verifier accepts both
spellings during the migration window, but the provider stamps one, and this
suite exists to notice when that one changes.
docs/claims-contract{,.ja}.md carried the same `id+jwt` statement and are
updated with the window and the reason.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates the E2E suite and claims-contract documentation to reflect that auth.provider now mints ID tokens with the standard JWT header typ: "JWT" (instead of the prior nonstandard id+jwt), keeping this repo’s pins aligned with the provider→verifier contract and ensuring CI continues to catch any future envelope changes.
Changes:
- Update E2E assertions to pin
id_tokenheadertypto"JWT"(matching provider behavior sinceauth.providerv0.10.0). - Clarify in test comments and documentation why
"JWT"remains safely disjoint from RFC 9068at+jwt, preserving/verifyrejection behavior for ID tokens. - Update both English and Japanese claims-contract docs to describe the migration window and rationale.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/token-flow/index.test.js | Pins ID token typ to JWT and documents the provider change and intent of the pin. |
| tests/abac/index.test.js | Updates ABAC negative test to assert ID token typ is JWT while keeping /verify rejection expectations intact. |
| docs/claims-contract.md | Updates the documented typ contract to reflect JWT for ID tokens since provider v0.10.0 and notes the migration window. |
| docs/claims-contract.ja.md | Japanese counterpart of the claims-contract update for typ on ID tokens. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
The first E2E run after the
auth.providerv0.10.0 /auth.policy-verifierv0.4.0 release cut failed on one assertion out of twenty:Not a regression — a pin this repo had never exercised. auth.provider#394 changed the id_token's
typfrom the nonstandardid+jwtto the standardJWT; it merged to the provider'sdevelopat 2026-08-29 00:41 JST, and this repo's last E2E run was 2026-08-28 21:29 JST. Sincemake setupclones siblings at their default branch, the suite picked the change up the first time it ran afterwards.The pin stays — it is the only discriminator between the three token kinds, and the negative tests in
tests/abacrest on it. What keeps an id_token out of/verifyis being disjoint fromat+jwt, andJWTsatisfies that exactly asid+jwtdid, so those refusals are unchanged (verified: the abac assertion still expects 401 /invalid_token).It pins the value the provider mints, so there is deliberately no dual accept here. The verifier accepts both spellings during the migration window auth.provider#402 closes; the provider stamps one, and noticing when that one changes is what this suite is for.
docs/claims-contract.mdand its Japanese twin carried the sameid+jwtstatement and are updated with the window and the reason.🤖 Generated with Claude Code