Ceph: update Cephx Keys

shan

It’s not really clear from the command line

Generate a dummy key for the exercise

1
2
3
4
$ ceph auth get-or-create client.dummy mon 'allow r' osd  'allow rwx pool=dummy'

[client.dummy]
    key = AQAPiu1RCMb4CxAAmP7rrufwZPRqy8bpQa2OeQ==

Verify that the key is present:

1
2
3
4
5
6
7
8
$ ceph auth list
installed auth entries:
...
client.dummy
    key: AQAPiu1RCMb4CxAAmP7rrufwZPRqy8bpQa2OeQ==
    caps: [mon] allow r
    caps: [osd] allow rwx pool=dummy
...

Then grant more permission on the mon:

1
2
$ ceph auth caps client.dummy mon 'allow rwx' osd 'allow rwx pool=dummy'
updated caps for client.dummy

Verify that the change has been applied:

1
2
3
4
5
6
$ ceph auth list
installed auth entries:
client.dummy
    key: AQAPiu1RCMb4CxAAmP7rrufwZPRqy8bpQa2OeQ==
    caps: [mon] allow rwx
    caps: [osd] allow allow rwx pool=dummy

Hope it helps!