Skip to content

feat: asymmetric domain JWTs (client-config, ES256) - #79

Merged
PenguinzTech merged 1 commit into
v2.1.xfrom
feature/client-config-asymmetric-jwt
Jul 27, 2026
Merged

feat: asymmetric domain JWTs (client-config, ES256)#79
PenguinzTech merged 1 commit into
v2.1.xfrom
feature/client-config-asymmetric-jwt

Conversation

@PenguinzTech

Copy link
Copy Markdown
Contributor

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

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>
@PenguinzTech
PenguinzTech merged commit 53ca0a9 into v2.1.x Jul 27, 2026
7 of 8 checks passed
@PenguinzTech
PenguinzTech deleted the feature/client-config-asymmetric-jwt branch July 27, 2026 00:44
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