]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
auth registry: helpers for checking secure method/mode
authorYehuda Sadeh <yehuda@redhat.com>
Fri, 6 Mar 2020 06:04:52 +0000 (22:04 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 6 Mar 2020 06:17:31 +0000 (22:17 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/auth/AuthRegistry.h

index 4be051ee17110cf990e433fedae65cd5db33e234..fd746c791114392115935c89c114f7b690c5b03c 100644 (file)
@@ -60,6 +60,14 @@ public:
                     uint32_t auth_method,
                     const std::vector<uint32_t>& preferred_modes);
 
+  static bool is_secure_method(uint32_t method) {
+    return (method == CEPH_AUTH_CEPHX);
+  }
+
+  static bool is_secure_mode(uint32_t mode) {
+    return (mode == CEPH_CON_MODE_SECURE);
+  }
+
   AuthAuthorizeHandler *get_handler(int peer_type, int method);
 
   const char** get_tracked_conf_keys() const override;