From: Kefu Chai Date: Sun, 30 Jun 2019 10:01:13 +0000 (+0800) Subject: crimson: store ticket.peer_global_id in connection X-Git-Tag: v15.1.0~2325^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=23dca207476ad4bf30f52a982b862c7aa056a81a;p=ceph.git crimson: store ticket.peer_global_id in connection peer_global_id is used by `ProtocolV2::_handle_auth_request()` when encoding an `AuthDoneFrame`. Signed-off-by: Kefu Chai --- diff --git a/src/crimson/common/auth_handler.h b/src/crimson/common/auth_handler.h index 521c75d0a42d..922df6486dd1 100644 --- a/src/crimson/common/auth_handler.h +++ b/src/crimson/common/auth_handler.h @@ -11,7 +11,6 @@ class AuthHandler { public: // the peer just got authorized virtual void handle_authentication(const EntityName& name, - uint64_t global_id, const AuthCapsInfo& caps) = 0; virtual ~AuthHandler() = default; }; diff --git a/src/crimson/mon/MonClient.cc b/src/crimson/mon/MonClient.cc index 6bc976f51909..9660e639e934 100644 --- a/src/crimson/mon/MonClient.cc +++ b/src/crimson/mon/MonClient.cc @@ -600,7 +600,7 @@ int Client::handle_auth_request(ceph::net::ConnectionRef con, if (con->get_messenger()->get_require_authorizer()) { return -EACCES; } else { - auth_handler.handle_authentication({}, {}, {}); + auth_handler.handle_authentication({}, {}); return 1; } } @@ -619,7 +619,6 @@ int Client::handle_auth_request(ceph::net::ConnectionRef con, ceph_assert(active_con); bool was_challenge = (bool)auth_meta->authorizer_challenge; EntityName name; - uint64_t global_id; AuthCapsInfo caps_info; bool is_valid = ah->verify_authorizer( &cct, @@ -628,13 +627,13 @@ int Client::handle_auth_request(ceph::net::ConnectionRef con, auth_meta->get_connection_secret_length(), reply, &name, - &global_id, + &active_con->get_conn()->peer_global_id, &caps_info, &auth_meta->session_key, &auth_meta->connection_secret, &auth_meta->authorizer_challenge); if (is_valid) { - auth_handler.handle_authentication(name, global_id, caps_info); + auth_handler.handle_authentication(name, caps_info); return 1; } if (!more && !was_challenge && auth_meta->authorizer_challenge) { diff --git a/src/crimson/osd/osd.cc b/src/crimson/osd/osd.cc index c76da4e3c49c..5515ee35be7c 100644 --- a/src/crimson/osd/osd.cc +++ b/src/crimson/osd/osd.cc @@ -481,8 +481,7 @@ seastar::future<> OSD::ms_handle_remote_reset(ceph::net::ConnectionRef conn) } void OSD::handle_authentication(const EntityName& name, - uint64_t global_id, - const AuthCapsInfo& caps) + const AuthCapsInfo& caps) { // todo } diff --git a/src/crimson/osd/osd.h b/src/crimson/osd/osd.h index 7b55b6e311ba..1d12d70fbd24 100644 --- a/src/crimson/osd/osd.h +++ b/src/crimson/osd/osd.h @@ -105,7 +105,6 @@ class OSD final : public ceph::net::Dispatcher, // AuthHandler methods void handle_authentication(const EntityName& name, - uint64_t global_id, const AuthCapsInfo& caps) final; ceph::osd::ShardServices shard_services; diff --git a/src/test/crimson/test_monc.cc b/src/test/crimson/test_monc.cc index fd43fb86ddc4..fc3984f81191 100644 --- a/src/test/crimson/test_monc.cc +++ b/src/test/crimson/test_monc.cc @@ -14,7 +14,6 @@ namespace { class DummyAuthHandler : public ceph::common::AuthHandler { public: void handle_authentication(const EntityName& name, - uint64_t global_id, const AuthCapsInfo& caps) final {} };