1CEPH-AUTHTOOL(8)                     Ceph                     CEPH-AUTHTOOL(8)
2
3
4

NAME

6       ceph-authtool - ceph keyring manipulation tool
7

SYNOPSIS

9       ceph-authtool keyringfile
10       [ -l | --list ]
11       [ -p | --print ]
12       [ -C | --create-keyring ]
13       [ -g | --gen-key ]
14       [ --gen-print-key ]
15       [ --import-keyring otherkeyringfile ]
16       [ -n | --name entityname ]
17       [ -u | --set-uid auid ]
18       [ -a | --add-key base64_key ]
19       [ --cap subsystem capability ]
20       [ --caps capfile ]
21
22

DESCRIPTION

24       ceph-authtool  is  a utility to create, view, and modify a Ceph keyring
25       file. A keyring file stores one or more Ceph  authentication  keys  and
26       possibly an associated capability specification. Each key is associated
27       with an entity name, of the form {client,mon,mds,osd}.name.
28
29       WARNING   Ceph   provides   authentication   and   protection   against
30       man-in-the-middle attacks once secret keys are in place.  However, data
31       over the wire is not encrypted, which may include the messages used  to
32       configure  said  keys.  The  system is primarily intended to be used in
33       trusted environments.
34

OPTIONS

36       -l, --list
37              will list all keys and capabilities present in the keyring
38
39       -p, --print
40              will print an encoded key for the specified entityname. This  is
41              suitable for the mount -o secret= argument
42
43       -C, --create-keyring
44              will create a new keyring, overwriting any existing keyringfile
45
46       -g, --gen-key
47              will generate a new secret key for the specified entityname
48
49       --gen-print-key
50              will  generate  a  new  secret key for the specified entityname,
51              without altering the keyringfile, printing the secret to stdout
52
53       --import-keyring *secondkeyringfile*
54              will import the content of a given keyring to the keyringfile
55
56       -n, --name *name*
57              specify entityname to operate on
58
59       -u, --set-uid *auid*
60              sets the auid (authenticated user id) for the specified  entity‐
61              name
62
63       -a, --add-key *base64_key*
64              will add an encoded key to the keyring
65
66       --cap *subsystem* *capability*
67              will set the capability for given subsystem
68
69       --caps *capsfile*
70              will  set  all  of capabilities associated with a given key, for
71              all subsystems
72

CAPABILITIES

74       The subsystem is the name of a Ceph subsystem: mon, mds, or osd.
75
76       The capability is a string describing what the given user is allowed to
77       do. This takes the form of a comma separated list of allow clauses with
78       a permission specifier containing one or more of rwx for  read,  write,
79       and  execute  permission. The allow * grants full superuser permissions
80       for the given subsystem.
81
82       For example:
83
84          # can read, write, and execute objects
85          osd = "allow rwx"
86
87          # can access mds server
88          mds = "allow"
89
90          # can modify cluster state (i.e., is a server daemon)
91          mon = "allow rwx"
92
93       A librados user restricted to a single pool might look like:
94
95          mon = "allow r"
96
97          osd = "allow rw pool foo"
98
99       A client using rbd with read access to one pool and  read/write  access
100       to another:
101
102          mon = "allow r"
103
104          osd = "allow class-read object_prefix rbd_children, allow pool templates r class-read, allow pool vms rwx"
105
106       A  client  mounting the file system with minimal permissions would need
107       caps like:
108
109          mds = "allow"
110
111          osd = "allow rw pool data"
112
113          mon = "allow r"
114

OSD CAPABILITIES

116       In general, an osd capability follows the grammar:
117
118          osdcap  := grant[,grant...]
119          grant   := allow (match capspec | capspec match)
120          match   := [pool[=]<poolname> | object_prefix <prefix>]
121          capspec := * | [r][w][x] [class-read] [class-write]
122
123       The capspec determines what kind of operations the entity can perform:
124
125          r           = read access to objects
126          w           = write access to objects
127          x           = can call any class method (same as class-read class-write)
128          class-read  = can call class methods that are reads
129          class-write = can call class methods that are writes
130          *           = equivalent to rwx, plus the ability to run osd admin commands,
131                        i.e. ceph osd tell ...
132
133       The match criteria restrict a grant based on the pool  being  accessed.
134       Grants  are  additive  if  the client fulfills the match condition. For
135       example, if a client has the osd capabilities: "allow  r  object_prefix
136       prefix,  allow  w pool foo, allow x pool bar", then it has rw access to
137       pool foo, rx access to pool bar, and r access to  objects  whose  names
138       begin with 'prefix' in any pool.
139

CAPS FILE FORMAT

141       The  caps file format consists of zero or more key/value pairs, one per
142       line. The key and value are separated by an =, and the  value  must  be
143       quoted (with ' or ") if it contains any whitespace. The key is the name
144       of the Ceph subsystem (osd, mds, mon), and the value is the  capability
145       string (see above).
146

EXAMPLE

148       To create a new keyring containing a key for client.foo:
149
150          ceph-authtool -C -n client.foo --gen-key keyring
151
152       To  associate  some  capabilities  with the key (namely, the ability to
153       mount a Ceph filesystem):
154
155          ceph-authtool -n client.foo --cap mds 'allow' --cap osd 'allow rw pool=data' --cap mon 'allow r' keyring
156
157       To display the contents of the keyring:
158
159          ceph-authtool -l keyring
160
161       When mounting a Ceph  file  system,  you  can  grab  the  appropriately
162       encoded secret key with:
163
164          mount -t ceph serverhost:/ mountpoint -o name=foo,secret=`ceph-authtool -p -n client.foo keyring`
165

AVAILABILITY

167       ceph-authtool  is part of Ceph, a massively scalable, open-source, dis‐
168       tributed storage system. Please refer  to  the  Ceph  documentation  at
169       http://ceph.com/docs for more information.
170

SEE ALSO

172       ceph(8)
173
175       2010-2014,  Inktank Storage, Inc. and contributors. Licensed under Cre‐
176       ative Commons BY-SA
177
178
179
180
181dev                            October 30, 2018               CEPH-AUTHTOOL(8)
Impressum