Repository navigation
Backport/tentacle 20.2.4 cobaltcore storage/keystone iam policy #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
s0nea
merged 4 commits into
tentacle-20.2.4-cobaltcore-storage
from
backport/tentacle-20.2.4-cobaltcore-storage/keystone-iam-policy
Nov 4, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
80 changes: 80 additions & 0 deletions
80
release-management/backports/01a16411-8df8-7e1f-baaf-8aa40a09ecdd.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| --- | ||
| id: 01a16411-8df8-7e1f-baaf-8aa40a09ecdd | ||
| title: 'IAM / Bucket Policy: Keystone role and user ID support' | ||
| component: rgw | ||
| category: feature | ||
| provenance: | ||
| type: upstream_pr | ||
| upstream_prs: | ||
| - https://github.com/ceph/ceph/pull/67752 | ||
| upstream_pr_state: merged-main | ||
| upstream_commits: | ||
| - b06b7a82ed1a5c57dce8b9ce2fa0931fe0f55ff7 | ||
| previous_backport: 01a0cdb3-3f84-74ab-9403-c7638a039697 | ||
| justification: | ||
| type: customer | ||
| refs: | ||
| - cobaltcore-dev/cloud-storage#566 | ||
| - cobaltcore-dev/cloud-storage#565 | ||
| - cobaltcore-dev/cloud-storage#380 | ||
| - cobaltcore-dev/cloud-storage#372 | ||
| risk: | ||
| blast: cosmetic | ||
| conflict: trivial | ||
| coverage: strong | ||
| --- | ||
|
|
||
| ## Justification (public) | ||
|
|
||
| Allows Keystone role names and user IDs to be injected as `keystone:role` and | ||
| `keystone:userid` condition keys in S3 bucket policies, enabling role-based and | ||
| per-user access control via standard IAM policy conditions. | ||
|
|
||
| ## Justification (internal) | ||
|
|
||
| Improves keystone authorization features. | ||
|
|
||
| ## Risk notes | ||
|
|
||
| **blast: cosmetic** — purely additive. Two new condition keys are populated for | ||
| Keystone-authenticated requests. No existing condition key, policy or auth path | ||
| changes meaning, and non-Keystone requests are untouched. | ||
|
|
||
| **conflict: trivial** | ||
|
|
||
| **coverage: strong** — | ||
| 47/47 unit tests pass in `unittest_rgw_iam_policy`. | ||
| 14/14 live checks pass against vstart RGW and a real Keystone, with two | ||
| multi-role users in one project: `keystone:role` matching (single value, | ||
| multi-value, shared role, absent role), case handling (`StringEquals` is | ||
| case-sensitive, `StringEqualsIgnoreCase` is not), `keystone:userid` matching per | ||
| user, `StringLike` wildcards, and three `StringNotEquals` cases that confirm the | ||
| AND semantics with multiple roles. | ||
| 7/7 live grant checks pass with non-owner users from a second project: `Allow` | ||
| on `keystone:role` or `keystone:userid` grants exactly the listed read, list, | ||
| write and delete actions, users without the role or ID get nothing, and `Deny` | ||
| overrides `Allow`. | ||
|
|
||
| ## Behavior change | ||
|
|
||
| Requests authenticated via Keystone now expose two additional IAM policy | ||
| condition keys: `keystone:role` (one entry per role, lowercased) and | ||
| `keystone:userid` (the Keystone user UUID). Requests not authenticated via | ||
| Keystone are unchanged, and no existing policy changes behaviour. | ||
|
|
||
| ### Two points for policy authors | ||
|
|
||
| Role names in policies are case-sensitive. Roles are lowercased on the way into | ||
| the policy environment, so how the role is spelled in Keystone does not matter, | ||
| but the value typed in the policy is compared exactly. A policy containing | ||
| `"TestRole"` never matches and gives no warning. Write role names in lower case, | ||
| or use `StringEqualsIgnoreCase`. | ||
|
|
||
| Rules that distinguish between users of the same project must be written as | ||
| `Deny`. All users in an OpenStack project share a single RGW account, so each is | ||
| an owner of buckets created there, and owners are not restricted by `Allow` | ||
| conditions. `Deny` statements do apply to owners and discriminate correctly. | ||
|
|
||
| ## Upgrade notes | ||
|
|
||
| None. |
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.