]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
auth/AuthClientHandler: pass in session_key, connection_secret pointers
authorSage Weil <sage@redhat.com>
Wed, 16 Jan 2019 21:00:59 +0000 (15:00 -0600)
committerSage Weil <sage@redhat.com>
Thu, 7 Feb 2019 12:53:03 +0000 (06:53 -0600)
No functional change.

Signed-off-by: Sage Weil <sage@redhat.com>
src/auth/AuthClientHandler.h
src/auth/cephx/CephxClientHandler.cc
src/auth/cephx/CephxClientHandler.h
src/auth/krb/KrbClientHandler.cpp
src/auth/krb/KrbClientHandler.hpp
src/auth/none/AuthNoneClientHandler.h
src/auth/unknown/AuthUnknownClientHandler.h
src/mon/MonClient.cc

index 7e9d0cc910da55e7efe8b85b4a9219c4945f8ecd..5b24a1ff856d4c7851f8fb87d128e31d53e574fb 100644 (file)
@@ -49,7 +49,9 @@ public:
   virtual void reset() = 0;
   virtual void prepare_build_request() = 0;
   virtual int build_request(bufferlist& bl) const = 0;
-  virtual int handle_response(int ret, bufferlist::const_iterator& iter) = 0;
+  virtual int handle_response(int ret, bufferlist::const_iterator& iter,
+                             CryptoKey *session_key,
+                             CryptoKey *connection_secret) = 0;
   virtual bool build_rotating_request(bufferlist& bl) const = 0;
 
   virtual AuthAuthorizer *build_authorizer(uint32_t service_id) const = 0;
index b4bbdc6cc03b007fe81a832a9aa9fb355f9b7186..64924777e5b8e9aecda59ff2dbce301222ca4f76 100644 (file)
@@ -105,7 +105,11 @@ bool CephxClientHandler::_need_tickets() const
   return need && need != CEPH_ENTITY_TYPE_MGR;
 }
 
-int CephxClientHandler::handle_response(int ret, bufferlist::const_iterator& indata)
+int CephxClientHandler::handle_response(
+  int ret,
+  bufferlist::const_iterator& indata,
+  CryptoKey *session_key,
+  CryptoKey *connection_secret)
 {
   ldout(cct, 10) << "handle_response ret = " << ret << dendl;
   
index 9d821281588d4bf01dde3536bc55a12ae2e11e8e..63a4c7a513b32a74c9d557ca3541a37814960ca3 100644 (file)
@@ -54,7 +54,9 @@ public:
   }
   void prepare_build_request() override;
   int build_request(bufferlist& bl) const override;
-  int handle_response(int ret, bufferlist::const_iterator& iter) override;
+  int handle_response(int ret, bufferlist::const_iterator& iter,
+                     CryptoKey *session_key,
+                     CryptoKey *connection_secret) override;
   bool build_rotating_request(bufferlist& bl) const override;
 
   int get_protocol() const override { return CEPH_AUTH_CEPHX; }
index 5e299824b7acb0c527a6582c9f58e45707cc1415..b82c8a651887762ecd125db89d40b394b4eac8db 100644 (file)
@@ -89,8 +89,11 @@ int KrbClientHandler::build_request(bufferlist& buff_list) const
 }
 
 
-int KrbClientHandler::handle_response(int ret, 
-                                          bufferlist::const_iterator& buff_list)
+int KrbClientHandler::handle_response(
+  int ret,
+  bufferlist::const_iterator& buff_list,
+  CryptoKey *session_key,
+  CryptoKey *connection_secret)
 {
   auto result(ret);
   gss_buffer_desc gss_buffer_in = {0, nullptr};
index 66f03d069051e2ea1813ec201281a4d333a42b7e..3418f0d6d7d785264f5ddc9c909d2ff5639d78c7 100644 (file)
@@ -52,7 +52,9 @@ class KrbClientHandler : public AuthClientHandler {
     void prepare_build_request() override { };
     int build_request(bufferlist& buff_list) const override;
     int handle_response(int ret, 
-                        bufferlist::const_iterator& buff_list) override;
+                        bufferlist::const_iterator& buff_list,
+                       CryptoKey *session_key,
+                       CryptoKey *connection_secret) override;
 
     bool build_rotating_request(bufferlist& buff_list) const override { 
       return false; 
index c74acb6ec3856e38202b9a34b53c09e6bcd3c14a..6578e2eb67e8daa64f71bc3d7cbe0a60bffca548 100644 (file)
@@ -30,7 +30,9 @@ public:
 
   void prepare_build_request() override {}
   int build_request(bufferlist& bl) const override { return 0; }
-  int handle_response(int ret, bufferlist::const_iterator& iter) override { return 0; }
+  int handle_response(int ret, bufferlist::const_iterator& iter,
+                     CryptoKey *session_key,
+                     CryptoKey *connection_secret) override { return 0; }
   bool build_rotating_request(bufferlist& bl) const override { return false; }
 
   int get_protocol() const override { return CEPH_AUTH_NONE; }
index b8158f326e282176d212963c03f92db44e066854..0ffa3e50c0e52d559c35121f5e780ef719a62483 100644 (file)
@@ -29,7 +29,9 @@ public:
 
   void prepare_build_request() {}
   int build_request(bufferlist& bl) const { return 0; }
-  int handle_response(int ret, bufferlist::iterator& iter) { return 0; }
+  int handle_response(int ret, bufferlist::iterator& iter,
+                     CryptoKey *session_key,
+                     CryptoKey *connection_secret) { return 0; }
   bool build_rotating_request(bufferlist& bl) const { return false; }
 
   int get_protocol() const { return CEPH_AUTH_UNKNOWN; }
index b69ebddb2c4fa3463b5371f379fc420e40caa8dc..6f0dc40f278599ae6a6a4a60297073bf1af32e18 100644 (file)
@@ -1349,7 +1349,7 @@ int MonConnection::authenticate(MAuthReply *m)
     ldout(cct, 10) << "my global_id is " << m->global_id << dendl;
   }
   auto p = m->result_bl.cbegin();
-  int ret = auth->handle_response(m->result, p);
+  int ret = auth->handle_response(m->result, p, nullptr, nullptr);
   if (ret == -EAGAIN) {
     auto ma = new MAuth;
     ma->protocol = auth->get_protocol();