]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rgw: acl grants num limit
authorEnming Zhang <enming.zhang@umcloud.com>
Wed, 12 Jul 2017 14:21:54 +0000 (22:21 +0800)
committerEnming Zhang <enming.zhang@umcloud.com>
Sun, 16 Jul 2017 12:58:43 +0000 (20:58 +0800)
commita1b05dd2f6511a18603051112e18af410f8beb6c
treedbe4f6eae543e177862c8daf184dfbd3d681fb13
parent171104cb931b6dbaf0e82f1738d951db812ffb2e
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>
src/common/config_opts.h
src/rgw/rgw_common.cc
src/rgw/rgw_common.h
src/rgw/rgw_op.cc