s3: read bucket owner and crtime from the entry-free bucket config

The owner index read the raw filer entry off BucketConfig, which no
longer carries one. Cache Crtime alongside IdentityId, and pass the
owner id rather than the entry through the ListBuckets visibility
checks so the scan and granted-bucket paths share one implementation.
This commit is contained in:
Chris Lu committed 2026-07-02 21:27:58 -07:00
1 parent 17af32f3ff
commit 98e49d2d42
3 files changed
+19 -28

No files matched your search

+5
View File
@@ -38,6 +38,7 @@ type BucketConfig struct {
ACL []byte
Owner string
IdentityId string // identity that created the bucket
Crtime int64 // bucket creation time, unix seconds
IsPublicRead bool // Cached flag to avoid JSON parsing on every request
CORS *cors.CORSConfiguration
ObjectLockConfig *ObjectLockConfiguration // Cached parsed Object Lock configuration
@@ -404,6 +405,10 @@ func (s3a *S3ApiServer) newBucketConfigFromEntry(bucket string, entry *filer_pb.
return config
}
if entry.Attributes != nil {
config.Crtime = entry.Attributes.Crtime
}
if entry.Extended != nil {
if versioning, exists := entry.Extended[s3_constants.ExtVersioningKey]; exists {
config.Versioning = string(versioning)