mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-01 11:19:52 +03:00
Logs missing for wrong logins #699
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Jungack on GitHub (May 4, 2020).
Hello,
I am trying to turn on logging. I am running Debian 10 and Bitwarden_rs with MariaDB, all behind Nginx proxy using shauder config from https://github.com/dani-garcia/bitwarden_rs/wiki/Proxy-examples.
(I have only added two lines and removed the auth basic thing for admin page. This are the added lines :
access_log /var/log/nginx/bitwarden.access;error_log /var/log/nginx/bitwarden.error;)I also use systemd according to your wiki : https://github.com/dani-garcia/bitwarden_rs/wiki/Setup-as-a-systemd-service. My installation directory is
/opt/bitwarden_rs/target/release/: in fact, I did not move any files.So here is the problem : I activated the logs according to this wiki page : https://github.com/dani-garcia/bitwarden_rs/wiki/Logging. So I have edited the
.envfile in/opt/bitwarden_rs/target/release/.envand enabledLOG_FILE=/data/bitwarden.logwhich I set toLOG_FILE=/opt/bitwarden_rs/target/release/data/bitwarden_rs.log. I have then enabledEXTENDED_LOGGING=true. All the other options concerning logging were removed. When I start Bitwarden_rs usingsudo systemctl start bitwarden_rs.service, orcargo run --features mysql --release, It logs It in the file I mentionned. When I have created a new user, It also logs It.However, when I try fail attempts, It does not anything. How is It possible? I want to set up Fail2ban up, but can't do anything yet and looked for a solution for several hours now. Thanks for help !
@mqus commented on GitHub (May 4, 2020):
I'm not aware of the particulars of Fail2Ban but here is my setup where I do get the failed logins from bitwarden:
I use it with systemd and the service file as written in the wiki. I'm using caddy but the reverse proxy should not be important for that. I don't have Extended logging enabled and don't log the output of bitwarden_rs to a file but let it print everything. systemd picks it up from there automatically:
I see it in
after starting it with
systemctl start bitwarden_rs.I'm currently running bitwarden_rs v1.14, haven't updated it yet. What version are you using? Do you see other logs from that failed login, like the ones in my case before the error?
I think fail2ban can also look at the output of systemd/journalctl but simple files should also work. If you have any other questions regarding the
.service file, let me know, I wrote that wiki entry ;-)@Jungack commented on GitHub (May 4, 2020):
Ok sorry, I just found the problem after many hours huuh ! It was because I was testing with random letters. Bitwarden only logs failed attempts based on the @ letter. I did not put It for tests for hours now owo (Maybe because on french keyboards It requires two buttons to tap an @ 😣). So much time lost 😂... Thank you anyway for your very fast answer !
@mqus commented on GitHub (May 4, 2020):
Yeah in that case I get an "Invalid email adress" error in the web client, which probably doesn't even get sent to the server.
