Commit Graph

23 Commits

Author SHA1 Message Date
Patrick Donnelly
0376ce721a
doc: add documentation for new multifs feature
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-12-15 06:46:49 -08:00
Ramana Raja
e1c5220780 mds: add root_squash mode in MDS auth caps
Implement a root_squash mode in MDS auth caps to deny operations for
clients with uid=0 or gid=0 that need write access. It's mainly to
prevent operations such as accidental `sudo rm -rf /path`.

The root squash mode can be enforced in one of the following ways in
the MDS caps,
  'allow rw root_squash'
  (across file systems)
          or
  'allow rw fsname=a root_squash'
  (on a file system)
          or
  'allow rw fsname=a path=/vol/group/subvol00 root_squash'
  (on a file system path)

Fixes: https://tracker.ceph.com/issues/42451
Signed-off-by: Ramana Raja <rraja@redhat.com>
2020-09-25 14:34:35 +05:30
Rishabh Dave
8301c44c70 doc/cephfs: add minor fixes for client-auth doc
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-10 17:10:51 +05:30
Douglas Fuller
91d5715be6 cephfs: add auth caps based on fs names
Add new auth caps to restrict access to clients based on fsnames. To
specify this, for example:

mds 'allow rw fsname=cephfs1'

This will restrict client access to fs name "cephfs1" 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. To allow
multiple file systems, create MDS cap as follows -

mds 'allow rw fsname=cephfs1, allow rw fsname=cephfs2'

Fixes: http://tracker.ceph.com/issues/15070
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-10 17:10:51 +05:30
Douglas Fuller
811e48d6ff mon/MDSMonitor: add mon auth caps for CephFS names
Add a 'fsname' clause to mon auth caps to restrict a client's view
of the FSMap. Example:

mon 'allow rw fsname=cephfs2'

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

mon 'allow rw fsname=cephfs2, allow rw fsname=cephfs2'

Fixes: http://tracker.ceph.com/issues/15070
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-10 17:10:51 +05:30
Ilya Dryomov
267c00012a doc/cephfs/client-auth: description and example are inconsistent
According to the path restriction example, the filesystem name
should be cephfs_a, not cephfs.  Converge on cephfs_a to avoid it
being confused with with the pool tag, which is always cephfs.

This was introduced in 160c4bfeb8 ("mon/AuthMonitor: Use new osd
auth caps for ceph fs authorize").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2020-01-21 19:57:09 +01:00
Varsha Rao
1b5ce8e779 doc: Update requirements for using CephFS
Fixes: https://tracker.ceph.com/issues/41470
Signed-off-by: Varsha Rao <varao@redhat.com>
2019-10-03 13:12:32 +05:30
Patrick Donnelly
e7a7cf429e
doc: filesystem to file system
"Filesystem" is not a word (although fairly common in use).

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-09-10 08:43:28 -07:00
Servesha Dudhgaonkar
2808373129 doc : fixed capitalization
Signed-off-by: Servesha Dudhgaonkar <sdudhgao@redhat.com>
2019-04-04 19:09:38 +05:30
Kefu Chai
5ee1fd2c32 doc: fix typos
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-09-21 12:41:42 +08:00
Sage Weil
d7596a74e1 doc/rados/operations/user-management: document 'network' clause of moncap and osdcap
Signed-off-by: Sage Weil <sage@redhat.com>
2018-08-12 17:03:20 -05:00
Yan, Zheng
0bb08cf307 mds: add MAY_SNAPSHOT in MDSAuthCaps
For controlling whether a client is allowed to create or delete
snapshots

Fixes: http://tracker.ceph.com/issues/24284
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2018-06-19 17:08:39 +08:00
Douglas Fuller
9c694ffc7e cephfs, mon/AuthMonitor, OSD/osdcap: make 'all' a synonym for '*'
Define the string 'all' to be a synonym for the wildcard '*'. This
avoids confusion in the event that some auth caps (typically with
ceph fs authorize) are not quoted and thus '*' is expanded by the shell.

Signed-off-by: Douglas Fuller <dfuller@redhat.com>
2017-11-14 10:48:23 -05:00
Douglas Fuller
160c4bfeb8 mon/AuthMonitor: Use new osd auth caps for ceph fs authorize
Change 'ceph fs authorize' to grant osd auth caps by pool tag
instead of to current data pools. This makes:

ceph fs authorize cephfs_a client.foo /bar rw

now equivalent to:

ceph auth get-or-create client.foo mon 'allow r' mds 'allow rw path=/bar' osd 'allow rw tag cephfs data=cephfs_a'

Signed-off-by: Douglas Fuller <dfuller@redhat.com>
2017-10-25 15:34:13 -04:00
Douglas Fuller
f249e3d2d5 doc/cephfs: Document ceph auth fs
Change the CephFS auth caps documentation to reflect the new ceph auth
fs command.

Signed-off-by: Douglas Fuller <dfuller@redhat.com>
2017-08-04 11:10:07 -04:00
John Spray
f788686d5c mds: extend 'p' auth cap to cover all vxattr stuff
Fixes: http://tracker.ceph.com/issues/19075
Signed-off-by: John Spray <john.spray@redhat.com>
2017-03-08 14:02:57 +00:00
Drunkard Zhang
f763bacab3 doc: hyperlink fix
Signed-off-by: Drunkard Zhang <gongfan193@gmail.com>
2017-03-01 09:51:01 +08:00
John Spray
936bab6d59 doc: clarify the path restriction mds cap example
It's not obvious as written that the example was
only restricting writes to a path, not reads.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-01-19 06:23:42 +01:00
David Disseldorp
f00546fee0 doc/cephfs: add note about deletion from OSD restricted pool
As described in http://tracker.ceph.com/issues/17937, a client with
restricted pool access can still delete files unless a corresponding
MDS path restriction is also in place.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2016-11-17 20:45:57 +01:00
huanwen ren
d1277f116c doc/mds: add generated files into the /etc/ceph/
Fixes: 16906

Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
2016-08-04 20:14:18 +08:00
John Spray
b6d2b6d1a5 client: report root's quota in statfs
When user is mounted a quota-restricted inode
as the root, report that inode's quota status
as the filesystem statistics in statfs.

This allows us to have a fairly convincing illusion
that someone has a filesystem to themselves, when
they're really mounting a restricted part of
the larger global filesystem.

Fixes: http://tracker.ceph.com/issues/15599
Signed-off-by: John Spray <john.spray@redhat.com>
2016-05-17 13:08:13 +01:00
John Spray
1b6a7e3600 doc: note that cephfs auth stuff is new in jewel
+ bonus whitespace fixes to the code blocks to
get them to render properly

Signed-off-by: John Spray <john.spray@redhat.com>
2015-12-08 14:10:18 +00:00
John Spray
2829e9dc78 doc: flesh out MDS auth docs
...including updating for 'rwp'.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-11-13 14:18:44 +00:00