Repository navigation
Conversation
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 bucket 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>
There was a problem hiding this comment.
🟡 Changes recommended
Public authorization guidance needs role-normalization and owner-access caveats to prevent policies from silently failing to restrict access.
2 open issues
What changed in this PR
This backport adds Keystone role and user ID condition keys to RGW’s IAM policy environment, enabling policies to distinguish Keystone-authenticated requests by role or user.
Changes:
- Carry role names and user IDs through both Keystone authentication engines into request policy evaluation.
- Add condition-evaluation and policy-parsing tests.
- Document the new keys and record backport provenance, risk, and validation results.
| File | Description |
|---|---|
src/test/rgw/test_rgw_iam_policy.cc |
Adds role matching, parsing, and user ID tests. |
src/rgw/rgw_auth.h |
Adds Keystone roles and user ID to authentication information. |
src/rgw/rgw_auth.cc |
Populates policy keys and lowercases role names. |
src/rgw/rgw_auth_keystone.cc |
Extracts roles and user IDs from Keystone tokens. |
release-management/backports/01a16411-8df8-7e1f-baaf-8aa40a09ecdd.md |
Records backport metadata, validation, and behavior notes. |
doc/radosgw/keystone.rst |
Introduces Keystone-specific policy conditions. |
doc/radosgw/bucketpolicy.rst |
Lists the new supported condition keys. |
Review effort: Balanced
Author
|
I am not taking copilot suggestions as it will deviate the backport from approved PR from main. |
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#565
Closes cobaltcore-dev/cloud-storage#566
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— cosmetic / availability / data-lossconflict— clean / trivial / substantivecoverage— strong / partial / weakhighband)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.