Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Browse Bucket for certain Policy #1587

Merged

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 self-assigned this Feb 16, 2022
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
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