From: Sage Weil Date: Mon, 21 Jan 2019 23:55:58 +0000 (-0600) Subject: osd,mgr,mds: remove unused authorize registries X-Git-Tag: v14.1.0~183^2~41 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fa7c83f6dcdb318b8a06c47cda8a367b865f6778;p=ceph.git osd,mgr,mds: remove unused authorize registries These are handled by AuthClient and AuthServer now. Signed-off-by: Sage Weil --- diff --git a/src/mds/MDSDaemon.cc b/src/mds/MDSDaemon.cc index 2eaab22781d..b025568cf8d 100644 --- a/src/mds/MDSDaemon.cc +++ b/src/mds/MDSDaemon.cc @@ -68,14 +68,6 @@ MDSDaemon::MDSDaemon(std::string_view n, Messenger *m, MonClient *mc) : timer(m->cct, mds_lock), gss_ktfile_client(m->cct->_conf.get_val("gss_ktab_client_file")), beacon(m->cct, mc, n), - authorize_handler_cluster_registry(new AuthAuthorizeHandlerRegistry(m->cct, - m->cct->_conf->auth_supported.empty() ? - m->cct->_conf->auth_cluster_required : - m->cct->_conf->auth_supported)), - authorize_handler_service_registry(new AuthAuthorizeHandlerRegistry(m->cct, - m->cct->_conf->auth_supported.empty() ? - m->cct->_conf->auth_service_required : - m->cct->_conf->auth_supported)), name(n), messenger(m), monc(mc), @@ -115,9 +107,6 @@ MDSDaemon::~MDSDaemon() { delete mds_rank; mds_rank = NULL; - - delete authorize_handler_service_registry; - delete authorize_handler_cluster_registry; } class MDSSocketHook : public AdminSocketHook { diff --git a/src/mds/MDSDaemon.h b/src/mds/MDSDaemon.h index 5cdcd5fa514..916062fd060 100644 --- a/src/mds/MDSDaemon.h +++ b/src/mds/MDSDaemon.h @@ -37,7 +37,6 @@ #define CEPH_MDS_PROTOCOL 34 /* cluster internal */ -class AuthAuthorizeHandlerRegistry; class Messenger; class MonClient; @@ -64,9 +63,6 @@ class MDSDaemon : public Dispatcher, public md_config_obs_t { protected: Beacon beacon; - AuthAuthorizeHandlerRegistry *authorize_handler_cluster_registry; - AuthAuthorizeHandlerRegistry *authorize_handler_service_registry; - std::string name; Messenger *messenger; diff --git a/src/mgr/DaemonServer.cc b/src/mgr/DaemonServer.cc index 1298f64f0ac..f256c2c548d 100644 --- a/src/mgr/DaemonServer.cc +++ b/src/mgr/DaemonServer.cc @@ -76,14 +76,6 @@ DaemonServer::DaemonServer(MonClient *monc_, py_modules(py_modules_), clog(clog_), audit_clog(audit_clog_), - auth_cluster_registry(g_ceph_context, - g_conf()->auth_supported.empty() ? - g_conf()->auth_cluster_required : - g_conf()->auth_supported), - auth_service_registry(g_ceph_context, - g_conf()->auth_supported.empty() ? - g_conf()->auth_service_required : - g_conf()->auth_supported), lock("DaemonServer"), pgmap_ready(false), timer(g_ceph_context, lock), diff --git a/src/mgr/DaemonServer.h b/src/mgr/DaemonServer.h index 35901aad446..310a030b1b5 100644 --- a/src/mgr/DaemonServer.h +++ b/src/mgr/DaemonServer.h @@ -26,8 +26,6 @@ #include #include -#include "auth/AuthAuthorizeHandler.h" - #include "ServiceMap.h" #include "MgrSession.h" #include "DaemonState.h" @@ -67,11 +65,6 @@ protected: PyModuleRegistry &py_modules; LogChannelRef clog, audit_clog; - // Authentication methods for cluster peers - AuthAuthorizeHandlerRegistry auth_cluster_registry; - // Authentication methods for clients - AuthAuthorizeHandlerRegistry auth_service_registry; - // Connections for daemons, and clients with service names set // (i.e. those MgrClients that are allowed to send MMgrReports) std::set daemon_connections; diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 6f97f884c95..61cfe2283e9 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -2183,14 +2183,6 @@ OSD::OSD(CephContext *cct_, ObjectStore *store_, tick_timer_lock("OSD::tick_timer_lock"), tick_timer_without_osd_lock(cct, tick_timer_lock), gss_ktfile_client(cct->_conf.get_val("gss_ktab_client_file")), - authorize_handler_cluster_registry(new AuthAuthorizeHandlerRegistry(cct, - cct->_conf->auth_supported.empty() ? - cct->_conf->auth_cluster_required : - cct->_conf->auth_supported)), - authorize_handler_service_registry(new AuthAuthorizeHandlerRegistry(cct, - cct->_conf->auth_supported.empty() ? - cct->_conf->auth_service_required : - cct->_conf->auth_supported)), cluster_messenger(internal_messenger), client_messenger(external_messenger), objecter_messenger(osdc_messenger), @@ -2298,8 +2290,6 @@ OSD::~OSD() delete shards.back(); shards.pop_back(); } - delete authorize_handler_cluster_registry; - delete authorize_handler_service_registry; delete class_handler; cct->get_perfcounters_collection()->remove(recoverystate_perf); cct->get_perfcounters_collection()->remove(logger); diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 95109308cd6..bf054d70112 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -34,6 +34,7 @@ #include "OSDCap.h" #include "auth/KeyRing.h" + #include "osd/ClassHandler.h" #include "include/CompatSet.h" @@ -238,8 +239,6 @@ class KeyStore; class Watch; class PrimaryLogPG; -class AuthAuthorizeHandlerRegistry; - class TestOpsSocketHook; struct C_FinishSplits; struct C_OpenPGs; @@ -1279,9 +1278,6 @@ protected: const double OSD_TICK_INTERVAL = { 1.0 }; double get_tick_interval() const; - AuthAuthorizeHandlerRegistry *authorize_handler_cluster_registry; - AuthAuthorizeHandlerRegistry *authorize_handler_service_registry; - Messenger *cluster_messenger; Messenger *client_messenger; Messenger *objecter_messenger; diff --git a/src/test/mon/test_mon_workloadgen.cc b/src/test/mon/test_mon_workloadgen.cc index 937615c8e34..666342c979e 100644 --- a/src/test/mon/test_mon_workloadgen.cc +++ b/src/test/mon/test_mon_workloadgen.cc @@ -302,10 +302,8 @@ class ClientStub : public TestStub } }; -typedef boost::scoped_ptr AuthHandlerRef; class OSDStub : public TestStub { - AuthHandlerRef auth_handler_registry; int whoami; OSDSuperblock sb; OSDMap osdmap; @@ -351,11 +349,6 @@ class OSDStub : public TestStub OSDStub(int _whoami, CephContext *cct) : TestStub(cct, "osd"), - auth_handler_registry(new AuthAuthorizeHandlerRegistry( - cct, - cct->_conf->auth_cluster_required.length() ? - cct->_conf->auth_cluster_required : - cct->_conf->auth_supported)), whoami(_whoami), gen(whoami), mon_osd_rng(STUB_MON_OSD_FIRST, STUB_MON_OSD_LAST)