Skip to content
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: only consider subuser perm for its user resources #57539

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

clwluvw
Copy link
Contributor

@clwluvw clwluvw commented May 18, 2024

Currently, subusers inherit ACL permissions from the parent account, and the permission check using op_to_perm(),
performed before considering the resource (bucket/object) ACLs, may deny access even if the resource has authenticated or public read/write permissions. Since ACLs do not support subusers, a subuser's permissions should only be considered for resources owned by their user.
For accessing other resources, subusers should only be granted access if public read/write permissions are available.

Fixes: https://tracker.ceph.com/issues/66105

@clwluvw clwluvw requested a review from a team as a code owner May 18, 2024 01:52
@github-actions github-actions bot added the rgw label May 18, 2024
Currently, subusers inherit ACL permissions from the parent account,
and the permission check using `op_to_perm()`,
performed before considering the resource (bucket/object) ACLs,
may deny access even if the resource has authenticated or public read/write permissions.
Since ACLs do not support subusers, a subuser's permissions should only
be considered for resources owned by their user.
For accessing other resources, subusers should only be granted access
if public read/write permissions are available.

Fixes: https://tracker.ceph.com/issues/66105
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
// Only consider ACL if the user has full control (either a subuser with full control or a non-subuser)
perm = acl.get_perm(dpp, auth_identity, perm_mask);

if (auth_identity.is_owner_of(owner.id)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding the recent account implementation, this probably needs to be replaced by something like this: is_root_of() 06a2645#diff-086b6cb87149dc85d4a1160169c614771a444abeefd5cb6730a3bf65155df825R64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant