Repository navigation
fix: let replicationAdmin set and read bucket replication targets - #292
Conversation
mc replicate add creates the remote target before the replication config, and that needs admin:SetBucketTarget, so a replicationAdmin user could not set up bucket replication. Grant admin:SetBucketTarget and GetBucketTarget.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Add and test bucket target actions policy/constants.go, policy/constants_test.go |
The policy adds SetBucketTargetAction and GetBucketTargetAction to its resource-independent action set. The test checks policy validation and confirms both actions are allowed for bucket photos. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers: harshavardhana
Merge Risk: 
Minimal · up to cb4e9
-
The targeted policy update and validation test do not present an actionable merge-blocking risk.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title "fix: let replicationAdmin set and read bucket replication targets" matches the main change. The PR adds SetBucketTargetAction and GetBucketTargetAction to the replicationAdmin canned policy, so that role can set and read bucket replication targets. The title is specific and accurate. The title uses a conventional commit prefix, and it is a single sentence of 9 words. The change also includes a test that checks the new permissions for bucket photos.
-
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit checks the policy list,
Two bucket actions join the twist.
Set and get now pass the test,
For photos, both are addressed.
The rabbit hops away to rest.
Comment @coderabbitai help to get the list of available commands.
Adds admin:SetBucketTarget and admin:GetBucketTarget to the replicationAdmin policy so its users can create the remote target that mc replicate add needs (miniohq/aistor#8643).
Summary by CodeRabbit