mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
chore(relay): don't log all AUTH errors on WARN (#7506)
Not all authentication errors are warnings that we need to be alerted about.
This commit is contained in:
@@ -850,7 +850,15 @@ where
|
||||
.verify(&self.auth_secret, username.name(), SystemTime::now()) // This is impure but we don't need to control this in our tests.
|
||||
.map_err(|e| {
|
||||
let (error_response, msg) = make_error_response(Unauthorized, request);
|
||||
tracing::warn!(target: "relay", "{msg}: MessageIntegrity check failed: {e}");
|
||||
|
||||
match e {
|
||||
auth::Error::UnknownNonce | auth::Error::NonceUsedUp | auth::Error::Expired | auth::Error::InvalidPassword => {
|
||||
tracing::debug!(target: "relay", "{msg}: MessageIntegrity check failed: {e}");
|
||||
},
|
||||
auth::Error::CannotAuthenticate(_) | auth::Error::InvalidUsername => {
|
||||
tracing::warn!(target: "relay", "{msg}: MessageIntegrity check failed: {e}")
|
||||
},
|
||||
}
|
||||
|
||||
error_response
|
||||
})?;
|
||||
|
||||
Reference in New Issue
Block a user