Skip to content

fix(sts): fail closed on policy binding errors#171

Merged
GatewayJ merged 1 commit into
rustfs:mainfrom
GatewayJ:fix/sts-policybinding-fail-closed
Jul 10, 2026
Merged

fix(sts): fail closed on policy binding errors#171
GatewayJ merged 1 commit into
rustfs:mainfrom
GatewayJ:fix/sts-policybinding-fail-closed

Conversation

@GatewayJ

Copy link
Copy Markdown
Member

Type of Change

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

Related Issues

Fixes rustfs/backlog#1077

Summary of Changes

  • Fail closed when any policy referenced by a matched PolicyBinding cannot be fetched from RustFS.
  • Fail closed when any referenced PolicyBinding policy document cannot be normalized for STS session-policy merging.
  • Keep empty PolicyBinding policy lists denied, while preserving specific InternalError and MalformedPolicyDocument responses for fetch and parse failures.
  • Add resolver and handler regressions proving partial policy resolution never reaches RustFS AssumeRole.
  • Document that every referenced PolicyBinding policy must exist and resolve to a valid RustFS policy document.

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 (if needed)
  • CHANGELOG.md updated under [Unreleased] (N/A: repository has no CHANGELOG.md)
  • CI/CD passed (if applicable) (pending PR CI)

Impact

  • Breaking change (CRD/API compatibility)
  • Requires doc/config/deployment update
  • Other impact: STS now fails closed when referenced PolicyBinding policies are missing, unavailable, or malformed instead of issuing credentials from a partial policy set.

Verification

cargo test -p operator --lib sts::server::tests:: -- --nocapture
make pre-commit

Additional Notes

Live e2e tests remain ignored by default and were not run outside make pre-commit.


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.

@GatewayJ GatewayJ marked this pull request as ready for review July 10, 2026 03:24
@GatewayJ

Copy link
Copy Markdown
Member Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 00a92eb07a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@GatewayJ GatewayJ added this pull request to the merge queue Jul 10, 2026
Merged via the queue into rustfs:main with commit c39ff90 Jul 10, 2026
3 checks passed
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