From: Abhishek Lekshmanan Date: Thu, 1 Mar 2018 16:22:33 +0000 (+0100) Subject: rgw: have a configurable authentication order X-Git-Tag: v12.2.8~20^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1b1a317c9d39ffdf003f72e8e9853f0e25a1948c;p=ceph.git rgw: have a configurable authentication order This implements a configurable authentication order, currently used only for s3 authentication and only supporting external & local authentication, though there is potential for more finegrained control by allowing for a map of various engines and the control strategy (required vs sufficient vs fallback) The current implementation just focuses on setting control fallback if the engine is the last in the order (and hence the stack) and just sets sufficient to every other element, so that errors from the last sufficient engine is returned. The configuration option is rgw_s3_auth_order which takes a comma/space seperated list of authentication engines where currently we support the keywords `external` and `local`. Luminous specific changes: std::string_view -> boost::string_view auto function return -> return type std::vector if initializer list dropped Fixes: http://tracker.ceph.com/issues/23089 Signed-off-by: Abhishek Lekshmanan (cherry picked from commit 9c7fc682ca23259037115db3437c2bc9dd91fa22) --- diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index 69bfcd7dee3..38b36a60cc8 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -1375,6 +1375,7 @@ OPTION(rgw_cross_domain_policy, OPT_STR) OPTION(rgw_healthcheck_disabling_path, OPT_STR) // path that existence causes the healthcheck to respond 503 OPTION(rgw_s3_auth_use_rados, OPT_BOOL) // should we try to use the internal credentials for s3? OPTION(rgw_s3_auth_use_keystone, OPT_BOOL) // should we try to use keystone for s3? +OPTION(rgw_s3_auth_order, OPT_STR) // s3 authentication order to try OPTION(rgw_barbican_url, OPT_STR) // url for barbican server /* OpenLDAP-style LDAP parameter strings */ diff --git a/src/common/options.cc b/src/common/options.cc index 5d1f1fb9e33..1ed027c9beb 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -4709,6 +4709,15 @@ std::vector