Skip to content

rgw: Inject keystone roles into IAM policy - #67752

Merged
anrao19 merged 2 commits into
ceph:mainfrom
supriti:wip-s3-policy-keystone-role
May 18, 2026
Merged

anrao19 merged 2 commits into
ceph:mainfrom
supriti:wip-s3-policy-keystone-role

Conversation

@supriti

@supriti supriti commented Mar 12, 2026 •

Copy link
Copy Markdown
Contributor

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.

On-behalf-of: SAP [email protected]
On-behalf-of: SAP [email protected]

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@supriti
supriti requested a review from a team as a code owner March 12, 2026 09:46
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not yet a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

13 similar comments
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not yet a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not yet a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not yet a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not yet a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not yet a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not yet a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not yet a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not yet a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not yet a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not yet a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not yet a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not yet a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not yet a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@github-actions

Copy link
Copy Markdown

Config Diff Tool Output

+ added: rgw_keystone_inject_roles (rgw.yaml.in)

The above configuration changes are found in the PR. Please update the relevant release documentation if necessary.
Ignore this comment if docs are already updated. To make the "Check ceph config changes" CI check pass, please comment /config check ok and re-run the test.

@supriti

supriti commented Mar 12, 2026

Copy link
Copy Markdown
Contributor Author

/config check ok

Comment thread src/rgw/rgw_auth.cc Resolved
@cbodley
cbodley requested a review from tobias-urdin March 12, 2026 16:46
@supriti
supriti force-pushed the wip-s3-policy-keystone-role branch from 7cc64ea to 38dbacf Compare March 13, 2026 12:47
@cbodley

cbodley commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

code changes look great, thanks. i'd like to mention this support in the docs too. there's a section that talks about which s3 condition keys we support under https://docs.ceph.com/en/latest/radosgw/bucketpolicy/#limitations

For all requests, condition keys we support are:

  • aws:CurrentTime
    ...

could you add another sentence below that along the lines of:

Requests that authenticate with Keystone also include:

  • keystone:role

the keystone docs also have a section about s3 in https://docs.ceph.com/en/latest/radosgw/keystone/#keystone-integration-with-the-s3-api which might mention this

@supriti
supriti force-pushed the wip-s3-policy-keystone-role branch from 38dbacf to 5252453 Compare March 13, 2026 16:23
@supriti
supriti requested a review from a team as a code owner March 13, 2026 16:23
@cbodley cbodley removed the needs-doc label Mar 13, 2026
@cbodley cbodley removed the needs-qa label Mar 18, 2026
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@supriti
supriti force-pushed the wip-s3-policy-keystone-role branch from e70ad1e to a7a9cf5 Compare March 19, 2026 13:17
@supriti

supriti commented Mar 19, 2026

Copy link
Copy Markdown
Contributor Author

I have added new commit introducing keystone:userid.

Comment thread doc/radosgw/keystone.rst Resolved
@supriti
supriti force-pushed the wip-s3-policy-keystone-role branch from a7a9cf5 to ad0b12b Compare March 20, 2026 09:01
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

Comment thread doc/radosgw/keystone.rst Resolved
@anrao19 anrao19 removed the needs-qa label Apr 20, 2026
supriti added 2 commits April 21, 2026 13:40
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 <[email protected]>
Signed-off-by: Marcel Lauhoff <[email protected]>
On-behalf-of: SAP <[email protected]>
On-behalf-of: SAP <[email protected]>
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 <[email protected]>
Signed-off-by: Supriti Singh <[email protected]>
@anrao19

anrao19 commented May 14, 2026

Copy link
Copy Markdown
Contributor

pr testing completed and got approval from @ivancich , tracker details: https://tracker.ceph.com/issues/76554.
@supriti , if no further testing is needed this pr can be merged

@anrao19
anrao19 merged commit 8fb17d5 into ceph:main May 18, 2026
6 checks passed
irq0 added a commit to irq0/ceph that referenced this pull request Jun 4, 2026
Retroactive <uuid>.md for the Keystone scope logging + IAM role
injection backport already landed on this branch as merge commit
c582732.

Backport-Id: 019e92ed-d2cc-7bce-a481-77ca769cfda9
Backport-Merge: c582732
Upstream-PRs: ceph#66111, ceph#67752
uw-sc added a commit to cobaltcore-dev/ceph that referenced this pull request Sep 24, 2026
Backport-Id: 01a0cdb3-3f84-74ab-9403-c7638a039697
Backport-PR: #16
Upstream-PRs: ceph#67752
uw-sc added a commit to cobaltcore-dev/ceph that referenced this pull request Oct 14, 2026
Backport-Id: 01a0cdb3-3f84-74ab-9403-c7638a039697
Backport-PR: #16
Upstream-PRs: ceph#67752
uw-sc added a commit to cobaltcore-dev/ceph that referenced this pull request Oct 16, 2026
Backport-Id: 01a143b6-5653-75f3-b580-de1436c92efd
Backport-PR: #31
Upstream-PRs: ceph#67752
s0nea added a commit to cobaltcore-dev/ceph that referenced this pull request Nov 4, 2026
Backport-Id: 01a16411-8df8-7e1f-baaf-8aa40a09ecdd
Backport-PR: #41
Upstream-PRs: ceph#67752
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants