Backport/squid 19.2.6 cobaltcore storage/keystone iam policy - #16
Conversation
uw-sc
left a comment
There was a problem hiding this comment.
please
- add the Backport ticket number in the PR description. might be 466 or 467 (both reference the same upstream pr)
- rebase onto squid-19.2.6-cobaltcore-storage to get the tests runnning.
thank you
Keystone roles are injected into the IAM policy evaluation environment as "keystone:role" condition keys. This enables bucket policies to grant or deny access based on Keystone roles. It bridges the gap between Openstack RBAC and S3 IAM policy. Document keystone:role in bukcet policy and Keystone S3 integration Signed-off-by: Supriti Singh <supriti.singh@clyso.com> Signed-off-by: Marcel Lauhoff <marcel.lauhoff@clyso.com> On-behalf-of: SAP <supriti.singh@clyso.com> On-behalf-of: SAP <marcel.lauhoff@sap.com> (cherry picked from commit 1e6e393)
Expose the Keystone token user UUID as condition key "keystone:userid" so IAM and bucket policies can restrict access by user (e.g. per-user buckets or user-specific allow/deny). On-behalf-of: SAP <supriti.singh@clyso.com> Signed-off-by: Supriti Singh <supriti.singh@clyso.com> (cherry picked from commit b06b7a8)
Signed-off-by: Supriti Singh <supriti.singh@clyso.com>
a46fad6 to
998123c
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Keystone documentation presents an unsafe NotEquals use case, and additional documentation and naming corrections remain.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (3)
What changed in this PR
This backport adds Keystone role and user-ID condition support to RGW IAM policies, with tests, documentation, and provenance metadata.
Changes:
- Propagates Keystone identity attributes through authentication and policy evaluation.
- Adds IAM condition tests.
- Documents supported condition keys and backport limitations.
| File | Summary |
|---|---|
src/test/rgw/test_rgw_iam_policy.cc |
Adds Keystone IAM condition tests. |
src/rgw/rgw_auth.h |
Stores Keystone identity data. |
src/rgw/rgw_auth.cc |
Injects identity data into policy environments. |
src/rgw/rgw_auth_keystone.cc |
Extracts roles and user IDs from tokens. |
release-management/backports/01a0cdb3-3f84-74ab-9403-c7638a039697.md |
Records backport provenance and limitations. |
doc/radosgw/keystone.rst |
Documents Keystone condition keys and usage. |
doc/radosgw/bucketpolicy.rst |
Lists supported condition keys. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Upstream fixed the NotEquals operators in 225241d (ceph#65606), which is not on squid. Without it they return wrong results when keystone:role holds several values, which is the normal case. That fix is not included here: it changes evaluation of every condition key, so it needs its own backport and review. The upstream squid backport is ceph#67213. Until one of those lands, document StringEquals only and warn against the NotEquals variants. Signed-off-by: Supriti Singh <supriti.singh@clyso.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Moderate spelling/consistency findings and a documentation grammar nit remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 3


Closes cobaltcore-dev/cloud-storage#466
Closes cobaltcore-dev/cloud-storage#467
Backport file
release-management/backports/<uuid>.mdadded (or updated) by this PRidin frontmatter matches the filename stemprovenance.upstream_prsset (orprovenance.type: otherwith another:block)Stage-B risk (filled per
release-management/backports/RISK-RUBRIC.md)blast— cosmeticconflict— substantivecoverage— partialhighband)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-Idtrailer.