public read policy added
This commit is contained in:
parent
4271610ad1
commit
7ceca4ed6c
2 changed files with 15 additions and 0 deletions
|
|
@ -14,4 +14,7 @@ mc admin user add myminio "$MERCH_API_USER" "$MERCH_API_PASSWORD"
|
||||||
|
|
||||||
mc admin policy attach myminio api-policy --user="$MERCH_API_USER"
|
mc admin policy attach myminio api-policy --user="$MERCH_API_USER"
|
||||||
|
|
||||||
|
mc admin policy create myminio public-read /policies/public-read.json
|
||||||
|
mc anonymous set download myminio/user-merch-images
|
||||||
|
|
||||||
echo "MinIO init done."
|
echo "MinIO init done."
|
||||||
|
|
|
||||||
12
policies/public-read.json
Normal file
12
policies/public-read.json
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"Version": "2012-10-17",
|
||||||
|
"Statement": [
|
||||||
|
{
|
||||||
|
"Effect": "Allow",
|
||||||
|
"Principal": {"AWS": ["*"]},
|
||||||
|
"Action": ["s3:GetObject"],
|
||||||
|
"Resource": ["arn:aws:s3:::user-merch-images/*"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue