mirror of https://github.com/kubernetes/kops.git
Allow listing versions for objects in the S3 bucket
This commit is contained in:
parent
aa6e09ca12
commit
00cbbce2b5
|
@ -328,7 +328,12 @@ func (b *PolicyBuilder) AddS3Permissions(p *Policy) (*Policy, error) {
|
|||
|
||||
p.Statement = append(p.Statement, &Statement{
|
||||
Effect: StatementEffectAllow,
|
||||
Action: stringorslice.Of("s3:GetBucketLocation", "s3:GetEncryptionConfiguration", "s3:ListBucket"),
|
||||
Action: stringorslice.Of(
|
||||
"s3:GetBucketLocation",
|
||||
"s3:GetEncryptionConfiguration",
|
||||
"s3:ListBucket",
|
||||
"s3:ListBucketVersions",
|
||||
),
|
||||
Resource: stringorslice.Slice([]string{
|
||||
strings.Join([]string{b.IAMPrefix(), ":s3:::", s3Path.Bucket()}, ""),
|
||||
}),
|
||||
|
|
|
@ -50,7 +50,8 @@
|
|||
"Action": [
|
||||
"s3:GetBucketLocation",
|
||||
"s3:GetEncryptionConfiguration",
|
||||
"s3:ListBucket"
|
||||
"s3:ListBucket",
|
||||
"s3:ListBucketVersions"
|
||||
],
|
||||
"Resource": [
|
||||
"arn:aws:s3:::kops-tests"
|
||||
|
|
|
@ -142,7 +142,8 @@
|
|||
"Action": [
|
||||
"s3:GetBucketLocation",
|
||||
"s3:GetEncryptionConfiguration",
|
||||
"s3:ListBucket"
|
||||
"s3:ListBucket",
|
||||
"s3:ListBucketVersions"
|
||||
],
|
||||
"Resource": [
|
||||
"arn:aws:s3:::kops-tests"
|
||||
|
|
|
@ -142,7 +142,8 @@
|
|||
"Action": [
|
||||
"s3:GetBucketLocation",
|
||||
"s3:GetEncryptionConfiguration",
|
||||
"s3:ListBucket"
|
||||
"s3:ListBucket",
|
||||
"s3:ListBucketVersions"
|
||||
],
|
||||
"Resource": [
|
||||
"arn:aws:s3:::kops-tests"
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
"Action": [
|
||||
"s3:GetBucketLocation",
|
||||
"s3:GetEncryptionConfiguration",
|
||||
"s3:ListBucket"
|
||||
"s3:ListBucket",
|
||||
"s3:ListBucketVersions"
|
||||
],
|
||||
"Resource": [
|
||||
"arn:aws:s3:::kops-tests"
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
"Action": [
|
||||
"s3:GetBucketLocation",
|
||||
"s3:GetEncryptionConfiguration",
|
||||
"s3:ListBucket"
|
||||
"s3:ListBucket",
|
||||
"s3:ListBucketVersions"
|
||||
],
|
||||
"Resource": [
|
||||
"arn:aws:s3:::kops-tests"
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
"Action": [
|
||||
"s3:GetBucketLocation",
|
||||
"s3:GetEncryptionConfiguration",
|
||||
"s3:ListBucket"
|
||||
"s3:ListBucket",
|
||||
"s3:ListBucketVersions"
|
||||
],
|
||||
"Resource": [
|
||||
"arn:aws:s3:::kops-tests"
|
||||
|
|
Loading…
Reference in New Issue