Files
seaweedfs/weed/s3api
Chris LuandClaude Opus 5.5 f796077361 s3: keep a shared STS signing key on the filer when no IAM config is given (#13368)
* s3: keep a shared STS signing key on the filer when no IAM config is given

Without an IAM config file, jwt.filer_signing.key, or an SSE-S3 KEK, the
IAM loader had no STS signing key and STS stayed off. The KEK used to be
created automatically, which made STS work out of the box; it no longer is.

In that zero-config case, read the key from /etc/iam/sts_signing_key on the
filer, creating it once with an exclusive create, so every gateway sharing
the filer signs and validates session tokens with the same key across
restarts.

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

* s3: wait for the winning gateway's STS key after a refused create

With per-filer stores the exclusive create is decided by the write owner,
so the key another gateway created may reach this filer a little after the
create is refused. Keep reading until it shows up instead of leaving STS
off on the losing gateway.

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

* s3: refuse the filer STS key while an SSE-S3 key goes unloaded

A gateway whose SSE-S3 setup failed (a KEK it cannot unwrap, or a
configured key that was rejected) has no master key, so it fell through
to the STS key kept on the filer while the other gateways signed with
the KEK. Leave STS off on such a gateway instead.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 23:37:07 -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