fix(storage): remove ListBucket permission from MinIO bucket policy

This commit is contained in:
wizardchen
2026-04-16 15:53:03 +08:00
parent a560497ee8
commit 3e61b91efd
+1 -4
View File
@@ -165,12 +165,9 @@ class MinioStorage(Storage):
'"Version":"2012-10-17",' '"Version":"2012-10-17",'
'"Statement":[' '"Statement":['
'{"Effect":"Allow","Principal":{"AWS":["*"]},' '{"Effect":"Allow","Principal":{"AWS":["*"]},'
'"Action":["s3:GetBucketLocation","s3:ListBucket"],'
'"Resource":["arn:aws:s3:::%s"]},'
'{"Effect":"Allow","Principal":{"AWS":["*"]},'
'"Action":["s3:GetObject"],' '"Action":["s3:GetObject"],'
'"Resource":["arn:aws:s3:::%s/*"]}' '"Resource":["arn:aws:s3:::%s/*"]}'
"]}" % (bucket_name, bucket_name) "]}" % (bucket_name)
) )
client.set_bucket_policy(bucket_name, policy) client.set_bucket_policy(bucket_name, policy)