]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
auth/cephx: make some parameters const
authorPatrick Donnelly <pdonnell@ibm.com>
Thu, 29 May 2025 14:01:37 +0000 (10:01 -0400)
committerPatrick Donnelly <pdonnell@ibm.com>
Mon, 26 Jan 2026 15:26:45 +0000 (10:26 -0500)
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
src/auth/cephx/CephxKeyServer.h
src/auth/cephx/CephxProtocol.cc
src/auth/cephx/CephxProtocol.h

index 8db879f275a6f3633aee93a8dd9f8a05c5e3f4a4..5fb7608af6702a2365d79f8fa96c713f35ce872e 100644 (file)
@@ -105,7 +105,7 @@ struct KeyServerData {
     rotating_secrets.clear();
   }
 
-  void add_auth(const EntityName& name, EntityAuth& auth) {
+  void add_auth(const EntityName& name, const EntityAuth& auth) {
     secrets[name] = auth;
   }
 
@@ -315,7 +315,7 @@ public:
     data.version = ver;
   }
 
-  void add_auth(const EntityName& name, EntityAuth& auth) {
+  void add_auth(const EntityName& name, const EntityAuth& auth) {
     std::scoped_lock l{lock};
     data.add_auth(name, auth);
   }
index 683a9a716138bbf0da31d0b0e2a44e8efebf5b25..344916f88984c04aadce8d54e676145b7676482a 100644 (file)
@@ -68,7 +68,7 @@ void cephx_calc_client_server_challenge(CephContext *cct, CryptoKey& secret, uin
  * Authentication
  */
 
-bool cephx_build_service_ticket_blob(CephContext *cct, CephXSessionAuthInfo& info,
+bool cephx_build_service_ticket_blob(CephContext *cct, const CephXSessionAuthInfo& info,
                                     CephXTicketBlob& blob)
 {
   CephXServiceTicketInfo ticket_info;
index 500d93c90cb7bb0880e7d7280bc31b450adb626c..8dbc42ba4a6aead3be21df2e27d249b6ca3d2aef 100644 (file)
@@ -264,8 +264,7 @@ struct CephXSessionAuthInfo {
 };
 
 
-extern bool cephx_build_service_ticket_blob(CephContext *cct,
-                                           CephXSessionAuthInfo& ticket_info, CephXTicketBlob& blob);
+extern bool cephx_build_service_ticket_blob(CephContext *cct, const CephXSessionAuthInfo& ticket_info, CephXTicketBlob& blob);
 
 extern void cephx_build_service_ticket_request(CephContext *cct, 
                                               uint32_t keys,
@@ -602,7 +601,7 @@ extern bool cephx_verify_authorizer(
 static constexpr uint64_t AUTH_ENC_MAGIC = 0xff009cad8826aa55ull;
 
 template <typename T>
-void decode_decrypt_enc_bl(CephContext *cct, T& t, CryptoKey key,
+void decode_decrypt_enc_bl(CephContext *cct, T& t, const CryptoKey& key,
                           const ceph::buffer::list& bl_enc,
                           std::string &error)
 {