From: Sage Weil Date: Sun, 20 Jan 2019 23:06:23 +0000 (-0600) Subject: auth/AuthClientHandler: add build_initial_request hook X-Git-Tag: v14.1.0~183^2~44 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ee2e31b244e4ae355401b20274e1deecf6268f17;p=ceph.git auth/AuthClientHandler: add build_initial_request hook With msgr2 the initial kickoff of an authentication handshake is client -> server, while with msgr1 it was server -> client. So existing implementations have an empty initial message (outside of the messenger's envelope). Future auth implementations that are msgr2 only (e.g., krb) may want to make use of this initial payload. Signed-off-by: Sage Weil --- diff --git a/src/auth/AuthClientHandler.h b/src/auth/AuthClientHandler.h index 5b24a1ff856d..1e8f76eb4f3d 100644 --- a/src/auth/AuthClientHandler.h +++ b/src/auth/AuthClientHandler.h @@ -48,6 +48,9 @@ public: virtual void reset() = 0; virtual void prepare_build_request() = 0; + virtual void build_initial_request(bufferlist *bl) const { + // this is empty for methods cephx and none. + } virtual int build_request(bufferlist& bl) const = 0; virtual int handle_response(int ret, bufferlist::const_iterator& iter, CryptoKey *session_key,