Skip to content

fix(console): require secure session key entropy - #228

Draft
GatewayJ wants to merge 1 commit into
rustfs:mainfrom
GatewayJ:agent/fix-1092-console-session-key
Draft

fix(console): require secure session key entropy#228
GatewayJ wants to merge 1 commit into
rustfs:mainfrom
GatewayJ:agent/fix-1092-console-session-key

Conversation

@GatewayJ

Copy link
Copy Markdown
Member

Type of Change

  • New Feature
  • Bug Fix
  • Documentation
  • Performance Improvement
  • Test/CI
  • Refactor
  • Other:

Related Issues

Closes rustfs/backlog#1092

Summary of Changes

  • Generate fallback Console session keys exclusively with ring::rand::SystemRandom.
  • Fail Console startup when cryptographically secure randomness is unavailable.
  • Remove the predictable timestamp-and-process-ID hash fallback and add a regression test for generated key shape and uniqueness.

The previous entropy fallback could produce a guessable session signing key if /dev/urandom could not be read. Deployments with JWT_SECRET configured are unchanged; unconfigured single-process deployments still receive an ephemeral key, now only from a CSPRNG.

Checklist

  • I have read and followed the CONTRIBUTING.md guidelines
  • Passed make pre-commit (fmt-check + clippy + test + console-lint + console-fmt-check)
  • Added/updated necessary tests
  • Documentation updated (N/A: no configuration or public API changed)
  • CHANGELOG.md updated under [Unreleased] (N/A: no changelog file exists in the repository)
  • CI/CD passed (pending upstream CI)

Impact

  • Breaking change (CRD/API compatibility)
  • Requires doc/config/deployment update
  • Other impact: Console startup now fails instead of using weak entropy when the system CSPRNG is unavailable.

Verification

make pre-commit

Additional Notes

The chart-provided JWT_SECRET path remains the recommended deployment configuration.


Thank you for your contribution! Please ensure your PR follows the community standards (CODE_OF_CONDUCT.md) and sign the CLA if this is your first contribution.

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