diff options
author | Enming Zhang <enming.zhang@umcloud.com> | 2017-07-12 16:21:54 +0200 |
---|---|---|
committer | Enming Zhang <enming.zhang@umcloud.com> | 2017-07-16 14:58:43 +0200 |
commit | a1b05dd2f6511a18603051112e18af410f8beb6c (patch) | |
tree | dbe4f6eae543e177862c8daf184dfbd3d681fb13 /src/rgw/rgw_common.cc | |
parent | Merge pull request #15587 from wjwithagen/wip-wjw-ceph-disk-is_diskdevice (diff) | |
download | ceph-a1b05dd2f6511a18603051112e18af410f8beb6c.tar.xz ceph-a1b05dd2f6511a18603051112e18af410f8beb6c.zip |
rgw: acl grants num limit
According to AWS S3 in this document[1], an ACL can have up to 100
grants.
If the nums of grants is larger than 100, S3 will return like following:
400
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>MalformedACLError</Code><Message>The XML you provided was not well-formed or did not validate against our published schema</Message><RequestId>10EC67824572C378</RequestId><HostId>AWL3NnQChs/HCfOTu5MtyEc9uzRuxpYMhmvXQry2CovCcuxO2/tMqY1zGoWOur86ipQt3v/WEiA=</HostId></Error>
Now if the nums of request acl grants is larger than the maximum allowed, rgw will return
like following:
400
<?xml version="1.0" encoding="UTF-8"?><Error><Code>MalformedACLError</Code><Message>The request is rejected, because the acl grants number you requested is larger than the maximum 101 grants allowed in an acl.</Message><BucketName>222</BucketName><RequestId>tx000000000000000000017-00596b5fad-101a-default</RequestId><HostId>101a-default-default</HostId></Error>
The maximum number of acl grants can be configured in config file with the configuration item:
rgw_acl_grants_max_num
[1] http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
Signed-off-by: Enming Zhang <enming.zhang@umcloud.com>
Diffstat (limited to 'src/rgw/rgw_common.cc')
-rw-r--r-- | src/rgw/rgw_common.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rgw/rgw_common.cc b/src/rgw/rgw_common.cc index d7fb6cfdcf2..05b92d2ee5a 100644 --- a/src/rgw/rgw_common.cc +++ b/src/rgw/rgw_common.cc @@ -74,6 +74,7 @@ rgw_http_errors rgw_http_s3_errors({ { ERR_MALFORMED_XML, {400, "MalformedXML" }}, { ERR_AMZ_CONTENT_SHA256_MISMATCH, {400, "XAmzContentSHA256Mismatch" }}, { ERR_INVALID_TAG, {400, "InvalidTag"}}, + { ERR_MALFORMED_ACL_ERROR, {400, "MalformedACLError" }}, { ERR_LENGTH_REQUIRED, {411, "MissingContentLength" }}, { EACCES, {403, "AccessDenied" }}, { EPERM, {403, "AccessDenied" }}, |