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

Set prefix, delimiter params even when empty #749

Merged
merged 1 commit into from
Feb 10, 2019

Commits on Feb 6, 2019

  1. Set prefix, delimiter params even when empty

    We have never set values which are empty on the request
    because they are perhaps not useful in the List query,
    but this assumption is wrong when there are restricted
    policies for a given user, because empty is actually
    a valid value in IAM or Bucket policy conditions.
    
    For example following condition would never work with our
    ListObjects call and AWS cli would work fine.
    
                "Condition": {
                    "StringEquals": {
                        "s3:prefix": [
                            "",
                            "data/",
                            "data"
                        ],
                        "s3:delimiter": [
                            "/",
                            ""
                        ]
                    }
                }
    
    The reason is empty or not prefix and delimiter should be
    added to the query param in List operation, such that server
    can use the value to validate the policies for the incoming
    request.
    
    Refer minio/minio-go#1064
    harshavardhana authored and minio-trusted committed Feb 6, 2019
    Configuration menu
    Copy the full SHA
    7005af1 View commit details
    Browse the repository at this point in the history