Extend ceph fs authorize to accept the * wildcard for the filesystem
name. This will grant access to all data pools associated with CephFS.
Therefore:
ceph fs authorize * client.foo /bar rwp
Is equivalent to:
ceph auth get-or-create client.foo mon "allow r" \
mds "allow rwp path=/foo" \
osd "allow rw tag cephfs data=*"
Note that the wildcard must be escaped from the shell in most cases.
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
}
}
- auto fs = mon->mdsmon()->get_fsmap().get_filesystem(filesystem);
- if (!fs) {
- ss << "filesystem " << filesystem << " does not exist.";
- err = -EINVAL;
- goto done;
+ if (filesystem != "*") {
+ auto fs = mon->mdsmon()->get_fsmap().get_filesystem(filesystem);
+ if (!fs) {
+ ss << "filesystem " << filesystem << " does not exist.";
+ err = -EINVAL;
+ goto done;
+ }
}
osd_cap_string += osd_cap_string.empty()? "" : ", ";