From: Abhishek Lekshmanan Date: Thu, 1 Mar 2018 16:22:33 +0000 (+0100) Subject: rgw: have a configurable authentication order X-Git-Tag: v14.0.1~1098^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9c7fc682ca23259037115db3437c2bc9dd91fa22;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`. Fixes: http://tracker.ceph.com/issues/23089 Signed-off-by: Abhishek Lekshmanan --- diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index 69fbc51c1935..7eb51bb6f3e8 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -1317,6 +1317,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 460c196907b7..528aaed1b21c 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -5203,6 +5203,15 @@ std::vector