From fd47c91a455a769a71984bd18304a80386733ae2 Mon Sep 17 00:00:00 2001 From: "Enming.Zhang" Date: Fri, 10 Aug 2018 12:16:49 -0400 Subject: [PATCH] radosgw-admin: add mfa related command and options command: + mfa create + mfa list + mfa get + mfa remove + mfa check + mfa resync options: + --totp-serial + --totp-seed + --totp-second + --totp-window + --totp-pin Signed-off-by: Enming.Zhang --- src/rgw/rgw_admin.cc | 12 ++++++++++++ src/test/cli/radosgw-admin/help.t | 13 +++++++++++++ 2 files changed, 25 insertions(+) diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index e2bfe7a4f4850..1797051a5eb6c 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -211,6 +211,12 @@ void usage() cout << " reshard cancel cancel resharding a bucket\n"; cout << " sync error list list sync error\n"; cout << " sync error trim trim sync error\n"; + cout << " mfa create create a new MFA TOTP token\n"; + cout << " mfa list list MFA TOTP tokens\n"; + cout << " mfa get show MFA TOTP token\n"; + cout << " mfa remove delete MFA TOTP token\n"; + cout << " mfa check check MFA TOTP token\n"; + cout << " mfa resync re-sync MFA TOTP token\n"; cout << "options:\n"; cout << " --tenant= tenant name\n"; cout << " --uid= user id\n"; @@ -341,6 +347,12 @@ void usage() cout << " --policy-name name of the policy document\n"; cout << " --policy-doc permission policy document\n"; cout << " --path-prefix path prefix for filtering roles\n"; + cout << "\nMFA options:\n"; + cout << " --totp-serial a string that represents the ID of a TOTP token\n"; + cout << " --totp-seed the secret seed that is used to calculate the TOTP\n"; + cout << " --totp-seconds the time resolution that is being used for TOTP generation\n"; + cout << " --totp-window the number of TOTP tokens that are checked before and after the current token when validating token\n"; + cout << " --totp-pin the valid value of a TOTP token at a certain time\n"; cout << "\n"; generic_client_usage(); } diff --git a/src/test/cli/radosgw-admin/help.t b/src/test/cli/radosgw-admin/help.t index 75d51a00df096..512c6a6c3b300 100644 --- a/src/test/cli/radosgw-admin/help.t +++ b/src/test/cli/radosgw-admin/help.t @@ -150,6 +150,12 @@ reshard cancel cancel resharding a bucket sync error list list sync error sync error trim trim sync error + mfa create create a new MFA TOTP token + mfa list list MFA TOTP tokens + mfa get show MFA TOTP token + mfa remove delete MFA TOTP token + mfa check check MFA TOTP token + mfa resync re-sync MFA TOTP token options: --tenant= tenant name --uid= user id @@ -285,6 +291,13 @@ --policy-doc permission policy document --path-prefix path prefix for filtering roles + MFA options: + --totp-serial a string that represents the ID of a TOTP token + --totp-seed the secret seed that is used to calculate the TOTP + --totp-seconds the time resolution that is being used for TOTP generation + --totp-window the number of TOTP tokens that are checked before and after the current token when validating token + --totp-pin the valid value of a TOTP token at a certain time + --conf/-c FILE read configuration from the given configuration file --id ID set ID portion of my name --name/-n TYPE.ID set name -- 2.39.5