Skip to content

Commit

Permalink
ARSN-404: adding permission in BP and IAM action Map
Browse files Browse the repository at this point in the history
  • Loading branch information
benzekrimaha committed Apr 4, 2024
1 parent c2ab4a2 commit 3f995c5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/policyEvaluator/utils/actionMaps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ const sharedActionMap = {
objectPutVersion: 's3:PutObjectVersion',
};

const actionMapBucketQuotas = {
getBucketQuota: 'scality:GetBucketQuota',
updateBucketQuota: 'scality:UpdateBucketQuota',
deleteBucketQuota: 'scality:DeleteBucketQuota',
};

// action map used for request context
const actionMapRQ = {
bucketPut: 's3:CreateBucket',
Expand Down Expand Up @@ -79,6 +85,7 @@ const actionMapRQ = {
objectPutLegalHoldVersion: 's3:PutObjectLegalHold',
listObjectVersions: 's3:ListBucketVersions',
...sharedActionMap,
...actionMapBucketQuotas,
};

// action map used for bucket policies
Expand Down Expand Up @@ -153,6 +160,12 @@ const actionMonitoringMapS3 = {
serviceGet: 'ListBuckets',
};

const actionMapAccountQuotas = {
UpdateAccountQuota : 'scality:UpdateAccountQuota',
DeleteAccountQuota : 'scality:DeleteAccountQuota',
GetAccountQuota : 'scality:GetAccountQuota',
};

const actionMapIAM = {
attachGroupPolicy: 'iam:AttachGroupPolicy',
attachUserPolicy: 'iam:AttachUserPolicy',
Expand Down Expand Up @@ -194,6 +207,7 @@ const actionMapIAM = {
tagUser: 'iam:TagUser',
unTagUser: 'iam:UntagUser',
listUserTags: 'iam:ListUserTags',
...actionMapAccountQuotas,
};

const actionMapSSO = {
Expand Down

0 comments on commit 3f995c5

Please sign in to comment.