feat: asymmetric domain JWTs (client-config, ES256) - #79
Merged
Conversation
Migrate ClientConfigManager deployment-domain tokens from HS256 with a random per-process secret to the platform-wide asymmetric scheme: - Sign with the manager's private key (ES256 default, RS256 fallback); verify with the public key; algorithms allowlist is [ES256, RS256] only (HS256/none rejected — algorithm-confusion defense). - Use standard iat/exp (PyJWT enforces expiry natively) plus iss/aud. - ClientConfigManager takes private_key/public_key/algorithm/issuer/ audience; app wires them from the manager JWT config. Falls back to an ephemeral ES256 keypair only when unconfigured (dev/test). Also fixes a latent multi-replica bug: the old random per-process secret made domain tokens unverifiable across replicas/restarts. Adds 7 regression tests (valid accept, wrong-key reject, HS256 reject, expired reject, missing-exp reject, ES256 header, ephemeral fallback). Full manager suite: 93 passing. Documents the upgrade/rollover note. Co-Authored-By: Claude Opus 4.8 <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.
Recreated after PR #54 was auto-closed when its base branch (docs/enterprise-hardening) was deleted on merge. Original review/CI history: #54. No code changes — same commits, retargeted onto v2.1.x now that #53 is merged.
🤖 Generated with Claude Code