Repository navigation
squid: fix Swift ACL evaluation for Glance image sharing - #12
Merged
Merged
Conversation
uw-sc
force-pushed
the
backport/570
branch
4 times, most recently
from
September 25, 2026 11:23
413003d to
c58c110
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]> (cherry picked from commit e05a139) (cherry picked from commit a18aee2)
irq0
reviewed
Sep 25, 2026
irq0
reviewed
Sep 25, 2026
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)
Signed-off-by: Uwe Schwaeke <[email protected]>
nodeenv 1.11.0 (released 2026-09-26) no longer leaves the node-env/src directory behind after installing a prebuilt node. The build step runs an unpinned `pip install nodeenv`, so as of today every build with WITH_MGR_DASHBOARD_FRONTEND fails at chown: cannot access '.../node-env/src': No such file or directory ninja: build stopped: subcommand failed. (e.g. ceph-pr-pipeline build 2504). The chown is a workaround for tarball uid mapping in containers and is only needed when the src directory exists, so skip it when there is nothing to fix up. Assisted-by: Claude Fable 5 Signed-off-by: David Galloway <[email protected]> (cherry picked from commit 5aff221) Conflicts: src/pybind/mgr/dashboard/frontend/CMakeLists.txt squid still creates the npm cache directory with "mkdir -p" and has no DEPENDS on setup-virtualenv.sh; kept those lines as they are and took only the guarded chown and its comment Signed-off-by: David Galloway <[email protected]> Assisted-by: Claude Fable 5.1 (claude-fable-5-1) (cherry picked from commit c96865f)
uw-sc
added a commit
that referenced
this pull request
Oct 14, 2026
Backport-Id: 01a08f3a-594a-74c8-a6e7-11286099fb49 Backport-PR: #12 Upstream-PRs: ceph#68795, ceph#70997
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes cobaltcore-dev/cloud-storage#570