Skip to content

mon,mgr,osd: Add an rgw cap profile - #70538

Merged
mheler merged 6 commits into
ceph:mainfrom
mheler:wip-cephx-rgw-profile
Aug 25, 2026
Merged

mheler merged 6 commits into
ceph:mainfrom
mheler:wip-cephx-rgw-profile

Conversation

@mheler

@mheler mheler commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Fixes: https://tracker.ceph.com/issues/78672

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.

Comment thread doc/radosgw/frontends.rst Resolved
Comment thread PendingReleaseNotes Resolved
Comment thread PendingReleaseNotes Resolved
@mheler
mheler force-pushed the wip-cephx-rgw-profile branch from 5b7e43b to 31dbd24 Compare July 25, 2026 11:32
@mheler mheler changed the title cephx: add an rgw cap profile cephx: Add an rgw cap profile Jul 25, 2026
@mheler
mheler force-pushed the wip-cephx-rgw-profile branch from 31dbd24 to dff82d9 Compare July 26, 2026 13:59
@mheler
mheler requested a review from a team as a code owner July 26, 2026 13:59
@github-actions github-actions Bot added the nfs label Jul 26, 2026
@mheler
mheler force-pushed the wip-cephx-rgw-profile branch from dff82d9 to c08bf66 Compare July 26, 2026 19:56
@mheler mheler changed the title cephx: Add an rgw cap profile Add an rgw cap profile Jul 26, 2026
@mheler
mheler force-pushed the wip-cephx-rgw-profile branch from c08bf66 to 3ef7280 Compare July 26, 2026 23:55
@mheler mheler changed the title Add an rgw cap profile mon,mgr,osd: Add an rgw cap profile Jul 26, 2026
@mheler
mheler force-pushed the wip-cephx-rgw-profile branch from 3ef7280 to 049b41b Compare July 27, 2026 00:07
@mheler
mheler requested a review from anthonyeleven July 27, 2026 00:08
Comment thread src/pybind/mgr/smb/rgw_auth.py Resolved
Comment thread src/pybind/mgr/smb/rgw_auth.py Resolved
@mheler
mheler force-pushed the wip-cephx-rgw-profile branch from 049b41b to 11bacc4 Compare July 27, 2026 20:59
@mheler
mheler requested review from Sodani and avanthakkar July 27, 2026 21:00

@avanthakkar avanthakkar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from smb side, thanks!

@adamemerson

Copy link
Copy Markdown
Contributor

Please rebase.

@mheler

mheler commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

Please rebase.

@adamemerson I thought I did yesterday 😟

@ljflores

Copy link
Copy Markdown
Member

@ljflores

Copy link
Copy Markdown
Member

jenkins retest this please

@SrinivasaBharath

Copy link
Copy Markdown
Contributor

@mheler Please resolve the merge test errors and feel free to merge the PR. If any retesting is required , please let me know.

@adamemerson

Copy link
Copy Markdown
Contributor

I think you might need to rebase again to get rid of the QA Link failure.

mheler added 6 commits August 24, 2026 14:09
rgw keys have been created with mon 'allow rw' and osd 'allow rwx', far
more than the daemon uses. profile rgw grants read on the mon and pg
services, read and write on the osd service, the 'log' command that
carries cluster log warnings, and config-key get under rgw/ on the mon;
rwx on rgw-tagged pools on the osd; and nothing on the mgr. keys take it
as mon 'profile rgw' osd 'profile rgw'. bootstrap-rgw only accepts the
profile.

the osd grant stays service-wide rather than a list of commands because
Rados::pool_create() reaches the mon as MPoolOp, which is checked with
no command name. so it also covers the rest of the osd service's write
commands.

Signed-off-by: Matthew N. Heler <[email protected]>
document profile rgw and move the rgw keyring examples onto the profile.

a gateway using it can only read config-key under the rgw/ prefix, so
say that where ssl_certificate and ssl_private_key describe config://.

Signed-off-by: Matthew N. Heler <[email protected]>
parse and grant checks for profile rgw in the mon, osd, and mgr cap
tests: config-key stops at the rgw/ prefix, osd rwx stops at rgw-tagged
pools with pool narrowing honored, and the mgr form parses as a no-op.

Signed-off-by: Matthew N. Heler <[email protected]>
dev clusters exercise the profile instead of blanket rw caps.

Signed-off-by: Matthew N. Heler <[email protected]>
replace mon 'allow *', mgr 'allow rw', osd 'allow rwx tag rgw *=*' with
the rgw profile, once require_osd_release says every mon and osd can
read it. until then keys keep the old caps. existing keys pick the
profile up through auth caps the next time the daemon is redeployed.

nfs embeds librgw, so its rgw key takes the same osd profile behind the
same gate. its mon cap stays 'allow r'.

Signed-off-by: Matthew N. Heler <[email protected]>
Replace mon 'allow *' and the osd tag cap with the rgw profile. The
profile covers pool creation on first write, which is what the mon cap
was there for.

auth get-or-create refuses an entity that already exists with different
caps, so fall back to auth caps. Anything created before this carries
the old caps and would error on the next apply.

Signed-off-by: Matthew N. Heler <[email protected]>
@mheler
mheler force-pushed the wip-cephx-rgw-profile branch from 666c3ec to 853cdfa Compare August 24, 2026 19:09
@mheler
mheler merged commit b94ddaa into ceph:main Aug 25, 2026
7 checks passed
Greenpepper15 added a commit to Greenpepper15/rook that referenced this pull request Aug 31, 2026
The motivation bullet asserted that namespace-scoped cephx users achieve
realm separation without naming the mon side, and a bare mon 'allow rw'
undermines the separation. The claim now requires the profile rgw mon
cap profile (ceph/ceph#70538) and gives the cleartext system_key in the
zone record as an example of the confidentiality gap the scoped setup
closes. The Non-Goals access-control bullet is aligned with the same
wording.

Addresses rook#18091 (comment)

Signed-off-by: David Mohren <[email protected]>
Greenpepper15 added a commit to Greenpepper15/rook that referenced this pull request Aug 31, 2026
The motivation bullet asserted that namespace-scoped cephx users achieve
realm separation without naming the mon side, and a bare mon 'allow rw'
undermines the separation. The claim now requires the profile rgw mon
cap profile from ceph/ceph#70538 and gives the
cleartext system_key in the zone record as an example of the
confidentiality gap the scoped setup closes. The Non-Goals
access-control bullet is aligned with the same wording.

Addresses rook#18091 (comment)

Signed-off-by: David Mohren <[email protected]>
Greenpepper15 added a commit to Greenpepper15/rook that referenced this pull request Aug 31, 2026
The motivation bullet asserted that namespace-scoped cephx users achieve
realm separation without naming the mon side, and a bare mon 'allow rw'
undermines the separation. The claim now requires the profile rgw mon
cap profile from ceph/ceph#70538 and gives the
cleartext system_key in the zone record as an example of the
confidentiality gap the scoped setup closes. The Non-Goals
access-control bullet is aligned with the same wording.

Addresses rook#18091 (comment)

Signed-off-by: David Mohren <[email protected]>
@rkachach
rkachach requested a review from adk3798 September 10, 2026 11:39
Greenpepper15 added a commit to Greenpepper15/rook that referenced this pull request Nov 9, 2026
The motivation bullet asserted that namespace-scoped cephx users achieve
realm separation without naming the mon side, and a bare mon 'allow rw'
undermines the separation. The claim now requires the profile rgw mon
cap profile from ceph/ceph#70538 and gives the
cleartext system_key in the zone record as an example of the
confidentiality gap the scoped setup closes. The Non-Goals
access-control bullet is aligned with the same wording.

Addresses rook#18091 (comment)

Signed-off-by: David Mohren <[email protected]>
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.

10 participants