Files
seaweedfs/weed/s3api
Chris LuandClaude Opus 5.5 da46e334dd s3tables: give tag condition keys the tags they read (#12958)
* s3tables: load bucket tags for bucket-level policy checks

GetTableBucket, ListTableBuckets, DeleteTableBucket, Get/DeleteTableBucketPolicy
and the bucket maintenance operations built their policy context without the
bucket's tags, so aws:ResourceTag and s3tables:TableBucketTag conditions in the
bucket policy never matched there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* s3tables: evaluate aws:ResourceTag against the bucket on bucket-scoped checks

Namespace operations, ListTables, CreateTable, table rename targets, CreateView,
ListViews and absent-target checks authorize against the bucket ARN but left
ResourceTags empty, so an aws:ResourceTag Deny in the bucket policy never
matched. Table and view targets keep their own (or no) tags.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* s3tables: test aws:ResourceTag Deny on bucket-scoped operations

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* s3tables: pass CreateTableBucket's tags to IAM policy conditions

The IAM authorization path built its request context without the requested
tags, so a role or user policy conditioned on aws:RequestTag or aws:TagKeys
never matched CreateTableBucket.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* s3tables: test aws:RequestTag on the IAM authorization path

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* s3tables: pass request tags as scalars so policy variables expand

expandPolicyVariables substitutes only scalar values, so a slice left
${aws:RequestTag/<key>} unexpanded and a matching Allow failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* s3tables: read a listed bucket's policy and tags from one lookup

The tags came from the listing while the policy was read afresh, so a
policy could be judged against tags from an older version of the bucket.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* s3tables: recheck the bucket tags when deleting the bucket policy

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* s3tables: test a tag change between policy deletion's check and its write

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 12:59:03 -08:00
..
2024-07-04 11:00:41 -07:00

see https://blog.aqwari.net/xml-schema-go/

1. go get aqwari.net/xml/cmd/xsdgen
2. Add EncodingType element for ListBucketResult in AmazonS3.xsd
3. xsdgen -o s3api_xsd_generated.go -pkg s3api AmazonS3.xsd
4. Remove empty Grantee struct in s3api_xsd_generated.go
5. Remove xmlns: sed s'/http:\/\/s3.amazonaws.com\/doc\/2006-03-01\/\ //' s3api_xsd_generated.go