Skip to content

Commit 1149eb5

Browse files
committed
Merge pull request #4566 from rvaralda/registry_createbucket
ref(registry/database): change the create_bucket script to avoid allow 'ListAllMyBuckets' on S3 Policy
2 parents df1dd36 + fa01516 commit 1149eb5

3 files changed

Lines changed: 2 additions & 7 deletions

File tree

database/templates/create_bucket

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ conn = boto.connect_s3(
1212
calling_format=OrdinaryCallingFormat())
1313
name = sys.argv[1]
1414

15-
if name not in (bucket.name for bucket in conn.get_all_buckets()):
15+
if not conn.lookup(name):
1616
conn.create_bucket(name)

docs/managing_deis/running-deis-without-ceph.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,6 @@ the registry:
136136
137137
{
138138
"Statement": [
139-
{
140-
"Resource": "arn:aws:s3:::*",
141-
"Action": "s3:ListAllMyBuckets",
142-
"Effect": "Allow"
143-
},
144139
{
145140
"Resource": [
146141
"arn:aws:s3:::MYBUCKET"

registry/templates/create_bucket

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ name = '{{ getv "/deis/registry/s3bucket" }}'
2222
name = '{{ getv "/deis/registry/bucketName" }}'
2323
{{ end }}
2424

25-
if name not in (bucket.name for bucket in conn.get_all_buckets()):
25+
if not conn.lookup(name):
2626
conn.create_bucket(name)

0 commit comments

Comments
 (0)