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

Bucket policy document principal structure #564

Closed
jonaustin09 opened this issue May 14, 2024 · 0 comments · Fixed by #581
Closed

Bucket policy document principal structure #564

jonaustin09 opened this issue May 14, 2024 · 0 comments · Fixed by #581
Labels
bug Something isn't working

Comments

@jonaustin09
Copy link
Contributor

Describe the bug
PutBucketPolicy document validation should validate the following structure for Principal property in Statements:

"Principal": {
  "AWS": "*"
}

To Reproduce

aws --endpoint-url http://localhost:7070 s3api put-bucket-policy --bucket MyBucket --policy file://policy.json

policy.json

{
   "Statement": [
      {
         "Effect": "Allow",
         "Principal": {
            "AWS": "arn:aws:iam::123456789012:root"
         },
         "Action": [
            "s3:DeleteObject",
            "s3:PutObject"
         ],
         "Resource": "arn:aws:s3:::MyBucket/*"
      }
   ]
}

Expected behavior
The action shouldn't return 400 validation error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant