// for some channels prior to nautilus (osd heartbeat), we tolerate the lack of
// an authorizer.
if (payload.length() == 0 &&
- !handle_authentication_dispatcher->require_authorizer) {
+ !con->get_messenger()->require_authorizer) {
handle_authentication_dispatcher->ms_handle_authentication(con);
return 1;
}
* @} //Authentication
*/
- void ms_set_require_authorizer(bool b) {
- require_authorizer = b;
- }
protected:
CephContext *cct;
-public:
- // allow unauthenticated connections. This is needed for
- // compatibility with pre-nautilus OSDs, which do not authenticate
- // the heartbeat sessions.
- bool require_authorizer = true;
private:
explicit Dispatcher(const Dispatcher &rhs);
Dispatcher& operator=(const Dispatcher &rhs);
using Policy = ceph::net::Policy<Throttle>;
+public:
+ // allow unauthenticated connections. This is needed for
+ // compatibility with pre-nautilus OSDs, which do not authenticate
+ // the heartbeat sessions.
+ bool require_authorizer = true;
+
protected:
// for authentication
AuthRegistry auth_registry;
}
}
+ void set_require_authorizer(bool b) {
+ require_authorizer = b;
+ }
+
/**
* @} // Dispatcher Interfacing
*/
}
if (osdmap->require_osd_release < CEPH_RELEASE_NAUTILUS) {
- heartbeat_dispatcher.ms_set_require_authorizer(false);
+ hb_front_server_messenger->set_require_authorizer(false);
+ hb_back_server_messenger->set_require_authorizer(false);
}
if (osdmap->require_osd_release != last_require_osd_release) {
msgr->set_default_policy(Messenger::Policy::stateless_server(0));
msgr->set_auth_client(&dummy_auth);
msgr->set_auth_server(&dummy_auth);
- dispatcher.ms_set_require_authorizer(false);
+ msgr->set_require_authorizer(false);
}
DummyAuthClientServer dummy_auth;
unique_ptr<Messenger> msgr;
msgr->set_default_policy(Messenger::Policy::stateless_server(0));
msgr->set_auth_client(&dummy_auth);
msgr->set_auth_server(&dummy_auth);
- dispatcher.ms_set_require_authorizer(false);
+ msgr->set_require_authorizer(false);
}
DummyAuthClientServer dummy_auth;
unique_ptr<Messenger> msgr;
msgr->set_default_policy(Messenger::Policy::lossy_client(0));
msgr->set_auth_client(&dummy_auth);
msgr->set_auth_server(&dummy_auth);
- dispatcher.ms_set_require_authorizer(false);
+ msgr->set_require_authorizer(false);
}
DummyAuthClientServer dummy_auth;
struct ClientDispatcher : Dispatcher {
server_msgr->set_auth_server(&dummy_auth);
client_msgr->set_auth_client(&dummy_auth);
client_msgr->set_auth_server(&dummy_auth);
+ server_msgr->set_require_authorizer(false);
}
void TearDown() override {
ASSERT_EQ(server_msgr->get_dispatch_queue_len(), 0);
explicit FakeDispatcher(bool s): Dispatcher(g_ceph_context), lock("FakeDispatcher::lock"),
is_server(s), got_new(false), got_remote_reset(false),
got_connect(false), loopback(false) {
- // don't need authorizers
- ms_set_require_authorizer(false);
}
bool ms_can_fast_dispatch_any() const override { return true; }
bool ms_can_fast_dispatch(const Message *m) const override {
SyntheticDispatcher(bool s, SyntheticWorkload *wl):
Dispatcher(g_ceph_context), lock("SyntheticDispatcher::lock"), is_server(s), got_new(false),
got_remote_reset(false), got_connect(false), index(0), workload(wl) {
- // don't need authorizers
- ms_set_require_authorizer(false);
}
bool ms_can_fast_dispatch_any() const override { return true; }
bool ms_can_fast_dispatch(const Message *m) const override {
std::atomic<uint64_t> count = { 0 };
explicit MarkdownDispatcher(bool s): Dispatcher(g_ceph_context), lock("MarkdownDispatcher::lock"),
last_mark(false) {
- // don't need authorizers
- ms_set_require_authorizer(false);
}
bool ms_can_fast_dispatch_any() const override { return false; }
bool ms_can_fast_dispatch(const Message *m) const override {