You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wrong username or password is currently logged on DEBUG-level. I think this information is more important, so should be logged on a higher level. I think NOTICE could be okay for this.
This would allow to use tools like fail2ban without creating gigantic logfiles.
The text was updated successfully, but these errors were encountered:
heull001
changed the title
Lower loglevel for authentication errors
Higher loglevel for authentication errors
Aug 15, 2023
Unfortunately, the login endpoint always returns 200 OK status, and we cannot change it without breaking backwards compatibility.
So there is currently no nice way to distinguish failures just from that log. (Technically, you could rely on the fact that responses containing wrong username/password have size 52 bytes, while ones without an error field are 16 bytes long. But there is no guarantee that the response sizes will remain the same.)
Ideally, we would create a new API endpoint for signing in that uses separate response codes but that will require more thought (e.g. which response code to use, should we support HTTP authentication…)
Or you could change the following line to jsonError risking clients potentially crashing when incorrect credentials are entered:
Wrong username or password is currently logged on DEBUG-level. I think this information is more important, so should be logged on a higher level. I think NOTICE could be okay for this.
This would allow to use tools like fail2ban without creating gigantic logfiles.
The text was updated successfully, but these errors were encountered: