From: Sage Weil Date: Sat, 11 Aug 2018 16:21:30 +0000 (-0500) Subject: ceph-authtool: remove auid options X-Git-Tag: v14.0.1~431^2~27 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d6def8ba1126209f8dcb40e296977dc2b09a376e;p=ceph.git ceph-authtool: remove auid options Signed-off-by: Sage Weil --- diff --git a/doc/dev/mon-bootstrap.rst b/doc/dev/mon-bootstrap.rst index 13da36196f49b..66b52d8d452a9 100644 --- a/doc/dev/mon-bootstrap.rst +++ b/doc/dev/mon-bootstrap.rst @@ -42,7 +42,7 @@ with a command like:: When creating a new monitor cluster, the keyring should also contain a ``client.admin`` key that can be used to administer the system:: - ceph-authtool /path/to/keyring --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow' + ceph-authtool /path/to/keyring --gen-key -n client.admin --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow' The resulting keyring is fed to ``ceph-mon --mkfs`` with the ``--keyring `` command-line argument. diff --git a/doc/install/manual-deployment.rst b/doc/install/manual-deployment.rst index 843908a11dc81..dc24aa5978d07 100644 --- a/doc/install/manual-deployment.rst +++ b/doc/install/manual-deployment.rst @@ -162,7 +162,7 @@ The procedure is as follows: #. Generate an administrator keyring, generate a ``client.admin`` user and add the user to the keyring. :: - sudo ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *' + sudo ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *' #. Generate a bootstrap-osd keyring, generate a ``client.bootstrap-osd`` user and add the user to the keyring. :: diff --git a/doc/install/manual-freebsd-deployment.rst b/doc/install/manual-freebsd-deployment.rst index 5e5ffc0a7b946..cf23e8a74ce16 100644 --- a/doc/install/manual-freebsd-deployment.rst +++ b/doc/install/manual-freebsd-deployment.rst @@ -211,7 +211,7 @@ The procedure is as follows: #. Generate an administrator keyring, generate a ``client.admin`` user and add the user to the keyring. :: - sudo ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *' + sudo ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *' #. Add the ``client.admin`` key to the ``ceph.mon.keyring``. :: diff --git a/doc/man/8/ceph-authtool.rst b/doc/man/8/ceph-authtool.rst index 291e50d85f535..05532f55cf599 100644 --- a/doc/man/8/ceph-authtool.rst +++ b/doc/man/8/ceph-authtool.rst @@ -17,7 +17,6 @@ Synopsis [ --gen-print-key ] [ --import-keyring *otherkeyringfile* ] [ -n | --name *entityname* ] - [ -u | --set-uid *auid* ] [ -a | --add-key *base64_key* ] [ --cap *subsystem* *capability* ] [ --caps *capfile* ] @@ -72,10 +71,6 @@ Options specify entityname to operate on -.. option:: -u, --set-uid *auid* - - sets the auid (authenticated user id) for the specified entityname - .. option:: -a, --add-key *base64_key* will add an encoded key to the keyring diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index e53adcf31a713..ce9a243269f78 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -569,7 +569,6 @@ def cluster(ctx, config): 'ceph-authtool', '--gen-key', '--name=client.admin', - '--set-uid=0', '--cap', 'mon', 'allow *', '--cap', 'osd', 'allow *', '--cap', 'mds', 'allow *', diff --git a/src/test/cli/ceph-authtool/help.t b/src/test/cli/ceph-authtool/help.t index 2530f475ed4a0..68f4a9699587c 100644 --- a/src/test/cli/ceph-authtool/help.t +++ b/src/test/cli/ceph-authtool/help.t @@ -16,8 +16,6 @@ --import-keyring FILE will import the content of a given keyring into the keyringfile -n NAME, --name NAME specify entityname to operate on - -u AUID, --set-uid AUID sets the auid (authenticated user id) for the - specified entityname -a BASE64, --add-key BASE64 will add an encoded key to the keyring --cap SUBSYSTEM CAPABILITY will set the capability for given subsystem --caps CAPSFILE will set all of capabilities associated with a diff --git a/src/tools/ceph_authtool.cc b/src/tools/ceph_authtool.cc index 54b46ffabdff7..c65d58c9b499c 100644 --- a/src/tools/ceph_authtool.cc +++ b/src/tools/ceph_authtool.cc @@ -40,8 +40,6 @@ void usage() << " --import-keyring FILE will import the content of a given keyring\n" << " into the keyringfile\n" << " -n NAME, --name NAME specify entityname to operate on\n" - << " -u AUID, --set-uid AUID sets the auid (authenticated user id) for the\n" - << " specified entityname\n" << " -a BASE64, --add-key BASE64 will add an encoded key to the keyring\n" << " --cap SUBSYSTEM CAPABILITY will set the capability for given subsystem\n" << " --caps CAPSFILE will set all of capabilities associated with a\n" @@ -60,7 +58,6 @@ int main(int argc, const char **argv) std::string add_key; std::string caps_fn; std::string import_keyring; - uint64_t auid = CEPH_AUTH_UID_DEFAULT; map caps; std::string fn; @@ -82,7 +79,6 @@ int main(int argc, const char **argv) bool list = false; bool print_key = false; bool create_keyring = false; - bool set_auid = false; int mode = 0600; // keyring file mode std::vector::iterator i; @@ -122,14 +118,6 @@ int main(int argc, const char **argv) create_keyring = true; } else if (ceph_argparse_witharg(args, i, &val, "--import-keyring", (char*)NULL)) { import_keyring = val; - } else if (ceph_argparse_witharg(args, i, &val, "-u", "--set-uid", (char*)NULL)) { - std::string err; - auid = strict_strtoll(val.c_str(), 10, &err); - if (!err.empty()) { - cerr << "error parsing UID: " << err << std::endl; - exit(1); - } - set_auid = true; } else if (ceph_argparse_witharg(args, i, &val, "--mode", (char*)NULL)) { std::string err; mode = strict_strtoll(val.c_str(), 8, &err); @@ -155,7 +143,6 @@ int main(int argc, const char **argv) list || !caps_fn.empty() || !caps.empty() || - set_auid || print_key || create_keyring || !import_keyring.empty())) { @@ -289,10 +276,6 @@ int main(int argc, const char **argv) keyring.set_caps(ename, caps); modified = true; } - if (set_auid) { - keyring.set_uid(ename, auid); - modified = true; - } // read commands if (list) { diff --git a/src/vstart.sh b/src/vstart.sh index 8c6feac164fe4..6cfd2478278f6 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -603,14 +603,14 @@ start_mon() { fi prun $SUDO "$CEPH_BIN/ceph-authtool" --create-keyring --gen-key --name=mon. "$keyring_fn" --cap mon 'allow *' - prun $SUDO "$CEPH_BIN/ceph-authtool" --gen-key --name=client.admin --set-uid=0 \ + prun $SUDO "$CEPH_BIN/ceph-authtool" --gen-key --name=client.admin \ --cap mon 'allow *' \ --cap osd 'allow *' \ --cap mds 'allow *' \ --cap mgr 'allow *' \ "$keyring_fn" - prun $SUDO "$CEPH_BIN/ceph-authtool" --gen-key --name=client.fs --set-uid=0 \ + prun $SUDO "$CEPH_BIN/ceph-authtool" --gen-key --name=client.fs\ --cap mon 'allow r' \ --cap osd 'allow rw tag cephfs data=*' \ --cap mds 'allow rwp' \