.. _User Management - Add a User to a Keyring: ../../rados/operations/user-management/#add-a-user-to-a-keyring
+
+Network restriction
+===================
+
+::
+
+ client.foo
+ key: *key*
+ caps: [mds] allow r network 10.0.0.0/8, allow rw path=/bar network 10.0.0.0/8
+ caps: [mon] allow r network 10.0.0.0/8
+ caps: [osd] allow rw tag cephfs data=cephfs_a network 10.0.0.0/8
+
+The optional ``{network/prefix}`` is a standard network name and
+prefix length in CIDR notation (e.g., ``10.3.0.0/16``). If present,
+the use of this capability is restricted to clients connecting from
+this network.
- **Monitor Caps:** Monitor capabilities include ``r``, ``w``, ``x`` access
settings or ``profile {name}``. For example::
- mon 'allow {access-spec}'
+ mon 'allow {access-spec} [network {network/prefix}]'
mon 'profile {name}'
* | all | [r][w][x]
+ The optional ``{network/prefix}`` is a standard network name and
+ prefix length in CIDR notation (e.g., ``10.3.0.0/16``). If present,
+ the use of this capability is restricted to clients connecting from
+ this network.
+
- **OSD Caps:** OSD capabilities include ``r``, ``w``, ``x``, ``class-read``,
``class-write`` access settings or ``profile {name}``. Additionally, OSD
capabilities also allow for pool and namespace settings. ::
- osd 'allow {access-spec} [{match-spec}]'
+ osd 'allow {access-spec} [{match-spec}] [network {network/prefix}]'
- osd 'profile {name} [pool={pool-name} [namespace={namespace-name}]]'
+ osd 'profile {name} [pool={pool-name} [namespace={namespace-name}]] [network {network/prefix}]'
The ``{access-spec}`` syntax is either of the following: ::
[namespace={namespace-name}] tag {application} {key}={value}
+ The optional ``{network/prefix}`` is a standard network name and
+ prefix length in CIDR notation (e.g., ``10.3.0.0/16``). If present,
+ the use of this capability is restricted to clients connecting from
+ this network.
+
- **Metadata Server Caps:** For administrators, use ``allow *``. For all
other users, such as CephFS clients, consult :doc:`/cephfs/client-auth`