Skip to content

squid-19.2.7: Backport/618 - #35

Merged
uw-sc merged 3 commits into
squid-19.2.7-cobaltcore-storagefrom
backport/618
Oct 16, 2026
Merged

uw-sc merged 3 commits into
squid-19.2.7-cobaltcore-storagefrom
backport/618

Conversation

@uw-sc

@uw-sc uw-sc commented Oct 16, 2026

Copy link
Copy Markdown

Closes cobaltcore-dev/cloud-storage#618

Backport file

  • release-management/backports/<uuid>.md added (or updated) by this PR
  • id in frontmatter matches the filename stem
  • provenance.upstream_prs set (or provenance.type: other with an other: block)

Stage-B risk (filled per release-management/backports/RISK-RUBRIC.md)

  • blast — cosmetic / availability / data-loss
  • conflict — clean / trivial / substantive
  • coverage — strong / partial / weak
  • Risk-notes paragraph in the prose section (required for high band)

Merge

Land this via just merge-backport PR=<N> — do not click the green merge button.
The just recipe constructs the merge commit's Backport-Id trailer.

senolcolak and others added 3 commits October 16, 2026 10:36
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)
(cherry picked from commit 5afd197)
Signed-off-by: Uwe Schwaeke <[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]>
(cherry picked from commit 0a96b7d)
(cherry picked from commit 68d8b41)
(cherry picked from commit 2da14c0)
Signed-off-by: Uwe Schwaeke <[email protected]>
@uw-sc
uw-sc merged commit e343184 into squid-19.2.7-cobaltcore-storage Oct 16, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants