Skip to content

fix(security): reject empty credential secrets - #224

Draft
GatewayJ wants to merge 1 commit into
rustfs:mainfrom
GatewayJ:agent/fix-1096-empty-credential-secret
Draft

fix(security): reject empty credential secrets#224
GatewayJ wants to merge 1 commit into
rustfs:mainfrom
GatewayJ:agent/fix-1096-empty-credential-secret

Conversation

@GatewayJ

@GatewayJ GatewayJ commented Aug 5, 2026

Copy link
Copy Markdown
Member

Type of Change

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

Related Issues

Fixes rustfs/backlog#1096

Summary of Changes

  • reject configured credential Secrets whose data field is absent or empty
  • centralize required-key, UTF-8, and minimum-length checks in the Context validation boundary
  • preserve the existing stable SNAFU errors and status mapping
  • add focused coverage for valid data, absent data, missing keys, invalid UTF-8, and short values

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: N/A; the existing credential Secret contract already requires both keys
  • CHANGELOG: N/A; this enforces the documented validation contract
  • CI/CD passed (pending GitHub Actions)

Impact

  • Breaking change (CRD/API compatibility)
  • Requires doc/config/deployment update
  • Other impact: invalid configured credential Secrets now block reconciliation with the existing CredentialSecretMissingKey status

Verification

make pre-commit

Additional Notes

Kubernetes Secret retrieval remains in Context, while credential invariants are evaluated by a private pure helper. The existing byte-length behavior is intentionally preserved to keep this fix scoped to missing Secret data.


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