diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/crimson/auth/AuthServer.h | |
parent | Initial commit. (diff) | |
download | ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/crimson/auth/AuthServer.h')
-rw-r--r-- | src/crimson/auth/AuthServer.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/crimson/auth/AuthServer.h b/src/crimson/auth/AuthServer.h new file mode 100644 index 000000000..d75c8f586 --- /dev/null +++ b/src/crimson/auth/AuthServer.h @@ -0,0 +1,41 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab + +#pragma once + +#include <cstdint> +#include <utility> +#include <vector> +#include "crimson/net/Fwd.h" + +struct AuthAuthorizeHandler; + +namespace crimson::auth { + +class AuthServer { +public: + virtual ~AuthServer() {} + + // Get authentication methods and connection modes for the given peer type + virtual std::pair<std::vector<uint32_t>, std::vector<uint32_t>> + get_supported_auth_methods(int peer_type) = 0; + // Get support connection modes for the given peer type and auth method + virtual uint32_t pick_con_mode( + int peer_type, + uint32_t auth_method, + const std::vector<uint32_t>& preferred_modes) = 0; + // return an AuthAuthorizeHandler for the given peer type and auth method + virtual AuthAuthorizeHandler* get_auth_authorize_handler( + int peer_type, + int auth_method) = 0; + // Handle an authentication request on an incoming connection + virtual int handle_auth_request( + crimson::net::ConnectionRef conn, + AuthConnectionMetaRef auth_meta, + bool more, //< true if this is not the first part of the handshake + uint32_t auth_method, + const bufferlist& bl, + bufferlist *reply) = 0; +}; + +} // namespace crimson::auth |