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

Send delimiter/max-keys/prefix query parameters empty for ListObjects API #949

Closed
balamurugana opened this issue May 20, 2020 · 1 comment

Comments

@balamurugana
Copy link
Member

balamurugana commented May 20, 2020

Bucket policy at server-side may prevent accessing ListObjects REST API if delimiter/max-keys/prefix query parameters are sent with empty values.

Below is an example valid bucket policy

{
    "Statement": [
        {
            "Action": [
                "s3:ListBucket"
            ],
            "Effect": "Allow",
            "Principal": "*",
            "Resource": [
                "arn:aws:s3:::mybucket"
            ],
            "Condition": {
                "StringEquals": {
                    "s3:prefix": [
                        ""
                    ],
                    "s3:delimiter": [
                        ""
                    ],
                    "s3:max-keys": [
                        1000
                    ]
                }
            }
        }
    ],
    "Version": "2012-10-17"
}
@balamurugana
Copy link
Member Author

Fixed by #984

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

No branches or pull requests

1 participant