diff --git a/services/identity/src/config.rs b/services/identity/src/config.rs --- a/services/identity/src/config.rs +++ b/services/identity/src/config.rs @@ -1,12 +1,12 @@ use curve25519_dalek::ristretto::RistrettoPoint; use opaque_ke::{errors::PakeError, keypair::KeyPair}; -use std::{env, fs, io, path::Path}; +use std::{env, fmt, fs, io, path::Path}; use crate::constants::{ SECRETS_DIRECTORY, SECRETS_FILE_EXTENSION, SECRETS_FILE_NAME, }; -#[derive(Debug, Clone)] +#[derive(Clone)] pub struct Config { pub server_keypair: KeyPair, } @@ -24,6 +24,14 @@ } } +impl fmt::Debug for Config { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("Config") + .field("server_keypair", &"redacted") + .finish() + } +} + #[derive( Debug, derive_more::Display, derive_more::From, derive_more::Error, )]