Skip to content

Anonymous access via bucket policy for specific objects — is it supported? #1874

@metoant

Description

@metoant

Environment

  • RustFS version: rustfs/rustfs:latest
  • Client: AWS SDK for Go v2

Question

I'm trying to allow anonymous public access to specific objects in a bucket
while keeping others private, without using presigned URLs.

I've tried two approaches and neither works:

Approach 1 — Canned ACL

Setting ACL: types.ObjectCannedACLPublicRead during PutObject.
Upload succeeds but anonymous GET returns 403.

Approach 2 — Tag-based bucket policy

Setting input.Tagging = "public-read=true" during PutObject, with this policy:

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {"AWS": ""},
"Action": ["s3:GetObject"],
"Resource": ["arn:aws:s3:::oblax/
"],
"Condition": {
"StringEquals": {
"s3:ExistingObjectTag/public-read": "true"
}
}
}
]
}

Anonymous GET still returns 403 AccessDenied.

What does work

A bucket policy with no conditions allows anonymous access to everything —
but I need per-object control.

Questions

  1. Are object-level canned ACLs (public-read) supported?
  2. Are tag-based policy conditions (s3:ExistingObjectTag) supported?

Metadata

Metadata

Assignees

Labels

S-confirmingStatus: Awaiting confirmation for a resolved issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions