Skip to content

feat: add anonymous bucket access commands#42

Merged
overtrue merged 2 commits intomainfrom
overtrue/feat-anonymous-anonymous-access
Mar 9, 2026
Merged

feat: add anonymous bucket access commands#42
overtrue merged 2 commits intomainfrom
overtrue/feat-anonymous-anonymous-access

Conversation

@overtrue
Copy link
Contributor

@overtrue overtrue commented Mar 9, 2026

Summary

  • add new anonymous top-level command and subcommands (set, set-json, get, get-json, list, links) in CLI
  • wire command into parser/executor
  • extend ObjectStore with bucket policy interfaces: get_bucket_policy, set_bucket_policy, delete_bucket_policy
  • implement these methods in S3 client
  • add support docs in help-contract tests for command and nested subcommands

Implementation details

  • new module: crates/cli/src/commands/anonymous.rs
  • updated entry: crates/cli/src/commands/mod.rs
  • updated ObjectStore capabilities and policy methods: crates/core/src/traits.rs
  • S3 bucket policy operations + error compatibility for missing-policy responses: crates/s3/src/client.rs

Verification

  • cargo check -p rustfs-cli
  • cargo test -p rustfs-cli help_contract -- --nocapture
  • Manual acceptance on rustfs/rustfs:latest for anonymous set/get/list/links/get-json/set-json and anonymous read/write behavior

Copilot AI review requested due to automatic review settings March 9, 2026 09:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an anonymous command group to the CLI to manage anonymous bucket/object access (mc-compatible), backed by new ObjectStore bucket policy APIs implemented for the S3 client.

Changes:

  • Introduces rc anonymous {set,set-json,get,get-json,list,links} and wires it into the CLI parser/executor.
  • Extends ObjectStore with get_bucket_policy / set_bucket_policy / delete_bucket_policy and adds Capabilities::anonymous.
  • Implements S3 bucket policy operations with “missing policy” compatibility handling and updates CLI help-contract tests.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
crates/s3/src/client.rs Adds Capabilities::anonymous and implements bucket policy get/set/delete on S3 client.
crates/core/src/traits.rs Extends Capabilities and ObjectStore with anonymous/policy support.
crates/cli/src/commands/anonymous.rs New CLI module implementing anonymous access workflows (set/get/list/links).
crates/cli/src/commands/mod.rs Registers the new anonymous top-level command and execution routing.
crates/cli/tests/help_contract.rs Updates help-contract expectations for anonymous and its subcommands.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@overtrue overtrue merged commit f1017ac into main Mar 9, 2026
15 checks passed
@overtrue overtrue deleted the overtrue/feat-anonymous-anonymous-access branch March 9, 2026 13:57
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.

2 participants