mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-26 01:35:54 +03:00
[GH-ISSUE #1114] Deleting the admin_token in the webpanel deletes the whole admin_token key in the config.json file #787
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#787
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 @szaimen on GitHub (Aug 25, 2020).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1114
Subject of the issue
Deleting the admin_token in the webpanel deletes the whole admin_token key in the config.json file
To reproduce:
Your environment
Steps to reproduce
Expected behaviour
Instead of deleting the whole key, it should just restore the default admin_token to the config.json file
(set the value of admin_token to the password-string that was set during the initial startup)
Actual behaviour
it just deletes the whole key, so that this key is missing from the json file.
Relevant logs
@dani-garcia commented on GitHub (Aug 28, 2020):
What do you mean the default admin token? By default it's disabled, if you configure it with an environment variable, then deleting it from the admin page will use the value from the environment variable, but it won't save it to disk.
@szaimen commented on GitHub (Aug 30, 2020):
What I mean is the following:
I guess better whould be, if it was just changed back to the initial value and not just deleted
@szaimen commented on GitHub (Aug 30, 2020):
On the other hand: if the initial admin_token is stored inside the database, I guess it is completely okay, to do it this way.So is the initial admin_token stored inside the database?
Edit: it doesn't seem to be the case.
@BlackDex commented on GitHub (Oct 9, 2020):
@szaimen, but are you still able to login using the default admin key set as an env to login? Or are you not able to login at all anymore?
@szaimen commented on GitHub (Oct 10, 2020):
Yes, this works but it is bad for restore scenarios if you use docker (not docker-compose) and have lost the initial password.
@BlackDex commented on GitHub (Oct 11, 2020):
If you use docker then you just lookup the env value in the configuration. Or you start a new docker with a different admin token.
Removing the token means no access at all. So even if we did disregard the env value, you can't login at all anymore. So that is probably as worse as reverting to the previous token.
@BlackDex commented on GitHub (Oct 11, 2020):
ps, if you really want to extract the current env values from a linux host, you could use
@szaimen commented on GitHub (Oct 11, 2020):
Hey, thanks for the advices! These don't fix the problem but I guess you are not willing to implement this. I will have to workaround this differently. So closing!