]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon/Monitor: require authorizer from peer monitors
authorSage Weil <sage@redhat.com>
Fri, 26 Apr 2019 18:07:06 +0000 (13:07 -0500)
committerSage Weil <sage@redhat.com>
Fri, 26 Apr 2019 18:07:18 +0000 (13:07 -0500)
Mon to mon links use authorizers.  It's only non-mons connecting to mons
that use MAuth messages.

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/Monitor.cc

index c03328e56cc333e4e4218e6e48230a02d4470b3e..55231f60bf6e30534cf57ad10ac39b071d1c068b 100644 (file)
@@ -6188,9 +6188,11 @@ int Monitor::handle_auth_request(
           << " payload " << payload.length()
           << dendl;
   if (!payload.length()) {
-    if (!con->is_msgr2()) {
-      // for v1 connections, we tolerate no authorizer, because authentication
-      // happens via MAuth messages.
+    if (!con->is_msgr2() &&
+       con->get_peer_type() != CEPH_ENTITY_TYPE_MON) {
+      // for v1 connections, we tolerate no authorizer (from
+      // non-monitors), because authentication happens via MAuth
+      // messages.
       return 1;
     }
     return -EACCES;