Skip to content

Commit 3a53726

Browse files
authored
Merge pull request ceph#56784 from zdover23/wip-doc-2024-04-09-cephfs-client-auth-2-of-3
doc/cephfs: refine client-auth (2 of 3) Reviewed-by: Cole Mitchell <[email protected]>
2 parents e107637 + 083f563 commit 3a53726

File tree

1 file changed

+49
-29
lines changed

1 file changed

+49
-29
lines changed

doc/cephfs/client-auth.rst

Lines changed: 49 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ value of this setting.
110110
Layout and Quota restriction (the 'p' flag)
111111
===========================================
112112

113-
To set layouts or quotas, clients require the 'p' flag in addition to 'rw'.
114-
This restricts all the attributes that are set by special extended attributes
115-
with a "ceph." prefix, as well as restricting other means of setting
116-
these fields (such as openc operations with layouts).
113+
To set layouts or quotas, clients require the ``p`` flag in addition to ``rw``.
114+
Using the ``p`` flag with ``rw`` restricts all the attributes that are set by
115+
special extended attributes by using a ``ceph.`` prefix, and restricts
116+
other means of setting these fields (such as ``openc`` operations with layouts).
117117

118-
For example, in the following snippet client.0 can modify layouts and quotas
119-
on the file system cephfs_a, but client.1 cannot::
118+
For example, in the following snippet ``client.0`` can modify layouts and
119+
quotas on the file system ``cephfs_a``, but ``client.1`` cannot::
120120

121121
client.0
122122
key: AQAz7EVWygILFRAAdIcuJ12opU/JKyfFmxhuaw==
@@ -134,12 +134,12 @@ on the file system cephfs_a, but client.1 cannot::
134134
Snapshot restriction (the 's' flag)
135135
===========================================
136136

137-
To create or delete snapshots, clients require the 's' flag in addition to
138-
'rw'. Note that when capability string also contains the 'p' flag, the 's'
139-
flag must appear after it (all flags except 'rw' must be specified in
137+
To create or delete snapshots, clients require the ``s`` flag in addition to
138+
``rw``. Note that when capability string also contains the ``p`` flag, the
139+
``s`` flag must appear after it (all flags except ``rw`` must be specified in
140140
alphabetical order).
141141

142-
For example, in the following snippet client.0 can create or delete snapshots
142+
For example, in the following snippet ``client.0`` can create or delete snapshots
143143
in the ``bar`` directory of file system ``cephfs_a``::
144144

145145
client.0
@@ -162,48 +162,68 @@ Network restriction
162162
caps: [mon] allow r network 10.0.0.0/8
163163
caps: [osd] allow rw tag cephfs data=cephfs_a network 10.0.0.0/8
164164

165-
The optional ``{network/prefix}`` is a standard network name and
166-
prefix length in CIDR notation (e.g., ``10.3.0.0/16``). If present,
167-
the use of this capability is restricted to clients connecting from
165+
The optional ``{network/prefix}`` is a standard network-name-and-prefix length
166+
in CIDR notation (for example, ``10.3.0.0/16``). If ``{network/prefix}}`` is
167+
present, the use of this capability is restricted to clients connecting from
168168
this network.
169169

170170
.. _fs-authorize-multifs:
171171

172172
File system Information Restriction
173173
===================================
174174

175-
If desired, the monitor cluster can present a limited view of the file systems
176-
available. In this case, the monitor cluster will only inform clients about
177-
file systems specified by the administrator. Other file systems will not be
178-
reported and commands affecting them will fail as if the file systems do
179-
not exist.
175+
The monitor cluster can present a limited view of the available file systems.
176+
In this case, the monitor cluster informs clients only about file systems
177+
specified by the administrator. Other file systems are not reported and
178+
commands affecting them fail as though the file systems do not exist.
180179

181-
Consider following example. The Ceph cluster has 2 FSs::
180+
Consider following example. The Ceph cluster has 2 file systems:
181+
182+
.. prompt:: bash #
183+
184+
ceph fs ls
185+
186+
::
182187

183-
$ ceph fs ls
184188
name: cephfs, metadata pool: cephfs_metadata, data pools: [cephfs_data ]
185189
name: cephfs2, metadata pool: cephfs2_metadata, data pools: [cephfs2_data ]
186190

187-
But we authorize client ``someuser`` for only one FS::
191+
We authorize client ``someuser`` for only one file system:
192+
193+
.. prompt:: bash #
194+
195+
ceph fs authorize cephfs client.someuser / rw
196+
197+
::
188198

189-
$ ceph fs authorize cephfs client.someuser / rw
190199
[client.someuser]
191200
key = AQAmthpf89M+JhAAiHDYQkMiCq3x+J0n9e8REQ==
192-
$ cat ceph.client.someuser.keyring
201+
202+
.. prompt:: bash #
203+
204+
cat ceph.client.someuser.keyring
205+
206+
::
207+
193208
[client.someuser]
194209
key = AQAmthpf89M+JhAAiHDYQkMiCq3x+J0n9e8REQ==
195210
caps mds = "allow rw fsname=cephfs"
196211
caps mon = "allow r fsname=cephfs"
197212
caps osd = "allow rw tag cephfs data=cephfs"
198213

199-
And the client can only see the FS that it has authorization for::
214+
The client can see only the file system that it is authorized to see:
200215

201-
$ ceph fs ls -n client.someuser -k ceph.client.someuser.keyring
202-
name: cephfs, metadata pool: cephfs_metadata, data pools: [cephfs_data ]
216+
.. prompt:: bash #
217+
218+
ceph fs ls -n client.someuser -k ceph.client.someuser.keyring
219+
220+
::
221+
222+
name: cephfs, metadata pool: cephfs_metadata, data pools: [cephfs_data ]
203223

204-
Standby MDS daemons will always be displayed. Note that the information about
205-
restricted MDS daemons and file systems may become available by other means,
206-
such as ``ceph health detail``.
224+
Standby MDS daemons are always displayed. Information about restricted MDS
225+
daemons and file systems may become available by other means, such as by
226+
running ``ceph health detail``.
207227

208228
MDS communication restriction
209229
=============================

0 commit comments

Comments
 (0)