Bug #19448
openGET bucket policy response format
0%
Description
Request GET /{bucket}/?policy returns data in XML format. However, by AWS S3 API documentation response should be in JSON format.
"The response contains the (JSON) policy of the specified bucket."
http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETpolicy.html
This incompatibility, for example, makes Ansible module s3_bucket useless.
FROM Ceph-Dev Maillist, Artur Molchanov reported this bug.
Updated by Chang Liu about 7 years ago
Indeed, We don't impl this API。 RGW will return `list bucket result` if we request /{bucket}/?policy。
curl -v 'http://localhost:8000/hello2/?policy' * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 8000 (#0) > GET /hello2/?policy HTTP/1.1 > Host: localhost:8000 > User-Agent: curl/7.47.0 > Accept: */* > < HTTP/1.1 200 OK < x-amz-request-id: tx000000000000000000006-0058e1f243-1034-default < Content-Type: application/xml < Content-Length: 231 < Date: Mon, 03 Apr 2017 06:57:07 GMT < * Connection #0 to host localhost left intact <?xml version="1.0" encoding="UTF-8"?><ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Name>hello2</Name><Prefix></Prefix><Marker></Marker><MaxKeys>1000</MaxKeys><IsTruncated>false</IsTruncated></ListBucketResult>%
Updated by Chang Liu about 7 years ago
`s3cmd info` was broken as following:
[root@tianjin-rgw-00 /data/home/channingliu]# s3cmd info s3://sealdoublewrite/1252448703/lctest/requirements-97.txt s3://sealdoublewrite/1252448703/lctest/requirements-97.txt (object): File size: 45 Last mod: Wed, 05 Apr 2017 08:38:36 GMT MIME type: application/octet-stream MD5 sum: d0df2778f5eb34ad1175a2fde5829263 SSE: none policy: <?xml version="1.0" encoding="UTF-8"?><ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Name>sealdoublewrite</Name><Prefix></Prefix><Marker></Marker><MaxKeys>1000</MaxKeys><IsTruncated>false</IsTruncated><Contents><Key>1252448703/lctest/requirements-110.txt</Key><LastModified>2017-04-05T08:36:17.525Z</LastModified><ETag>"d0df2778f5eb34ad1175a2fde5829263"</ETag><Size>45</Size><StorageClass>STANDARD</StorageClass><Owner><ID>test</ID><DisplayName>test</DisplayName></Owner></Contents><Contents><Key>1252448703/lctest/requirements-113.txt</Key><LastModified>2017-04-05T08:38:38.265Z</LastModified><ETag>"d0df2778f5eb34ad1175a2fde5829263"</ETag><Size>45</Size><S
Should we fix this?
Updated by Casey Bodley about 7 years ago
there is work in progress at https://github.com/ceph/ceph/pull/14307 that implements this GetBucketPolicy operation
Updated by joke lee almost 7 years ago
Casey Bodley wrote:
there is work in progress at https://github.com/ceph/ceph/pull/14307 that implements this GetBucketPolicy operation
can this https://github.com/ceph/ceph/pull/14307 backport to jewel?
Updated by Matt Benjamin almost 7 years ago
@joke lee, not planned to backport bucket policy to jewel, L is nearly upon us
Matt