Skip to content

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

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

[DNM] mon, cephfs: Add auth caps for CephFS fsids#26855
fullerdj wants to merge 5 commits intoceph:masterfrom
fullerdj:wip-djf-15070

Conversation

@fullerdj
Copy link
Contributor

@fullerdj fullerdj commented Mar 8, 2019

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

DNM for now because there is no test yet.

clients based on a new auth cap:
[mon] allow rw; allow fsid=1; allow fsid=2
* Communication with MDS daemons may now be restricted using a new auth cap:
[mds] allow fsid=1 No newline at end of file
Copy link
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
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
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?


* The monitor cluster may now withhold filesystem and/or MDS information from
clients based on a new auth cap:
[mon] allow rw; allow fsid=1; allow fsid=2
Copy link
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?

key: AQAz7EVWygILFRAAdIcuJ12opU/JKyfFmxhuaw==
caps: [mds] allow rw, allow fsid=1
caps: [mon] allow r, allow fsid=1
caps: [osd] allow rw tag cephfs data=cephfs_a
Copy link
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
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
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.

}
if (mdsmon()->get_fsmap().filesystem_count() > 0) {
ss << " mds: " << spacing << mdsmon()->get_fsmap() << "\n";
const FSMap *fsmapp = &mdsmon()->get_fsmap();
Copy link
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.

ss << " mds: " << spacing << mdsmon()->get_fsmap() << "\n";
const FSMap *fsmapp = &mdsmon()->get_fsmap();
if (!fsids.empty()) {
FSMap map = *fsmapp;
Copy link
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.


client.0
key: AQAz7EVWygILFRAAdIcuJ12opU/JKyfFmxhuaw==
caps: [mon] allow r, allow fsid=1, allow fsid=2
Copy link
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
Copy link
Member

batrick commented Apr 5, 2019

ping @fullerdj

@fullerdj
Copy link
Contributor Author

fullerdj commented Apr 5, 2019

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 <sebastian.wagner@suse.com>
The previous link was to version 2, which is a bit older. Fix to version 3.

Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
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 <dfuller@redhat.com>
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 <dfuller@redhat.com>
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 <dfuller@redhat.com>
@stale
Copy link

stale bot commented Jul 9, 2019

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
Copy link

stale bot commented Sep 7, 2019

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
Copy link

stale bot commented Nov 13, 2019

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
Copy link

stale bot commented Jan 13, 2020

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
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