versitygw
versitygw copied to clipboard
Bucket policy document principal structure
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