diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
commit | e6918187568dbd01842d8d1d2c808ce16a894239 (patch) | |
tree | 64f88b554b444a49f656b6c656111a145cbbaa28 /src/test/cli/ceph-authtool/add-key.t | |
parent | Initial commit. (diff) | |
download | ceph-upstream/18.2.2.tar.xz ceph-upstream/18.2.2.zip |
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/cli/ceph-authtool/add-key.t')
-rw-r--r-- | src/test/cli/ceph-authtool/add-key.t | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/test/cli/ceph-authtool/add-key.t b/src/test/cli/ceph-authtool/add-key.t new file mode 100644 index 000000000..0da2365c0 --- /dev/null +++ b/src/test/cli/ceph-authtool/add-key.t @@ -0,0 +1,27 @@ + $ ceph-authtool kring --create-keyring --mode 0644 + creating kring + + $ ceph-authtool kring --add-key 'AQAK7yxNeF+nHBAA0SgSdbs8IkJrxroDeJ6SwQ== 18446744073709551615' + added entity client.admin auth(key=AQAK7yxNeF+nHBAA0SgSdbs8IkJrxroDeJ6SwQ==) + +# cram makes matching escape-containing lines with regexps a bit ugly + $ ceph-authtool kring --list + [client.admin] + \tkey = AQAK7yxNeF+nHBAA0SgSdbs8IkJrxroDeJ6SwQ== (esc) + + $ cat kring + [client.admin] + \tkey = AQAK7yxNeF+nHBAA0SgSdbs8IkJrxroDeJ6SwQ== (esc) + +Test --add-key with empty argument + + $ ceph-authtool kring -C --name=mon.* --add-key= --cap mon 'allow *' + Option --add-key requires an argument + [1] + + $ ceph-authtool test.keyring --create-keyring --mode 0644 + creating test.keyring + + $ ceph-authtool test.keyring --name client.test --cap osd 'allow rwx' --cap mon 'allow r' --add-key 'AQAK7yxNeF+nHBAA0SgSdbs8IkJrxroDeJ6SwQ== 18446744073709551615' + added entity client.test auth(key=AQAK7yxNeF+nHBAA0SgSdbs8IkJrxroDeJ6SwQ==) + added 2 caps to entity client.test |