Repository navigation
rgw: sync Keystone ACL strategies between S3 and Swift APIs - #68795
senolcolak wants to merge 2 commits into
Conversation
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
13 similar comments
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
jenkins test make check |
ba20fad to
793682b
Compare
793682b to
53f6468
Compare
e9db1e0 to
53f6468
Compare
53f6468 to
f5c2c86
Compare
Both TokenEngine::get_acl_strategy() and EC2Engine::get_acl_strategy()
were producing the same lambda over the same Cartesian product of
{tenant_id, tenant_name} x {user_id, user_name} plus four wildcards.
Hoist the body into a shared free function make_keystone_acl_strategy()
and route both engines through a thin envelope adapter. The function
takes plain strings and a roles list so it is unit-testable without
constructing a Keystone TokenEnvelope.
Add the authenticated wildcard "*:*" to the allowed_items array.
Swift's keystoneauth _authorize_cross_tenant() iterates the full
{tenant_id, tenant_name, '*'} x {user_id, user_name, '*'} product, so a
container with X-Container-Read: *:* must grant read to any token-bearing
Keystone user. The previous six-element array silently denied this case
for both Swift (TokenEngine) and S3 (EC2Engine) requests.
Add unittest_rgw_auth_keystone covering each combination
(project:user, name:name, project:*, *:user, *:*), no-match,
multi-grant OR-ing, and the system-reader role grant. The
BareRoleNameIsNotHonored case pins the deliberate omission of
project-scoped role-name matching documented in PR ceph#68795: until
acl_strategy_t can see the bucket owner, matching a bare role name
would leak across projects.
Signed-off-by: Senol Colak <[email protected]>
2bceb21 to
c022bde
Compare
Both TokenEngine::get_acl_strategy() and EC2Engine::get_acl_strategy()
were producing the same lambda over the same Cartesian product of
{tenant_id, tenant_name} x {user_id, user_name} plus four wildcards.
Hoist the body into a shared free function make_keystone_acl_strategy()
and route both engines through a thin envelope adapter. The function
takes plain strings and a roles list so it is unit-testable without
constructing a Keystone TokenEnvelope.
Add the authenticated wildcard "*:*" to the allowed_items array.
Swift's keystoneauth _authorize_cross_tenant() iterates the full
{tenant_id, tenant_name, '*'} x {user_id, user_name, '*'} product, so a
container with X-Container-Read: *:* must grant read to any token-bearing
Keystone user. The previous six-element array silently denied this case
for both Swift (TokenEngine) and S3 (EC2Engine) requests.
Add unittest_rgw_auth_keystone covering each combination
(project:user, name:name, project:*, *:user, *:*), no-match,
multi-grant OR-ing, and the system-reader role grant. The
BareRoleNameIsNotHonored case pins the deliberate omission of
project-scoped role-name matching documented in PR ceph#68795: until
acl_strategy_t can see the bucket owner, matching a bare role name
would leak across projects.
Signed-off-by: Senol Colak <[email protected]>
c022bde to
c2f22c4
Compare
The EC2Engine (S3 Keystone auth) previously returned nullptr for its ACL strategy, meaning S3 requests could only match ACLs by the bare project_id. This prevented Swift-format ACL entries (project:user) from being honored by S3 requests. Implement a full ACL strategy in EC2Engine::get_acl_strategy() that matches all 6 combinations of project/user UUIDs and names, mirroring the existing logic in TokenEngine::get_acl_strategy(). This enables bidirectional ACL interoperability between Swift and S3 when Keystone is the identity provider. Bare Keystone role names (e.g. 'X-Container-Read: Member') are not matched against the aclspec. Swift's keystoneauth scopes role-name ACL elements to the project that owns the container (see swift/common/middleware/keystoneauth.py: tenant-mismatch gate runs before the user_role-in-roles loop). The acl_strategy_t callback in RGW does not see the bucket owner, so a bare-role-name lookup here would grant the permission to any token carrying that role regardless of project scope, leaking access across Keystone projects in multi-tenant clouds. Project-scoped role-name ACLs are out of scope for this change and will need a separate follow-up that threads the container/bucket owner through the ACL evaluation. Fixes: https://tracker.ceph.com/issues/68492 Fixes: https://tracker.ceph.com/issues/68476 Signed-off-by: Senol Colak <[email protected]>
Both TokenEngine::get_acl_strategy() and EC2Engine::get_acl_strategy()
were producing the same lambda over the same Cartesian product of
{tenant_id, tenant_name} x {user_id, user_name} plus four wildcards.
Hoist the body into a shared free function make_keystone_acl_strategy()
and route both engines through a thin envelope adapter. The function
takes plain strings and a roles list so it is unit-testable without
constructing a Keystone TokenEnvelope.
Add the authenticated wildcard "*:*" to the allowed_items array.
Swift's keystoneauth _authorize_cross_tenant() iterates the full
{tenant_id, tenant_name, '*'} x {user_id, user_name, '*'} product, so a
container with X-Container-Read: *:* must grant read to any token-bearing
Keystone user. The previous six-element array silently denied this case
for both Swift (TokenEngine) and S3 (EC2Engine) requests.
Add unittest_rgw_auth_keystone covering each combination
(project:user, name:name, project:*, *:user, *:*), no-match,
multi-grant OR-ing, and the system-reader role grant. The
BareRoleNameIsNotHonored case pins the deliberate omission of
project-scoped role-name matching documented in PR ceph#68795: until
acl_strategy_t can see the bucket owner, matching a bare role name
would leak across projects.
Signed-off-by: Senol Colak <[email protected]>
c2f22c4 to
0a96b7d
Compare
|
Tested on a live deployment (Ceph squid + Keystone, RGW Swift backend for Glance images).
Without the patch, cross-project and public Glance image reads fail with 401 AccessDenied. With it, they succeed. |
Both TokenEngine::get_acl_strategy() and EC2Engine::get_acl_strategy()
were producing the same lambda over the same Cartesian product of
{tenant_id, tenant_name} x {user_id, user_name} plus four wildcards.
Hoist the body into a shared free function make_keystone_acl_strategy()
and route both engines through a thin envelope adapter. The function
takes plain strings and a roles list so it is unit-testable without
constructing a Keystone TokenEnvelope.
Add the authenticated wildcard "*:*" to the allowed_items array.
Swift's keystoneauth _authorize_cross_tenant() iterates the full
{tenant_id, tenant_name, '*'} x {user_id, user_name, '*'} product, so a
container with X-Container-Read: *:* must grant read to any token-bearing
Keystone user. The previous six-element array silently denied this case
for both Swift (TokenEngine) and S3 (EC2Engine) requests.
Add unittest_rgw_auth_keystone covering each combination
(project:user, name:name, project:*, *:user, *:*), no-match,
multi-grant OR-ing, and the system-reader role grant. The
BareRoleNameIsNotHonored case pins the deliberate omission of
project-scoped role-name matching documented in PR ceph#68795: until
acl_strategy_t can see the bucket owner, matching a bare role name
would leak across projects.
Signed-off-by: Senol Colak <[email protected]>
(cherry picked from commit 0a96b7d)
|
At a quick glance looks sane to me. |
|
jenkins test make check arm64 |
|
Would one of you be able to give it a formal review/approve when you have a moment? Once this lands in main I can unblock the squid backport (#70997), which is otherwise ready. Really appreciate your time. |
Both TokenEngine::get_acl_strategy() and EC2Engine::get_acl_strategy()
were producing the same lambda over the same Cartesian product of
{tenant_id, tenant_name} x {user_id, user_name} plus four wildcards.
Hoist the body into a shared free function make_keystone_acl_strategy()
and route both engines through a thin envelope adapter. The function
takes plain strings and a roles list so it is unit-testable without
constructing a Keystone TokenEnvelope.
Add the authenticated wildcard "*:*" to the allowed_items array.
Swift's keystoneauth _authorize_cross_tenant() iterates the full
{tenant_id, tenant_name, '*'} x {user_id, user_name, '*'} product, so a
container with X-Container-Read: *:* must grant read to any token-bearing
Keystone user. The previous six-element array silently denied this case
for both Swift (TokenEngine) and S3 (EC2Engine) requests.
Add unittest_rgw_auth_keystone covering each combination
(project:user, name:name, project:*, *:user, *:*), no-match,
multi-grant OR-ing, and the system-reader role grant. The
BareRoleNameIsNotHonored case pins the deliberate omission of
project-scoped role-name matching documented in PR ceph#68795: until
acl_strategy_t can see the bucket owner, matching a bare role name
would leak across projects.
Signed-off-by: Senol Colak <[email protected]>
(cherry picked from commit 0a96b7d)
(cherry picked from commit 68d8b41)
|
@mdw-at-linuxbox Please give this a formal review so the process can move forwards. |
|
ok to test |
Both TokenEngine::get_acl_strategy() and EC2Engine::get_acl_strategy()
were producing the same lambda over the same Cartesian product of
{tenant_id, tenant_name} x {user_id, user_name} plus four wildcards.
Hoist the body into a shared free function make_keystone_acl_strategy()
and route both engines through a thin envelope adapter. The function
takes plain strings and a roles list so it is unit-testable without
constructing a Keystone TokenEnvelope.
Add the authenticated wildcard "*:*" to the allowed_items array.
Swift's keystoneauth _authorize_cross_tenant() iterates the full
{tenant_id, tenant_name, '*'} x {user_id, user_name, '*'} product, so a
container with X-Container-Read: *:* must grant read to any token-bearing
Keystone user. The previous six-element array silently denied this case
for both Swift (TokenEngine) and S3 (EC2Engine) requests.
Add unittest_rgw_auth_keystone covering each combination
(project:user, name:name, project:*, *:user, *:*), no-match,
multi-grant OR-ing, and the system-reader role grant. The
BareRoleNameIsNotHonored case pins the deliberate omission of
project-scoped role-name matching documented in PR ceph#68795: until
acl_strategy_t can see the bucket owner, matching a bare role name
would leak across projects.
Signed-off-by: Senol Colak <[email protected]>
(cherry picked from commit 0a96b7d)
(cherry picked from commit 68d8b41)
Both TokenEngine::get_acl_strategy() and EC2Engine::get_acl_strategy()
were producing the same lambda over the same Cartesian product of
{tenant_id, tenant_name} x {user_id, user_name} plus four wildcards.
Hoist the body into a shared free function make_keystone_acl_strategy()
and route both engines through a thin envelope adapter. The function
takes plain strings and a roles list so it is unit-testable without
constructing a Keystone TokenEnvelope.
Add the authenticated wildcard "*:*" to the allowed_items array.
Swift's keystoneauth _authorize_cross_tenant() iterates the full
{tenant_id, tenant_name, '*'} x {user_id, user_name, '*'} product, so a
container with X-Container-Read: *:* must grant read to any token-bearing
Keystone user. The previous six-element array silently denied this case
for both Swift (TokenEngine) and S3 (EC2Engine) requests.
Add unittest_rgw_auth_keystone covering each combination
(project:user, name:name, project:*, *:user, *:*), no-match,
multi-grant OR-ing, and the system-reader role grant. The
BareRoleNameIsNotHonored case pins the deliberate omission of
project-scoped role-name matching documented in PR ceph#68795: until
acl_strategy_t can see the bucket owner, matching a bare role name
would leak across projects.
Signed-off-by: Senol Colak <[email protected]>
(cherry picked from commit 0a96b7d)
(cherry picked from commit 68d8b41)
Both TokenEngine::get_acl_strategy() and EC2Engine::get_acl_strategy()
were producing the same lambda over the same Cartesian product of
{tenant_id, tenant_name} x {user_id, user_name} plus four wildcards.
Hoist the body into a shared free function make_keystone_acl_strategy()
and route both engines through a thin envelope adapter. The function
takes plain strings and a roles list so it is unit-testable without
constructing a Keystone TokenEnvelope.
Add the authenticated wildcard "*:*" to the allowed_items array.
Swift's keystoneauth _authorize_cross_tenant() iterates the full
{tenant_id, tenant_name, '*'} x {user_id, user_name, '*'} product, so a
container with X-Container-Read: *:* must grant read to any token-bearing
Keystone user. The previous six-element array silently denied this case
for both Swift (TokenEngine) and S3 (EC2Engine) requests.
Add unittest_rgw_auth_keystone covering each combination
(project:user, name:name, project:*, *:user, *:*), no-match,
multi-grant OR-ing, and the system-reader role grant. The
BareRoleNameIsNotHonored case pins the deliberate omission of
project-scoped role-name matching documented in PR ceph#68795: until
acl_strategy_t can see the bucket owner, matching a bare role name
would leak across projects.
Signed-off-by: Senol Colak <[email protected]>
(cherry picked from commit 0a96b7d)
(cherry picked from commit 68d8b41)
Both TokenEngine::get_acl_strategy() and EC2Engine::get_acl_strategy()
were producing the same lambda over the same Cartesian product of
{tenant_id, tenant_name} x {user_id, user_name} plus four wildcards.
Hoist the body into a shared free function make_keystone_acl_strategy()
and route both engines through a thin envelope adapter. The function
takes plain strings and a roles list so it is unit-testable without
constructing a Keystone TokenEnvelope.
Add the authenticated wildcard "*:*" to the allowed_items array.
Swift's keystoneauth _authorize_cross_tenant() iterates the full
{tenant_id, tenant_name, '*'} x {user_id, user_name, '*'} product, so a
container with X-Container-Read: *:* must grant read to any token-bearing
Keystone user. The previous six-element array silently denied this case
for both Swift (TokenEngine) and S3 (EC2Engine) requests.
Add unittest_rgw_auth_keystone covering each combination
(project:user, name:name, project:*, *:user, *:*), no-match,
multi-grant OR-ing, and the system-reader role grant. The
BareRoleNameIsNotHonored case pins the deliberate omission of
project-scoped role-name matching documented in PR ceph#68795: until
acl_strategy_t can see the bucket owner, matching a bare role name
would leak across projects.
Signed-off-by: Senol Colak <[email protected]>
(cherry picked from commit 0a96b7d)
(cherry picked from commit 68d8b41)
Both TokenEngine::get_acl_strategy() and EC2Engine::get_acl_strategy()
were producing the same lambda over the same Cartesian product of
{tenant_id, tenant_name} x {user_id, user_name} plus four wildcards.
Hoist the body into a shared free function make_keystone_acl_strategy()
and route both engines through a thin envelope adapter. The function
takes plain strings and a roles list so it is unit-testable without
constructing a Keystone TokenEnvelope.
Add the authenticated wildcard "*:*" to the allowed_items array.
Swift's keystoneauth _authorize_cross_tenant() iterates the full
{tenant_id, tenant_name, '*'} x {user_id, user_name, '*'} product, so a
container with X-Container-Read: *:* must grant read to any token-bearing
Keystone user. The previous six-element array silently denied this case
for both Swift (TokenEngine) and S3 (EC2Engine) requests.
Add unittest_rgw_auth_keystone covering each combination
(project:user, name:name, project:*, *:user, *:*), no-match,
multi-grant OR-ing, and the system-reader role grant. The
BareRoleNameIsNotHonored case pins the deliberate omission of
project-scoped role-name matching documented in PR ceph#68795: until
acl_strategy_t can see the bucket owner, matching a bare role name
would leak across projects.
Signed-off-by: Senol Colak <[email protected]>
(cherry picked from commit 0a96b7d)
(cherry picked from commit 68d8b41)
Both TokenEngine::get_acl_strategy() and EC2Engine::get_acl_strategy()
were producing the same lambda over the same Cartesian product of
{tenant_id, tenant_name} x {user_id, user_name} plus four wildcards.
Hoist the body into a shared free function make_keystone_acl_strategy()
and route both engines through a thin envelope adapter. The function
takes plain strings and a roles list so it is unit-testable without
constructing a Keystone TokenEnvelope.
Add the authenticated wildcard "*:*" to the allowed_items array.
Swift's keystoneauth _authorize_cross_tenant() iterates the full
{tenant_id, tenant_name, '*'} x {user_id, user_name, '*'} product, so a
container with X-Container-Read: *:* must grant read to any token-bearing
Keystone user. The previous six-element array silently denied this case
for both Swift (TokenEngine) and S3 (EC2Engine) requests.
Add unittest_rgw_auth_keystone covering each combination
(project:user, name:name, project:*, *:user, *:*), no-match,
multi-grant OR-ing, and the system-reader role grant. The
BareRoleNameIsNotHonored case pins the deliberate omission of
project-scoped role-name matching documented in PR ceph#68795: until
acl_strategy_t can see the bucket owner, matching a bare role name
would leak across projects.
Signed-off-by: Senol Colak <[email protected]>
(cherry picked from commit 0a96b7d)
(cherry picked from commit 68d8b41)
Backport-Id: 01a08f3a-594a-74c8-a6e7-11286099fb49 Backport-PR: #12 Upstream-PRs: ceph#68795, ceph#70997
Backport-Id: 01a10c8c-a7a0-762d-bc2d-051616f550c4 Backport-PR: #22 Upstream-PRs: ceph#68795, ceph#71490
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
Both TokenEngine::get_acl_strategy() and EC2Engine::get_acl_strategy()
were producing the same lambda over the same Cartesian product of
{tenant_id, tenant_name} x {user_id, user_name} plus four wildcards.
Hoist the body into a shared free function make_keystone_acl_strategy()
and route both engines through a thin envelope adapter. The function
takes plain strings and a roles list so it is unit-testable without
constructing a Keystone TokenEnvelope.
Add the authenticated wildcard "*:*" to the allowed_items array.
Swift's keystoneauth _authorize_cross_tenant() iterates the full
{tenant_id, tenant_name, '*'} x {user_id, user_name, '*'} product, so a
container with X-Container-Read: *:* must grant read to any token-bearing
Keystone user. The previous six-element array silently denied this case
for both Swift (TokenEngine) and S3 (EC2Engine) requests.
Add unittest_rgw_auth_keystone covering each combination
(project:user, name:name, project:*, *:user, *:*), no-match,
multi-grant OR-ing, and the system-reader role grant. The
BareRoleNameIsNotHonored case pins the deliberate omission of
project-scoped role-name matching documented in PR ceph#68795: until
acl_strategy_t can see the bucket owner, matching a bare role name
would leak across projects.
Signed-off-by: Senol Colak <[email protected]>
(cherry picked from commit 0a96b7d)
(cherry picked from commit 68d8b41)
Backport-Id: 01a08f3a-594a-74c8-a6e7-11286099fb49 Backport-PR: #12 Upstream-PRs: ceph#68795, ceph#70997
Backport-Id: 01a14449-fa55-75f8-a119-93a83c111aec Backport-PR: #35 Upstream-PRs: ceph#68795, ceph#70997
Both TokenEngine::get_acl_strategy() and EC2Engine::get_acl_strategy()
were producing the same lambda over the same Cartesian product of
{tenant_id, tenant_name} x {user_id, user_name} plus four wildcards.
Hoist the body into a shared free function make_keystone_acl_strategy()
and route both engines through a thin envelope adapter. The function
takes plain strings and a roles list so it is unit-testable without
constructing a Keystone TokenEnvelope.
Add the authenticated wildcard "*:*" to the allowed_items array.
Swift's keystoneauth _authorize_cross_tenant() iterates the full
{tenant_id, tenant_name, '*'} x {user_id, user_name, '*'} product, so a
container with X-Container-Read: *:* must grant read to any token-bearing
Keystone user. The previous six-element array silently denied this case
for both Swift (TokenEngine) and S3 (EC2Engine) requests.
Add unittest_rgw_auth_keystone covering each combination
(project:user, name:name, project:*, *:user, *:*), no-match,
multi-grant OR-ing, and the system-reader role grant. The
BareRoleNameIsNotHonored case pins the deliberate omission of
project-scoped role-name matching documented in PR ceph#68795: until
acl_strategy_t can see the bucket owner, matching a bare role name
would leak across projects.
Signed-off-by: Senol Colak <[email protected]>
(cherry picked from commit 0a96b7d)
(cherry picked from commit 68d8b41)
(cherry picked from commit 2da14c0)
Signed-off-by: Uwe Schwaeke <[email protected]>
Summary
When Keystone is the identity provider, ACLs set via the Swift API were not
honored by S3 API requests. The root cause:
EC2Engine::get_acl_strategy()returned
nullptr, so S3 requests only matched ACLs by the bareproject_idstring (via the default strategy in
RemoteApplier::get_perms_from_aclspec()).Swift ACLs store grantees in
project:usercolon-separated format, which thedefault strategy cannot match.
This patch implements a complete ACL strategy in
EC2Engine::get_acl_strategy()mirroring the existing
TokenEngine::get_acl_strategy()logic, factors theshared body into one helper, and adds the authenticated wildcard
*:*.Changes (
src/rgw/rgw_auth_keystone.cc)EC2Engine::get_acl_strategy()stub with a real strategy.rgw::auth::keystone::make_keystone_acl_strategy()taking plain stringsand a roles list. Both engines now go through a thin envelope adapter,
keystone_acl_strategy_from_token(). Behaviour is identical betweenSwift and S3 by construction.
make_spec_item("*", "*")toallowed_items. Swift'skeystoneauth._authorize_cross_tenant()iterates the full{tenant_id, tenant_name, '*'} x {user_id, user_name, '*'}Cartesianproduct, so containers with
X-Container-Read: *:*must grant read toany authenticated Keystone user. The previous six-element array silently
denied this case in both engines.
Tests (
src/test/rgw/test_rgw_auth_keystone.cc)New
unittest_rgw_auth_keystonecovering:project_id:user_id,name:name,project_id:*,name:*,*:user_id,*:user_name)*:*authenticated wildcardRGW_OP_TYPE_READsee "Out of scope" below)
Out of scope: bare-role-name ACLs (#68476)
Bare Keystone role names (e.g.
X-Container-Read: Member) are not matchedagainst the aclspec. Swift's
keystoneauthmiddleware scopes role-name ACLelements to the project that owns the container (the tenant-mismatch gate
runs before the user_role-in-roles loop in
swift/common/middleware/keystoneauth.py). Theacl_strategy_tcallback inRGW does not see the bucket owner, so a bare-role-name lookup here would
grant the permission to any token carrying that role regardless of project
scope, leaking access across Keystone projects in multi-tenant clouds.
Project-scoped role-name ACLs require a separate change that threads the
container/bucket owner through ACL evaluation.
How it works
RemoteApplier::get_perms_from_aclspec()callsextra_acl_strategy(aclspec)if non-null and ORs the result into the permission mask. Returning a real
strategy from
EC2Engine::get_acl_strategy()lets S3 Keystone requestsmatch Swift-format identity strings in the ACL spec map.
Documentation (
doc/radosgw/keystone.rst)Documents the cross-API ACL interoperability behavior and the supported
grant formats.
Test plan
cd build && ninja bin/radosgw bin/unittest_rgw_auth_keystonectest -R unittest_rgw_auth_keystonectest -R rgw(no regressions)project_id:user_id*:*is denied
Fixes: https://tracker.ceph.com/issues/68492
Refs: https://tracker.ceph.com/issues/68476
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 DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.