diff --git a/weed/s3api/s3_action_resolver.go b/weed/s3api/s3_action_resolver.go index f7acd88ae..d1fe97bd1 100644 --- a/weed/s3api/s3_action_resolver.go +++ b/weed/s3api/s3_action_resolver.go @@ -196,6 +196,11 @@ func resolveFromQueryParameters(query url.Values, method string, hasObject bool) return s3_constants.S3_ACTION_GET_BUCKET_LOCATION } + // GetObjectAttributes (object-level only) + if hasObject && query.Has("attributes") && method == http.MethodGet { + return s3_constants.S3_ACTION_GET_OBJECT_ATTRIBUTES + } + // Object retention and legal hold operations (object-level only) if hasObject { if query.Has("retention") { diff --git a/weed/s3api/s3_constants/s3_action_strings.go b/weed/s3api/s3_constants/s3_action_strings.go index 20e848997..46b3eb8c7 100644 --- a/weed/s3api/s3_constants/s3_action_strings.go +++ b/weed/s3api/s3_constants/s3_action_strings.go @@ -8,7 +8,8 @@ const ( S3_ACTION_PUT_OBJECT = "s3:PutObject" S3_ACTION_DELETE_OBJECT = "s3:DeleteObject" S3_ACTION_DELETE_OBJECT_VERSION = "s3:DeleteObjectVersion" - S3_ACTION_GET_OBJECT_VERSION = "s3:GetObjectVersion" + S3_ACTION_GET_OBJECT_VERSION = "s3:GetObjectVersion" + S3_ACTION_GET_OBJECT_ATTRIBUTES = "s3:GetObjectAttributes" // Object ACL operations S3_ACTION_GET_OBJECT_ACL = "s3:GetObjectAcl"