From 472013f4eb085496864ee469d469cce2ee3bf44f Mon Sep 17 00:00:00 2001 From: Marina Biryukova Date: Tue, 20 Aug 2024 16:26:40 +0300 Subject: [PATCH] [#87] iam: Support s3:PatchObject action Signed-off-by: Marina Biryukova --- iam/converter.go | 1 + iam/converter_native.go | 1 + iam/converter_s3.go | 1 + 3 files changed, 3 insertions(+) diff --git a/iam/converter.go b/iam/converter.go index ce1108a..622315e 100644 --- a/iam/converter.go +++ b/iam/converter.go @@ -63,6 +63,7 @@ const ( s3ActionPutObjectTagging = "s3:PutObjectTagging" s3ActionPutObjectVersionACL = "s3:PutObjectVersionAcl" s3ActionPutObjectVersionTagging = "s3:PutObjectVersionTagging" + s3ActionPatchObject = "s3:PatchObject" ) const ( diff --git a/iam/converter_native.go b/iam/converter_native.go index 792c227..8259bc8 100644 --- a/iam/converter_native.go +++ b/iam/converter_native.go @@ -60,6 +60,7 @@ var actionToNativeOpMap = map[string][]string{ s3ActionPutObjectTagging: {native.MethodGetContainer, native.MethodHeadObject, native.MethodGetObject, native.MethodPutObject}, s3ActionPutObjectVersionACL: {native.MethodGetContainer, native.MethodGetContainerEACL, native.MethodSetContainerEACL, native.MethodGetObject, native.MethodHeadObject}, s3ActionPutObjectVersionTagging: {native.MethodGetContainer, native.MethodHeadObject, native.MethodGetObject, native.MethodPutObject}, + s3ActionPatchObject: {native.MethodGetContainer, native.MethodGetObject, native.MethodHeadObject, native.MethodPatchObject, native.MethodPutObject, native.MethodRangeObject}, } var containerNativeOperations = map[string]struct{}{ diff --git a/iam/converter_s3.go b/iam/converter_s3.go index d109ca7..820002d 100644 --- a/iam/converter_s3.go +++ b/iam/converter_s3.go @@ -32,6 +32,7 @@ var actionToS3OpMap = map[string][]string{ s3ActionPutObjectLegalHold: {s3ActionPutObjectLegalHold}, s3ActionPutObjectRetention: {s3ActionPutObjectRetention}, s3ActionPutObjectTagging: {s3ActionPutObjectTagging}, + s3ActionPatchObject: {s3ActionPatchObject}, s3ActionListAllMyBuckets: {"s3:ListBuckets"}, s3ActionListBucket: {"s3:HeadBucket", "s3:GetBucketLocation", "s3:ListObjectsV1", "s3:ListObjectsV2"},