Skip to content

CLDSRV-1060: Check the governance bypass permission on DeleteObject (hotfix/9.2.24) - #6365

Closed
leif-scality wants to merge 4 commits into
hotfix/9.2.24from
bugfix/CLDSRV-1060-9.2.24
Closed

leif-scality wants to merge 4 commits into
hotfix/9.2.24from
bugfix/CLDSRV-1060-9.2.24

Conversation

@leif-scality

Copy link
Copy Markdown
Contributor

Cherry-picked from #6354 and #6360. The conflicts were formatting only. 9.2.24 has no AWS SDK v3, so the functional test uses the v2 SDK version from #6360. The CI runner pin (CLDSRV-1020) is cherry-picked too, as on #6360.

leif-scality and others added 4 commits November 10, 2026 14:28
The bypass action was added to the authorization only when sourceVersionId
was set, which is the version of a copy source and is never set on a delete.
So a delete of a specific version with x-amz-bypass-governance-retention
removed a GOVERNANCE-locked version with only s3:DeleteObjectVersion, and a
Deny on s3:BypassGovernanceRetention was ignored.

Authorize s3:BypassGovernanceRetention on every delete of a specific version
that sends the header. Call prepareRequestContexts in the unit tests as the
API does for a delete, without a copy source, and add functional tests with
IAM users against Vault.

(cherry picked from commit 8cfe61b)
9.2.36 has neither the AWS SDK v3 nor the IAM test helper, so create the IAM
users with the v2 IAM client, as bucketPolicyBypassPort.js does.

(cherry picked from commit 63de57a)
The latest is 26 with breaks with tests needing python 3.9

(cherry picked from commit 8d58737)
@bert-e

bert-e commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Hello leif-scality,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval ⭐
/bypass_build_status Bypass the build and test status ⭐
/bypass_commit_size Bypass the check on the size of the changeset TBA ⭐
/bypass_incompatible_branch Bypass the check on the source branch prefix ⭐
/bypass_jira_check Bypass the Jira issue check ⭐
/bypass_peer_approval Bypass the pull request peers' approval ⭐
/bypass_leader_approval Bypass the pull request leaders' approval ⭐
/bypass_source_branch_lineage Bypass the cross-branch contamination check ⭐
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request.
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e

bert-e commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Incorrect fix version

The Fix Version/s in issue CLDSRV-1060 contains:

  • 9.2.36.1

  • 9.3.13.1

  • 9.3.28

  • 9.4.13

  • 9.5.3

  • 9.6.0

Considering where you are trying to merge, I expected to find at least:

  • 9.2.24.1

Please check the Fix Version/s of CLDSRV-1060, or the target
branch of this pull request.

@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.89%. Comparing base (6b1d8f4) to head (1072739).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
...i/apiUtils/authorization/prepareRequestContexts.js 95.34% <100.00%> (ø)

... and 2 files with indirect coverage changes

@@                Coverage Diff                @@
##           hotfix/9.2.24    #6365      +/-   ##
=================================================
+ Coverage          84.86%   84.89%   +0.03%     
=================================================
  Files                206      206              
  Lines              13192    13192              
=================================================
+ Hits               11195    11200       +5     
+ Misses              1997     1992       -5     
Flag Coverage Δ
file-ft-tests 67.71% <100.00%> (+0.03%) ⬆️
file-ft-tests-null-compat 68.23% <100.00%> (+0.03%) ⬆️
kmip-ft-tests 28.19% <0.00%> (ø)
mongo-v0-ft-tests 68.94% <100.00%> (+0.02%) ⬆️
mongo-v1-ft-tests 68.94% <100.00%> (-0.03%) ⬇️
multiple-backend 35.26% <100.00%> (+0.02%) ⬆️
s3c-ft-tests-v0 62.94% <100.00%> (+0.06%) ⬆️
s3c-ft-tests-v0-null-compat 63.01% <100.00%> (+0.08%) ⬆️
s3c-ft-tests-v1 62.90% <100.00%> (+0.06%) ⬆️
sur-tests 36.63% <100.00%> (+0.04%) ⬆️
sur-tests-inflights 37.62% <100.00%> (-0.01%) ⬇️
unit 69.76% <100.00%> (ø)
utapi-v2-tests 34.49% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@leif-scality

Copy link
Copy Markdown
Contributor Author

Not needed: 9.5.1 and 9.5.2 aren't among the versions requested on S3C-11612.

@leif-scality
leif-scality deleted the bugfix/CLDSRV-1060-9.2.24 branch November 10, 2026 14:15
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.

3 participants