diff --git a/.github/workflows/docker_images.yml b/.github/workflows/docker_images.yml.disabled similarity index 100% rename from .github/workflows/docker_images.yml rename to .github/workflows/docker_images.yml.disabled diff --git a/kanidm_proto/src/v1.rs b/kanidm_proto/src/v1.rs index fa52c7fa3..c75f67b41 100644 --- a/kanidm_proto/src/v1.rs +++ b/kanidm_proto/src/v1.rs @@ -332,13 +332,23 @@ impl ModifyRequest { // // On loginSuccess, we send a cookie, and that allows the token to be // generated. The cookie can be shared between servers. -#[derive(Debug, Serialize, Deserialize)] +#[derive(Serialize, Deserialize)] pub enum AuthCredential { Anonymous, Password(String), TOTP(u32), } +impl fmt::Debug for AuthCredential { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + match self { + AuthCredential::Anonymous => write!(fmt, "Anonymous"), + AuthCredential::Password(_) => write!(fmt, "Password(_)"), + AuthCredential::TOTP(_) => write!(fmt, "TOTP(_)"), + } + } +} + #[derive(Debug, Serialize, Deserialize)] pub enum AuthStep { // name, application id? diff --git a/kanidmd/src/lib/async_log.rs b/kanidmd/src/lib/async_log.rs index 46577cc32..a35947700 100644 --- a/kanidmd/src/lib/async_log.rs +++ b/kanidmd/src/lib/async_log.rs @@ -66,7 +66,7 @@ impl Handler for EventLog { type Result = (); fn handle(&mut self, event: AuditScope, _: &mut SyncContext) -> Self::Result { - debug!("audit: {}", event); + info!("{}", event); } } diff --git a/kanidmd/src/lib/entry.rs b/kanidmd/src/lib/entry.rs index 983f9dcd5..a544548d7 100644 --- a/kanidmd/src/lib/entry.rs +++ b/kanidmd/src/lib/entry.rs @@ -252,7 +252,6 @@ fn compare_attrs( /// [`access`]: ../access/index.html /// [`event`]: ../event/index.html /// -#[derive(Debug)] pub struct Entry { valid: VALID, state: STATE, @@ -260,6 +259,17 @@ pub struct Entry { attrs: BTreeMap>, } +impl std::fmt::Debug for Entry +where + STATE: std::fmt::Debug, +{ + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + f.debug_struct("Entry") + .field("state", &self.state) + .finish() + } +} + impl std::fmt::Display for Entry { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { write!(f, "{}", self.get_uuid()) @@ -341,7 +351,14 @@ impl Entry { es: &str, qs: &mut QueryServerWriteTransaction, ) -> Result { - ltrace!(audit, "Parsing -> {}", es); + if cfg!(test) { + if es.len() > 256 { + let (dsp_es, _) = es.split_at(255); + ltrace!(audit, "Parsing -> {}...", dsp_es); + } else { + ltrace!(audit, "Parsing -> {}", es); + } + } // str -> Proto entry let pe: ProtoEntry = try_audit!( audit, diff --git a/kanidmd/src/lib/idm/server.rs b/kanidmd/src/lib/idm/server.rs index 7e1872bfd..cd392c4b0 100644 --- a/kanidmd/src/lib/idm/server.rs +++ b/kanidmd/src/lib/idm/server.rs @@ -130,7 +130,7 @@ impl<'a> IdmServerWriteTransaction<'a> { ae: &AuthEvent, ct: Duration, ) -> Result { - ltrace!(au, "Received AuthEvent -> {:?}", ae); + ltrace!(au, "Received -> {:?}", ae); // Match on the auth event, to see what we need to do. diff --git a/kanidmd/src/lib/value.rs b/kanidmd/src/lib/value.rs index 9b01321e1..381ad48cd 100644 --- a/kanidmd/src/lib/value.rs +++ b/kanidmd/src/lib/value.rs @@ -202,13 +202,23 @@ impl fmt::Display for SyntaxType { } } -#[derive(Debug, Clone)] +#[derive(Clone)] pub enum DataValue { Cred(Credential), SshKey(String), RadiusCred(String), } +impl std::fmt::Debug for DataValue { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + DataValue::Cred(_) => write!(f, "DataValue::Cred(_)"), + DataValue::SshKey(_) => write!(f, "DataValue::SshKey(_)"), + DataValue::RadiusCred(_) => write!(f, "DataValue::RadiusCred(_)"), + } + } +} + #[derive(Debug, Clone, Eq, Ord, PartialOrd, PartialEq, Deserialize, Serialize)] pub enum PartialValue { Utf8(String),