Closed zyphlar closed 4 years ago
So if I understand well, you have never been able to use your bitwarden instance ? Maybe you should remove and reinstall bitwarden
By the way, the real admintoken used by bitwarden is stored in /var/www/bitwarden/live/bitwarden_rs.env
so check this one.
you can also check bitwarden services running journalctl -feu bitwarden
when trying to log, you will se what happens
Thanks @yalh76 the ADMIN_TOKEN listed at that location is the same and also doesn't work. The journalctl command just confirms "Invalid admin token". Is there a good way of kicking bitwarden or debugging its process to get it to work or see why it's broken? I'm an experienced admin/programmer but I use yunohost so I don't need to dig into the internals, thus now I'm ignorant of the internals ;)
I have been able to use bitwarden, I use it every day and it's great, I'm just now hitting a brick wall trying to login as an admin (because I want to add a new user, which I'm also struggling with)
Do you still have the original email sent during install with the admin token to see if it has changed ?
The issue comes after and upgrade or you don't know ?
I don't see an original email with token in my inbox, the token is very long and random so it's possible I generated and entered it myself. I haven't tried to login to the admin side in many months so I'm unsure if an upgrade was the cause but the most recent upgrade was not the cause; I noticed the issue, upgraded, and the issue persisted. Do you know how to reboot bitwarden specifically? It's not listed in init.d On Sat, 2020-06-27 at 09:09 -0700, yalh76 wrote:
Do you still have the original email sent during install with the admin token to see if it has changed ? The issue comes after and upgrade or you don't know ?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I rebooted the server and tried again, but the contents of bitwarden_rs.env
's ADMIN_TOKEN=cMAfqcLfznW6dryKD4UiKpmfVylMXtzNEz9zqtYLLIEBh6B8NUvSVgsII1bSqrGC
(as an example, not my real token) still fails to login. The logs say Jul 16 23:14:48 <my_domain> bitwarden_rs[1000]: Error: Invalid admin token. IP: <my_ip>
What part of the codebase reads this ADMIN_TOKEN and compares the entered token to the configured token? Maybe I can debug.
FYI the top of the logs say this, maybe that has something to do with it. Is there another config file besides bitwarden_rs.env?
Jul 16 22:49:28 <my_domain> bitwarden_rs[1000]: [WARNING] The following environment variables are being overriden by the config file,
Jul 16 22:49:28 <my_domain> bitwarden_rs[1000]: [WARNING] please use the admin panel to make changes to them:
Jul 16 22:49:28 <my_domain> bitwarden_rs[1000]: [WARNING] DOMAIN, SIGNUPS_ALLOWED, ADMIN_TOKEN, SMTP_HOST, SMTP_SSL, SMTP_PORT, SMTP_FROM, SMTP_FROM_NAME
EDIT: found it. The real admin token was here: /var/www/bitwarden/live/data/config.json
-- we can close this ticket, or maybe update documentation to suggest these two file paths and logs as ways to help others figure out what their admin tokens are.
Well I made a fresh bitwarden install, and there is no /var/www/bitwarden/live/data/config.json
, I don't know where that file comes from in your installation
I may have changed the config via the web interface. If you change the admin token in the admin interface, maybe the config file gets created but the ENV files aren't updates?
On Wed, Jul 22, 2020, 1:51 PM yalh76 notifications@github.com wrote:
Well I made a fresh bitwarden install, and there is no /var/www/bitwarden/live/data/config.json, I don't know where that file comes from in your installation
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/YunoHost-Apps/bitwarden_ynh/issues/85#issuecomment-662689893, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAL2MWBGT7OOSK66JA7KALR45GOFANCNFSM4ODV6JYQ .
Yes exactly, when some change are made, they are stored in the /var/www/bitwarden/live/data/config.json
. So you may have changed your token, that could explain why you wasn't able to connect.
I have the token saved, and confirmed the token in
/etc/yunohost/apps/bitwarden/settings.yml
, but even copy-pasting it straight out of the settings with no whitespace results in a login error. Any ideas? Otherwise bitwarden seems to work fine. It's exhibiting this behavior before the latest version upgrade and also afterwards.Here's a screenshot:
Here are the nginx error logs:
Access logs: