Skip to content

Conversation

@dvaldivia
Copy link
Collaborator

Fixes the problem where users with the following style of policy were not allowed to browse or list the bucket

{
   "Version": "2012-10-17",
   "Statement": [
    {
     "Effect": "Deny",
     "Action": [
      "s3:DeleteBucket",
      "s3:CreateBucket"
     ],
     "Resource": [
      "arn:aws:s3:::*"
     ]
    },
    {
     "Effect": "Allow",
     "Action": [
      "s3:GetBucketLocation",
      "s3:ListBucket",
      "s3:ListBucketMultipartUploads",
      "s3:ListMultipartUploadParts"
     ],
     "Resource": [
      "arn:aws:s3:::bucket-svc/"
     ]
    },
    {
     "Effect": "Allow",
     "Action": [
      "s3:PutObject",
      "s3:GetObject"
     ],
     "Resource": [
      "arn:aws:s3:::bucket-svc/prefix1/*"
     ]
    },
    {
     "Effect": "Allow",
     "Action": [
      "s3:*"
     ],
     "Resource": [
      "arn:aws:s3:::bucket-svc/prefix1/ini*",
      "arn:aws:s3:::bucket-svc/prefix1/jars*",
      "arn:aws:s3:::bucket-svc/prefix1/logs*"
     ]
    }
   ]
}

Signed-off-by: Daniel Valdivia 18384552+dvaldivia@users.noreply.github.com

@dvaldivia dvaldivia requested a review from Alevsk February 16, 2022 20:27
@dvaldivia dvaldivia self-assigned this Feb 16, 2022
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
@dvaldivia dvaldivia force-pushed the fix-browse-bucket-with-policy branch from 7c43ac5 to 369e22a Compare February 16, 2022 20:41
Copy link
Collaborator

@bexsoft bexsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@harshavardhana harshavardhana merged commit 24cf6a3 into minio:master Feb 16, 2022
@harshavardhana harshavardhana deleted the fix-browse-bucket-with-policy branch February 16, 2022 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants