return ++global_seq;
}
- // @returns a tuple of <is_valid, auth_reply, session_key>
- virtual seastar::future<msgr_tag_t, /// tag for error, 0 if authorized
- bufferlist> /// auth_reply
- verify_authorizer(peer_type_t peer_type,
- auth_proto_t protocol,
- bufferlist& auth) = 0;
- virtual seastar::future<std::unique_ptr<AuthAuthorizer>>
- get_authorizer(peer_type_t peer_type,
- bool force_new) = 0;
uint32_t get_crc_flags() const {
return crc_flags;
}
return seastar::make_ready_future<msgr_tag_t, bufferlist>(
CEPH_MSGR_TAG_FEATURES, bufferlist{});
}
- return messenger.verify_authorizer(peer_type,
- h.connect.authorizer_protocol,
- authorizer);
+ return dispatcher.ms_verify_authorizer(peer_type,
+ h.connect.authorizer_protocol,
+ authorizer);
}).then([this] (ceph::net::msgr_tag_t tag, bufferlist&& authorizer_reply) {
memset(&h.reply, 0, sizeof(h.reply));
if (tag) {
}
h.got_bad_auth = true;
// try harder
- return messenger.get_authorizer(peer_type, true)
+ return dispatcher.ms_get_authorizer(peer_type, true)
.then([this](auto&& auth) {
h.authorizer = std::move(auth);
return stop_t::no;
// this is fyi, actually, server decides!
h.connect.flags = policy.lossy ? CEPH_MSG_CONNECT_LOSSY : 0;
- return messenger.get_authorizer(peer_type, false)
+ return dispatcher.ms_get_authorizer(peer_type, false)
.then([this](auto&& auth) {
h.authorizer = std::move(auth);
bufferlist bl;
ceph_assert(found->second == conn);
connections.erase(found);
}
-
-seastar::future<msgr_tag_t, bufferlist>
-SocketMessenger::verify_authorizer(peer_type_t peer_type,
- auth_proto_t protocol,
- bufferlist& auth)
-{
- return dispatcher->ms_verify_authorizer(peer_type, protocol, auth);
-}
-
-seastar::future<std::unique_ptr<AuthAuthorizer>>
-SocketMessenger::get_authorizer(peer_type_t peer_type, bool force_new)
-{
- return dispatcher->ms_get_authorizer(peer_type, force_new);
-}
seastar::future<> shutdown() override;
- seastar::future<msgr_tag_t, bufferlist>
- verify_authorizer(peer_type_t peer_type,
- auth_proto_t protocol,
- bufferlist& auth) override;
-
- seastar::future<std::unique_ptr<AuthAuthorizer>>
- get_authorizer(peer_type_t peer_type,
- bool force_new) override;
-
public:
void set_default_policy(const SocketPolicy& p);
void set_policy(entity_type_t peer_type, const SocketPolicy& p);