File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
packages/cipherstash-proxy/src Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -217,8 +217,7 @@ impl TandemConfig {
217217 }
218218 } ) ?;
219219
220- ClientKey :: from_hex_v1 ( config. encrypt . client_id , & config. encrypt . client_key )
221- . map_err ( |e| ConfigError :: InvalidClientKey ( e. into ( ) ) ) ?;
220+ config. encrypt . build_client_key ( ) ?;
222221
223222 Ok ( config)
224223 }
@@ -313,7 +312,7 @@ impl TandemConfig {
313312 } ,
314313 encrypt : EncryptConfig {
315314 client_id : Uuid :: parse_str ( "00000000-0000-0000-0000-000000000001" ) . unwrap ( ) ,
316- client_key : "test " . to_string ( ) ,
315+ client_key : "a4627031a16b7065726d75746174696f6e900e05030d0608090007020c04010b0a0f6770325f66726f6da16b7065726d75746174696f6e900608000a0204030f01070d090e0b0c056570325f746fa16b7065726d75746174696f6e90000908060701030a05040e020d0b0c0f627033a16b7065726d75746174696f6e982107181d130d05181f08040a181c1002181e010311181818200b0f0e0915181b0c16171819060012181a14 " . to_string ( ) ,
317316 default_keyset_id : Some (
318317 Uuid :: parse_str ( "00000000-0000-0000-0000-000000000000" ) . unwrap ( ) ,
319318 ) ,
@@ -327,7 +326,7 @@ impl TandemConfig {
327326}
328327
329328impl EncryptConfig {
330- pub fn client_key ( & self ) -> Result < ClientKey , Error > {
329+ pub fn build_client_key ( & self ) -> Result < ClientKey , Error > {
331330 ClientKey :: from_hex_v1 ( self . client_id , & self . client_key )
332331 . map_err ( |e| ConfigError :: InvalidClientKey ( e. into ( ) ) . into ( ) )
333332 }
Original file line number Diff line number Diff line change @@ -19,9 +19,12 @@ pub(crate) fn init_zerokms_client(config: &TandemConfig) -> Result<ZerokmsClient
1919 . with_access_key ( & config. auth . client_access_key )
2020 . with_workspace_crn ( config. auth . workspace_crn . clone ( ) )
2121 . detect ( )
22- . map_err ( |_| ZeroKMSError :: AuthenticationFailed ) ?;
22+ . map_err ( |e| {
23+ tracing:: warn!( target: "zerokms" , msg = "ZeroKMS authentication strategy detection failed" , error = %e) ;
24+ ZeroKMSError :: AuthenticationFailed
25+ } ) ?;
2326
24- let client_key = config. encrypt . client_key ( ) ?;
27+ let client_key = config. encrypt . build_client_key ( ) ?;
2528
2629 let builder = ZeroKMSBuilder :: new ( strategy) ;
2730 Ok ( builder. with_client_key ( client_key) . build ( ) ?)
You can’t perform that action at this time.
0 commit comments