]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
auth/AuthClientHandler: add build_initial_request hook
authorSage Weil <sage@redhat.com>
Sun, 20 Jan 2019 23:06:23 +0000 (17:06 -0600)
committerSage Weil <sage@redhat.com>
Thu, 7 Feb 2019 12:53:03 +0000 (06:53 -0600)
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 <sage@redhat.com>
src/auth/AuthClientHandler.h

index 5b24a1ff856d4c7851f8fb87d128e31d53e574fb..1e8f76eb4f3d60df62a8d556353a0f2bc846d37b 100644 (file)
@@ -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,