Skip to content

Conversation

@bexsoft
Copy link
Collaborator

@bexsoft bexsoft commented Feb 15, 2022

What does this do?

Added support validation against subpaths to hasPermission & SecureComponent

Note: Please test roughly as this implies changes on how policies are processed in the application.

One test policy:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetBucketPolicy",
                "s3:ListAllMyBuckets",
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::amq-notifications"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket",
                "s3:ListMultipartUploadParts",
                "s3:PutObject",
                "s3:AbortMultipartUpload",
                "s3:DeleteObject",
                "s3:GetObject"
            ],
            "Resource": [
                "arn:aws:s3:::amq-notifications/*"
            ]
        }
    ]
}

Signed-off-by: Benjamin Perez [email protected]

@harshavardhana
Copy link
Member

Can we add some tests here to avoid future regressions?

@bexsoft
Copy link
Collaborator Author

bexsoft commented Feb 15, 2022

Can we add some tests here to avoid future regressions?

Sure! We will be adding tests for this

Copy link
Member

@prakashsvmx prakashsvmx left a comment

Choose a reason for hiding this comment

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

Tested. Changes look good to me 👍

  • Prefix (Allow/Deny) -> Upload Files
  • Nested Prefix -> upload Files
  • File upload
  • Folder upload ( nested prefix) -> File upload

@dvaldivia dvaldivia merged commit 5b2715c into minio:master Feb 15, 2022
@bexsoft bexsoft deleted the fix-secure branch April 5, 2022 19:01
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.

4 participants