X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Frgw%2Frgw_auth_registry.h;fp=src%2Fceph%2Fsrc%2Frgw%2Frgw_auth_registry.h;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=08a93c73dac2f4c9bb52ad87a2b6135c209ab85d;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/rgw/rgw_auth_registry.h b/src/ceph/src/rgw/rgw_auth_registry.h deleted file mode 100644 index 08a93c7..0000000 --- a/src/ceph/src/rgw/rgw_auth_registry.h +++ /dev/null @@ -1,89 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab - - -#ifndef CEPH_RGW_AUTH_REGISTRY_H -#define CEPH_RGW_AUTH_REGISTRY_H - -#include -#include -#include -#include -#include - -#include "rgw_auth.h" -#include "rgw_auth_s3.h" -#include "rgw_swift_auth.h" - -namespace rgw { -namespace auth { - -/* A class aggregating the knowledge about all Strategies in RadosGW. It is - * responsible for handling the dynamic reconfiguration on e.g. realm update. */ -class StrategyRegistry { - template - using s3_strategy_t = \ - rgw::auth::s3::AWSAuthStrategy; - - struct s3_main_strategy_t : public Strategy { - using s3_main_strategy_plain_t = \ - s3_strategy_t; - using s3_main_strategy_boto2_t = \ - s3_strategy_t; - - s3_main_strategy_plain_t s3_main_strategy_plain; - s3_main_strategy_boto2_t s3_main_strategy_boto2; - - s3_main_strategy_t(CephContext* const cct, RGWRados* const store) - : s3_main_strategy_plain(cct, store), - s3_main_strategy_boto2(cct, store) { - add_engine(Strategy::Control::SUFFICIENT, s3_main_strategy_plain); - add_engine(Strategy::Control::FALLBACK, s3_main_strategy_boto2); - } - - const char* get_name() const noexcept override { - return "rgw::auth::StrategyRegistry::s3_main_strategy_t"; - } - } s3_main_strategy; - - using s3_post_strategy_t = \ - s3_strategy_t; - s3_post_strategy_t s3_post_strategy; - - rgw::auth::swift::DefaultStrategy swift_strategy; - -public: - StrategyRegistry(CephContext* const cct, - RGWRados* const store) - : s3_main_strategy(cct, store), - s3_post_strategy(cct, store), - swift_strategy(cct, store) { - } - - const s3_main_strategy_t& get_s3_main() const { - return s3_main_strategy; - } - - const s3_post_strategy_t& get_s3_post() const { - return s3_post_strategy; - } - - const rgw::auth::swift::DefaultStrategy& get_swift() const { - return swift_strategy; - } - - static std::shared_ptr - create(CephContext* const cct, - RGWRados* const store) { - return std::make_shared(cct, store); - } -}; - -} /* namespace auth */ -} /* namespace rgw */ - -using rgw_auth_registry_t = rgw::auth::StrategyRegistry; -using rgw_auth_registry_ptr_t = std::shared_ptr; - -#endif /* CEPH_RGW_AUTH_REGISTRY_H */