New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: acl grants num limit #16291

Merged
merged 1 commit into from Jul 18, 2017

Conversation

Projects
None yet
3 participants
@ZVampirEM77
Contributor

ZVampirEM77 commented Jul 12, 2017

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

MalformedACLErrorThe XML you provided was not well-formed or did not validate against our published schema10EC67824572C378AWL3NnQChs/HCfOTu5MtyEc9uzRuxpYMhmvXQry2CovCcuxO2/tMqY1zGoWOur86ipQt3v/WEiA=

Now if the nums of request acl grants is larger than the maximum allowed, rgw will return
like following:
400

MalformedACLErrorThe request is rejected, because the acl grants number you requested is larger than the maximum 101 grants allowed in an acl.222tx000000000000000000017-00596b5fad-101a-default101a-default-default

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

ldout(s->cct, 0) << __func__ << " An ACL can have up to 100 grants, request ACL grants num: "
<< grants_num << dendl;
op_ret = -ERR_MALFORMED_ACL_ERROR;
s->err.message = "The XML you provided was not well-formed or did not validate against our published schema";

This comment has been minimized.

@cbodley

cbodley Jul 14, 2017

Contributor

similar to feedback on #16310:

  • raise debug level to 4
  • can we give a better error message here? should say that it's rejected because it exceeds the maximum number of acls
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>
@ZVampirEM77

This comment has been minimized.

Contributor

ZVampirEM77 commented Jul 16, 2017

@cbodley I have amended the code. Please review it again. Thx

@cbodley cbodley added the needs-qa label Jul 17, 2017

@yuriw yuriw merged commit 5f5647a into ceph:master Jul 18, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment