diff options
Diffstat (limited to 'src/rgw/rgw_main.cc')
-rw-r--r-- | src/rgw/rgw_main.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc index 733d4567003..1bec56553a6 100644 --- a/src/rgw/rgw_main.cc +++ b/src/rgw/rgw_main.cc @@ -385,11 +385,7 @@ int main(int argc, const char **argv) } if (apis_map.count("swift") > 0) { - static const rgw::auth::swift::DefaultStrategy auth_strategy(g_ceph_context, - store); - - RGWRESTMgr_SWIFT* const swift_resource = new RGWRESTMgr_SWIFT( - &auth_strategy); + RGWRESTMgr_SWIFT* const swift_resource = new RGWRESTMgr_SWIFT; if (! g_conf->rgw_cross_domain_policy.empty()) { swift_resource->register_resource("crossdomain.xml", @@ -400,7 +396,7 @@ int main(int argc, const char **argv) set_logging(new RGWRESTMgr_SWIFT_HealthCheck)); swift_resource->register_resource("info", - set_logging(new RGWRESTMgr_SWIFT_Info(&auth_strategy))); + set_logging(new RGWRESTMgr_SWIFT_Info)); if (! swift_at_root) { rest.register_resource(g_conf->rgw_swift_url_prefix, @@ -437,6 +433,11 @@ int main(int argc, const char **argv) rest.register_resource(g_conf->rgw_admin_entry, admin_resource); } + /* Initialize the registry of auth strategies which will coordinate + * the dynamic reconfiguration. */ + auto auth_registry = \ + rgw::auth::StrategyRegistry::create(g_ceph_context, store); + /* Header custom behavior */ rest.register_x_headers(g_conf->rgw_log_http_headers); @@ -474,7 +475,7 @@ int main(int argc, const char **argv) std::string uri_prefix; config->get_val("prefix", "", &uri_prefix); - RGWProcessEnv env = { store, &rest, olog, 0, uri_prefix }; + RGWProcessEnv env = { store, &rest, olog, 0, uri_prefix, auth_registry }; fe = new RGWCivetWebFrontend(env, config); } @@ -484,7 +485,7 @@ int main(int argc, const char **argv) std::string uri_prefix; config->get_val("prefix", "", &uri_prefix); - RGWProcessEnv env = { store, &rest, olog, port, uri_prefix }; + RGWProcessEnv env = { store, &rest, olog, port, uri_prefix, auth_registry }; fe = new RGWLoadGenFrontend(env, config); } @@ -495,7 +496,7 @@ int main(int argc, const char **argv) config->get_val("port", 80, &port); std::string uri_prefix; config->get_val("prefix", "", &uri_prefix); - RGWProcessEnv env{ store, &rest, olog, port, uri_prefix }; + RGWProcessEnv env{ store, &rest, olog, port, uri_prefix, auth_registry }; fe = new RGWAsioFrontend(env); } #endif /* WITH_RADOSGW_ASIO_FRONTEND */ @@ -503,7 +504,7 @@ int main(int argc, const char **argv) else if (framework == "fastcgi" || framework == "fcgi") { std::string uri_prefix; config->get_val("prefix", "", &uri_prefix); - RGWProcessEnv fcgi_pe = { store, &rest, olog, 0, uri_prefix }; + RGWProcessEnv fcgi_pe = { store, &rest, olog, 0, uri_prefix, auth_registry }; fe = new RGWFCGXFrontend(fcgi_pe, config); } |