@@ -44,9 +44,6 @@ def cherrypy_filter(record: logging.LogRecord) -> bool:
4444
4545class AgentEndpoint :
4646
47- KV_STORE_AGENT_ROOT_CERT = 'cephadm_agent/root/cert'
48- KV_STORE_AGENT_ROOT_KEY = 'cephadm_agent/root/key'
49-
5047 def __init__ (self , mgr : "CephadmOrchestrator" ) -> None :
5148 self .mgr = mgr
5249 self .ssl_certs = SSLCerts ()
@@ -60,14 +57,15 @@ def configure_routes(self) -> None:
6057 cherrypy .tree .mount (self .node_proxy_endpoint , '/node-proxy' , config = conf )
6158
6259 def configure_tls (self , server : Server ) -> None :
63- old_cert = self .mgr .get_store (self .KV_STORE_AGENT_ROOT_CERT )
64- old_key = self .mgr .get_store (self .KV_STORE_AGENT_ROOT_KEY )
60+ old_cert = self .mgr .cert_key_store .get_cert ('agent_endpoint_root_cert' )
61+ old_key = self .mgr .cert_key_store .get_key ('agent_endpoint_key' )
62+
6563 if old_cert and old_key :
6664 self .ssl_certs .load_root_credentials (old_cert , old_key )
6765 else :
6866 self .ssl_certs .generate_root_cert (self .mgr .get_mgr_ip ())
69- self .mgr .set_store ( self . KV_STORE_AGENT_ROOT_CERT , self .ssl_certs .get_root_cert ())
70- self .mgr .set_store ( self . KV_STORE_AGENT_ROOT_KEY , self .ssl_certs .get_root_key ())
67+ self .mgr .cert_key_store . save_cert ( 'agent_endpoint_root_cert' , self .ssl_certs .get_root_cert ())
68+ self .mgr .cert_key_store . save_key ( 'agent_endpoint_key' , self .ssl_certs .get_root_key ())
7169
7270 host = self .mgr .get_hostname ()
7371 addr = self .mgr .get_mgr_ip ()
0 commit comments