Skip to content

[DNM] mon, cephfs: Add auth caps for CephFS fsids - #26855

Closed
fullerdj wants to merge 5 commits into
ceph:masterfrom
fullerdj:wip-djf-15070
Closed

fullerdj wants to merge 5 commits into
ceph:masterfrom
fullerdj:wip-djf-15070

Conversation

@fullerdj

@fullerdj fullerdj commented Mar 8, 2019

Copy link
Copy Markdown
Contributor

Add new mon and mds auth caps to restrict access based on fsid.

DNM for now because there is no test yet.

Comment thread PendingReleaseNotes Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Like mds allow rw fsid=1?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This implementation doesn't have a read-only variant. If you're restricted by fsid, the mds will drop all messages for unauthorized fsids. Do we want a read-only variant?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This implementation doesn't have a read-only variant.

I think I was wondering if mds allow r fsid=1 would be allowed. That is, read-only MDS access although I'm not sure who uses that in practice; would that imply a read-only mount?

Comment thread PendingReleaseNotes Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

IIRC, the caps are additive. Wouldn't allow rw provide access to all MDSMaps?

Comment thread doc/cephfs/client-auth.rst Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess we also need to extend these OSDCaps to take an FSCID. Not urgent though.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Well, the OSD does not know the fscid. We could tag the pools with it, though.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The pools tags are good enough now I think. I don't believe we want to move forward anymore with shared data pools. The feature is no longer attractive with the pg_autoscaler.

Comment thread src/mon/Monitor.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: const auto& fsmap would be better.

Comment thread src/mon/Monitor.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

then just: FSMap map = fsmap.

Comment thread doc/cephfs/client-auth.rst Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ditto. the first allow r applies to all fsids. the fsid= has to be a property of each allow to restrict it.

@batrick

batrick commented Apr 5, 2019

Copy link
Copy Markdown
Member

ping @fullerdj

@fullerdj

fullerdj commented Apr 5, 2019

Copy link
Copy Markdown
Contributor Author

ack, @batrick . I should be able to get back on this next week.

sebastian-philipp and others added 2 commits May 9, 2019 16:06
Now, progress events are part of `WriteCompletion` istead of part of the orchestrator module.

It does not yet provide a way to just show orchestrator events.

Also fixes issue in the SSH orchestrator

Signed-off-by: Sebastian Wagner <[email protected]>
The previous link was to version 2, which is a bit older. Fix to version 3.

Signed-off-by: Yaniv Kaul <[email protected]>
Douglas Fuller added 3 commits May 10, 2019 10:35
Add a 'fsid' clause to mon auth caps to restrict a client's view
of the FSMap. Example:

mon 'allow rw; allow fsid 2'

This would restrict the client's view of the FSMap to the MDSMap for
fscid 2. Any MDS allocated to a different filesystem will be invisible.
Global standby daemons are always visible. To allow multiple fscids, add
multiple caps:

mon 'allow rw; allow fsid 2; allow fsid 3'

Fixes: http://tracker.ceph.com/issues/15070
Signed-off-by: Douglas Fuller <[email protected]>
Modify MMDSMap to include the global ID of the Filesystem from
the FSMap when bringing up a new MDS. Store the ID in the MDSRank
structure for use in security validation.

Fixes: http://tracker.ceph.com/issues/15070
Signed-off-by: Douglas Fuller <[email protected]>
Add new auth caps to restrict access to clients based on fsid. To specify
this, for example:

mds 'allow fsid=1'

This will restrict client access to fsid 1 only. Messages to active MDS
assigned to any other FSMap will be dropped. Standby MDS not associated
with an FSMap will accept messages from clients so restricted.

Fixes: http://tracker.ceph.com/issues/15070
Signed-off-by: Douglas Fuller <[email protected]>
@stale

stale Bot commented Jul 9, 2019

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@stale stale Bot added the stale label Jul 9, 2019
@batrick batrick removed the stale label Jul 10, 2019
@stale

stale Bot commented Sep 7, 2019

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@stale stale Bot added the stale label Sep 7, 2019
@stale stale Bot removed the stale label Sep 14, 2019
@stale

stale Bot commented Nov 13, 2019

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@stale stale Bot added stale and removed stale labels Nov 13, 2019
@stale

stale Bot commented Jan 13, 2020

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@stale stale Bot added the stale label Jan 13, 2020
@fullerdj

Copy link
Copy Markdown
Contributor Author

closed in favor of #32581

@fullerdj fullerdj closed this Jan 13, 2020
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.

4 participants