CEPH-AUTHTOOL(8)
๐ CEPH-AUTHTOOL ๐
okay bestie, gather round โ this is the manual for ceph-authtool, and it lives in section 8 of the manual (CEPH-AUTHTOOL(8)), part of Ceph. It's your little keyring bestie, and yes we're gonna go through literally every single flag together. no skipping. ๐
โจ NAME โจ
ceph-authtool โ ceph keyring manipulation tool ๐
๐ธ SYNOPSIS ๐ธ
ceph-authtool keyringfile
[ -l | --list ]
[ -p | --print-key ]
[ -C | --create-keyring ]
[ -g | --gen-key ]
[ --gen-print-key ]
[ --import-keyring otherkeyringfile ]
[ -n | --name entityname ]
[ -a | --add-key base64_key ]
[ -t | --key-type KEY_TYPE ]
[ --cap subsystem capability ]
[ --caps capfile ]
[ --mode mode ]
๐ฆ DESCRIPTION ๐ฆ
ceph-authtool is the utility you use to create, view, and modify a Ceph keyring file. A keyring file stores one or more Ceph authentication keys, and possibly an associated capability specification too. Each key is tied to an entity name, and that name is shaped like {client,mon,mds,osd}.name. ๐ซถ
WARNING โ ๏ธ Ceph provides authentication and protection against man-in-the-middle attacks once secret keys are in place. However, data over the wire is not encrypted โ and that may include the messages used to configure said keys. The system is primarily intended to be used in trusted environments. no cap, keep it in a place you trust. ๐ฅ
๐ OPTIONS ๐
-l,--listโ will list all keys and capabilities present in the keyring โจ-p,--print-keyโ will print an encoded key for the specifiedentityname. This is suitable for themount -o secret=argument ๐-C,--create-keyringโ will create a new keyring, overwriting any existingkeyringfile๐ญ (yes, it eats the old one, be warned)-g,--gen-keyโ will generate a new secret key for the specifiedentityname๐--gen-print-keyโ will generate a new secret key for the specifiedentityname, without altering thekeyringfile, printing the secret to stdout ๐ข--import-keyringsecondkeyringfileโ will import the content of a given keyring to thekeyringfile๐ง-n,--namenameโ specifyentitynameto operate on ๐ท๏ธ-a,--add-keybase64_keyโ will add an encoded key to the keyring ๐--capsubsystemcapabilityโ will set the capability for given subsystem ๐--capscapsfileโ will set all of capabilities associated with a given key, for all subsystems ๐--modemodeโ will set the desired file mode to the keyring, e.g:0644, defaults to0600๐ก๏ธ--key-typeKEY_TYPEโ Set the key-type for generated keys. Can be one of"aes","aes256k", or"preferred"(Ceph operator chosen default). Defaults to"preferred". โญ
๐ CAPABILITIES ๐
The subsystem is the name of a Ceph subsystem: mon, mds, or osd. ๐
The capability is a string describing what the given user is allowed to do. It takes the form of a comma separated list of allow clauses, with a permission specifier containing one or more of rwx for read, write, and execute permission. The allow * grants full superuser permissions for the given subsystem. ๐ (full send, basically)
For example:
# can read, write, and execute objects
osd = "allow rwx"
# can access mds server
mds = "allow"
# can modify cluster state (i.e., is a server daemon)
mon = "allow rwx"
A librados user restricted to a single pool might look like:
mon = "allow r"
osd = "allow rw pool foo"
A client using rbd with read access to one pool and read/write access to another:
mon = "allow r"
osd = "allow class-read object_prefix rbd_children, allow pool templates r class-read, allow pool vms rwx"
A client mounting the file system with minimal permissions would need caps like:
mds = "allow"
osd = "allow rw pool data"
mon = "allow r"
๐ OSD CAPABILITIES ๐
In general, an osd capability follows the grammar:
osdcap := grant[,grant...]
grant := allow (match capspec | capspec match)
match := [ pool[=]<poolname> | object_prefix <prefix>
| namespace[=]<rados-namespace>
| tag <application-name> <key>=<value> ]
capspec := * | [r][w][x] [class-read] [class-write]
The capspec determines what kind of operations the entity can perform:
r = read access to objects
w = write access to objects
x = can call any class method (same as class-read class-write)
class-read = can call class methods that are reads
class-write = can call class methods that are writes
* or "all" = equivalent to rwx, plus the ability to run osd admin commands,
i.e. ceph osd tell ...
The match criteria restrict a grant based on the pool being accessed. Grants are additive if the client fulfills the match condition. For example, if a client has the osd capabilities: "allow r object_prefix prefix, allow w pool foo, allow x pool bar", then it has rw access to pool foo, rx access to pool bar, and r access to objects whose names begin with 'prefix' in any pool. math is mathin', the permissions just stack ๐งฎโจ
๐ CAPS FILE FORMAT ๐
The caps file format consists of zero or more key/value pairs, one per line. The key and value are separated by an =, and the value must be quoted (with ' or ") if it contains any whitespace. The key is the name of the Ceph subsystem (osd, mds, mon), and the value is the capability string (see above). ๐
โญ EXAMPLE โญ
To create a new keyring containing a key for client.foo with a 0644 file mode:
ceph-authtool -C -n client.foo --gen-key keyring --mode 0644
To associate some capabilities with the key (namely, the ability to mount a Ceph file system):
ceph-authtool -n client.foo --cap mds 'allow' --cap osd 'allow rw pool=data' --cap mon 'allow r' keyring
To display the contents of the keyring:
ceph-authtool -l keyring
When mounting a Ceph file system, you can grab the appropriately encoded secret key with:
mount -t ceph serverhost:/ mountpoint -o name=foo,secret=`ceph-authtool -p -n client.foo keyring`
๐ AVAILABILITY ๐
ceph-authtool is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to the Ceph documentation at <https://docs.ceph.com> for more information. ๐
๐ญ SEE ALSO ๐ญ
ceph <>(8)
๐ Copyright ๐
2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)
and that's the whole thing, bestie!! ๐ซถ this page came to you from dev, dated Oct 06, 2026 โ go forth and manage those keyrings, you absolute icon ๐โจ periodt ๐
๐ฆ where this page comes from
- ubuntu stonking: ceph-common 20.2.4+ds1-0ubuntu1 ยท LGPL2.1 (see COPYING-LGPL2.1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms