--- /dev/null
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+
+#pragma once
+
+#include "crimson/net/Fwd.h"
+
+class AuthAuthorizer;
+
+namespace ceph::common {
+class AuthService {
+public:
+ virtual AuthAuthorizer* get_authorizer(peer_type_t peer) const = 0;
+ virtual ~AuthService() = default;
+};
+}
}
}
+AuthAuthorizer* Client::get_authorizer(peer_type_t peer) const
+{
+ return ms_get_authorizer(peer);
+}
seastar::future<> Client::handle_monmap(ceph::net::ConnectionRef conn,
Ref<MMonMap> m)
#include "auth/KeyRing.h"
+#include "crimson/common/auth_service.h"
#include "crimson/net/Dispatcher.h"
#include "crimson/net/Fwd.h"
class Connection;
-class Client : public ceph::net::Dispatcher {
+class Client : public ceph::net::Dispatcher,
+ public ceph::common::AuthService
+{
EntityName entity_name;
KeyRing keyring;
std::unique_ptr<AuthMethodList> auth_methods;
void sub_unwant(const std::string& what);
bool sub_want_increment(const std::string& what, version_t start, unsigned flags);
seastar::future<> renew_subs();
+ // AuthService methods
+ AuthAuthorizer* get_authorizer(peer_type_t peer) const override;
private:
void tick();
#include "messages/MOSDPing.h"
#include "messages/MOSDFailure.h"
+#include "crimson/common/auth_service.h"
#include "crimson/common/config_proxy.h"
#include "crimson/net/Connection.h"
#include "crimson/net/Messenger.h"
return seastar::now();
}
+AuthAuthorizer* Heartbeat::ms_get_authorizer(peer_type_t peer) const
+{
+ return monc.get_authorizer(peer);
+}
+
seastar::future<> Heartbeat::send_heartbeats()
{
using peers_item_t = typename peers_map_t::value_type;
// Dispatcher methods
seastar::future<> ms_dispatch(ceph::net::ConnectionRef conn,
MessageRef m) override;
+ AuthAuthorizer* ms_get_authorizer(peer_type_t peer) const override;
private:
seastar::future<> handle_osd_ping(ceph::net::ConnectionRef conn,