Skip to content

migration(rs256): phase 120 — Add RS256 signing path (additive, HS256 stays default) - #21

Merged
kjgbot merged 2 commits into
mainfrom
migration/rs256/120-rs256-signing
Apr 22, 2026
Merged

migration(rs256): phase 120 — Add RS256 signing path (additive, HS256 stays default)#21
kjgbot merged 2 commits into
mainfrom
migration/rs256/120-rs256-signing

Conversation

@kjgbot

@kjgbot kjgbot commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Phase 120 — Add RS256 signing path (additive, HS256 stays default)

Part of the api-keys + RS256 migration. See specs/api-keys-and-rs256-migration.md for the full design.

Generated by workflows/120-*.ts and committed by scripts/run-rs256-migration.sh. Every workflow runs the strict review template (implementer self-review + 2 parallel specialist peer reviewers + architect synthesis + approval gate); this PR exists because the gate passed.

Run order in the migration

118 → 119 → 120 → 121 → publish + propagate → 122 → 123

This PR is phase 120. Merge in order; each phase assumes its predecessors are deployed.

Review focus

The workflow already enforced security + spec/compat review. Human review here should focus on:

  • Cross-cutting concerns the workflow couldn't see (production load, capacity, customer-facing impact)
  • Anything in the diff that isn't in the spec — flag it before merge
  • Test coverage gaps the agents may have missed in their domain

@kjgbot
kjgbot force-pushed the migration/rs256/120-rs256-signing branch from c839ffa to c166350 Compare April 22, 2026 20:56
kjgbot and others added 2 commits April 22, 2026 22:58
… stays default)

Generated by workflows/120-*.ts via scripts/run-rs256-migration.sh.
Spec: specs/api-keys-and-rs256-migration.md (phase 120).

Co-Authored-By: agent-relay <agent@agent-relay.com>
- kid now computed as RFC 7638 JWK thumbprint: SHA-256 of the canonical
  JWK (lex-sorted required members, no whitespace), base64url-encoded.
  Removes the YYYY-MM component that caused kid to change at every
  month rollover, which would have silently broken verification under
  phase 122's RS256 cutover.
- importPrivateKey rejects RSA keys < 2048 bits; logs a warning at
  <3072 bits per specs/token-format.md.
- Single rfc7638Thumbprint() helper shared by sign path and JWKS route
  so both always produce matching kid values.
- Regression tests: deterministic kid, time-independent kid (directly
  covers the month-rollover bug), sign-kid == jwks-kid, RFC 7638
  known-answer, 1024-bit key rejection.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@kjgbot
kjgbot force-pushed the migration/rs256/120-rs256-signing branch from c166350 to 277c127 Compare April 22, 2026 20:58
@kjgbot
kjgbot merged commit 4fc066b into main Apr 22, 2026
2 checks passed
@kjgbot
kjgbot deleted the migration/rs256/120-rs256-signing branch April 22, 2026 21:00
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.

1 participant