Skip to content

test(ilm): deny manual transition for non-admin - #5188

Merged
houseme merged 1 commit into
mainfrom
houseme/ilm-manual-transition-permission-tests
Jul 24, 2026
Merged

test(ilm): deny manual transition for non-admin#5188
houseme merged 1 commit into
mainfrom
houseme/ilm-manual-transition-permission-tests

Conversation

@houseme

@houseme houseme commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Related Issues

Related to rustfs/backlog#1481 and rustfs/backlog#1476.

Summary of Changes

  • Add a real-server e2e regression test for the manual ILM transition admin endpoint.
  • The test first proves the root credential reaches the enqueue_only handler contract, then verifies a limited authenticated user receives 403 AccessDenied on the same POST /rustfs/admin/v3/ilm/transition/run request.

Verification

  • cargo fmt --all --check
  • git diff --check
  • cargo test -p e2e_test non_admin_credential_denied_on_manual_transition_run -- --nocapture

Impact

Test coverage only. No public API, wire format, console behavior, or compatibility change.

Additional Notes

The e2e test covers the backend permission boundary only; console operations remain out of scope.

Adversarial validation: correctness attacked root handler reachability and limited-user denial with no break found; simplicity found the test reuses the existing signed request and limited-user e2e helpers; security attacked the authenticated-but-unauthorized admin endpoint case and observed 403 AccessDenied; concurrency/durability found no production lock, IO, or persisted-state change and the e2e is serial like neighboring admin auth tests; compatibility found no endpoint or response contract change beyond assertions; performance found test-only cold build/runtime cost; test-coverage found the new e2e fails if the admin gate allows the limited user or if the root path no longer reaches the enqueue-only handler.


Thank you for your contribution! Please ensure your PR follows the community standards (CODE_OF_CONDUCT.md). If this is your first contribution, review the CLA document and sign it by commenting I have read and agree to the CLA. on the PR.

Co-Authored-By: heihutu <heihutu@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

CLA requirements are satisfied for this pull request.

@houseme
houseme marked this pull request as ready for review July 24, 2026 10:51
@houseme
houseme enabled auto-merge (squash) July 24, 2026 11:03
@houseme
houseme merged commit fa26b67 into main Jul 24, 2026
19 checks passed
@houseme
houseme deleted the houseme/ilm-manual-transition-permission-tests branch July 24, 2026 11:10
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