Add verbose logging for message integrity.
This commit is contained in:
parent
95c06a4dae
commit
d02771b4f8
@ -204,8 +204,12 @@ impl<S: CredentialStore + Clone> AuthManager<S> {
|
|||||||
return AuthStatus::Granted { username, key };
|
return AuthStatus::Granted { username, key };
|
||||||
}
|
}
|
||||||
|
|
||||||
let key_hex = hex::encode(&key);
|
// No acceptance without MI validation.
|
||||||
warn!("auth reject: bad credentials username={} realm={} peer={} a1_md5={} (debug)", username, realm, peer, key_hex);
|
let mi_attr = find_message_integrity(msg).map(|a| hex::encode(&a.value));
|
||||||
|
let mi_long = hex::encode(&crate::stun::compute_message_integrity(&key, msg.raw.as_slice()));
|
||||||
|
let mi_short = hex::encode(&crate::stun::compute_message_integrity(short_key, msg.raw.as_slice()));
|
||||||
|
warn!("auth reject: bad credentials username={} realm={} peer={} a1_md5={} mi_attr={:?} mi_long(fullmsg)={} mi_short(fullmsg)={}",
|
||||||
|
username, realm, peer, hex::encode(&key), mi_attr, mi_long, mi_short);
|
||||||
AuthStatus::Reject {
|
AuthStatus::Reject {
|
||||||
code: 401,
|
code: 401,
|
||||||
reason: "Bad Credentials",
|
reason: "Bad Credentials",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user