Repository navigation
rgw: fix aclRequired for bucket-logging - #64251
Conversation
|
This is still WIP. Created the PR to get the approach reviewed. |
There was a problem hiding this comment.
since, in some of the function invocations, the return value is ignored, it is probably better to either use bool* with nullptr indication that the caller does not care about this, or use std::optional<bool> with std::nullopt indicating that the caller does not care.
if you use either with defaults, you would not need to change code that does not set the req_state
|
doc also needs to be fixed. please see: https://github.com/ceph/ceph/blob/main/doc/radosgw/bucket_logging.rst?plain=1#L248 |
61b83ea to
fe1c28b
Compare
|
@pritha-srivastava , can you please see if the auth changes are fine? |
There was a problem hiding this comment.
returning false mean that there is no permission. but ACL may still be require in this case?
There was a problem hiding this comment.
I'd interpreted it to mean that the op was allowed because it was allowed by the acl. I'm not sure if we want to set ACLRequired to true when the op was denied.
There was a problem hiding this comment.
I tend to agree with Yuval that aclRequired field could be set to Yes even when the request is denied using an ACL (its definition is not very clear to me in https://docs.aws.amazon.com/AmazonS3/latest/userguide/LogFormat.html). Couldn't the user use this to check if the request was allowed/denied using an acl or other IAM policies.
There was a problem hiding this comment.
There was a problem hiding this comment.
It is not very clear but from the blog: "requests that were dependent on an ACL for access to objects in S3". I take it to mean that the request was authorized based on an ACL. In such a case, the user would know that a policy would be required to provide access to this object.
There was a problem hiding this comment.
agree its is not clear. i guess that the only way to know is to try with AWS.
but, regardless, I think, it would be ok to leave as-is: set a dash if ACL rejected the request.
cbodley
left a comment
There was a problem hiding this comment.
how important is this feature? i really want to keep this permission logic as simple and understandable as possible
There was a problem hiding this comment.
can we find a better name for this? i would interpret this to control whether authorization should require an acl
maybe something like acl_was_required or granted_by_acl?
fe1c28b to
cafe08c
Compare
|
matching s3-test: ceph/s3-tests#667 |
The aclRequired field in the bucket log is meant to indicate that an acl was required to authorize the operation. This change introduces a new field in the req_state to track whether an acl was checked to authorize the request. Fixes: https://tracker.ceph.com/issues/71730 Signed-off-by: N Balachandran <[email protected]>
cafe08c to
7ab0704
Compare
| ps->bucket_access_conf->ignore_public_acls())) { | ||
| ldpp_dout(dpp, 10) << __func__ << ": granted by bucket acl" << dendl; | ||
| if (granted_by_acl) { | ||
| *granted_by_acl = true; |
There was a problem hiding this comment.
once this PR is merged, buckets with BucketOwnerEnforced will ignore the default generated bucket owner ACL.
in this case, granted_by_acl will be set to false (even if default ACL exists).
until then, granted_by_acl will be set to true in any bucket without policy, even for operations done by the owner.
@cbodley, @pritha-srivastava does it sound reasonable?
|
jenkins test make check |
|
jenkins test make check arm64 |
|
This is an automated message by src/script/redmine-upkeep.py. I found one or more 'Fixes:' tags in the commit messages in
The referenced tickets are: Those tickets do not reference this merged Pull Request. If this |
The aclRequired field in the bucket log is meant to indicate that an acl was required to authorize the operation. This change introduces a new field in the req_state to track whether an acl was checked to authorize the request.
Fixes: https://tracker.ceph.com/issues/71730
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job Definition