Skip to content

fix: harden signing key handling - #1166

Open
DaleSeo wants to merge 1 commit into
mainfrom
fix/1161-signing-key-hardening
Open

fix: harden signing key handling#1166
DaleSeo wants to merge 1 commit into
mainfrom
fix/1161-signing-key-hardening

Conversation

@DaleSeo

@DaleSeo DaleSeo commented Aug 11, 2026

Copy link
Copy Markdown
Member

Fixes #1161.

Motivation and Context

RequestStateCodec previously accepted keys of any length despite documenting a 32-byte recommendation.
This adds a validated try_new constructor while preserving the existing new API, and zeroizes stored
request-state keys on drop. Client secrets and private-key JWT signing keys are also redacted from Debug
output.

How Has This Been Tested?

Added tests

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

@github-actions github-actions Bot added T-dependencies Dependencies related changes T-test Testing related changes T-config Configuration file changes T-core Core library changes T-examples Example code changes T-model Model/data structure changes T-transport Transport layer changes labels Aug 11, 2026
@DaleSeo
DaleSeo force-pushed the fix/1161-signing-key-hardening branch from 619a0e8 to 1dfe003 Compare August 11, 2026 23:42
@DaleSeo
DaleSeo marked this pull request as ready for review August 11, 2026 23:55
@DaleSeo
DaleSeo requested a review from a team as a code owner August 11, 2026 23:55
@DaleSeo DaleSeo self-assigned this Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-config Configuration file changes T-core Core library changes T-dependencies Dependencies related changes T-examples Example code changes T-model Model/data structure changes T-test Testing related changes T-transport Transport layer changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

request-state and JWT signing key material lacks minimum-length enforcement and zeroization

1 participant