mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-05-24 09:03:15 -05:00
Hashed admin token not replacing plain text token #5183
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 @tommyalatalo on GitHub (Mar 27, 2023).
Subject of the issue
After updating to 1.28.0 and hashing the admin token with argon2 I keep getting a notice in the startup logs:
It seems that the plain text admin token is stored in vaultwarden internally and is not being overwritten when replacing
ADMIN_TOKENwith a hashed value.Deployment environment
Steps to reproduce
ADMIN_TOKENto hashed token and restart VaultwardenADMIN_TOKENset to a hashed tokenExpected behaviour
Vaultwarden would take the hashed token and be happy, at least if the unhashed value is the actual password value.
Actual behaviour
Vaultwarden logs incorrect information about configured ADMIN_TOKEN values
@BlackDex commented on GitHub (Mar 27, 2023):
You used the admin interface to save settings. This creates a
config.jsonfile which overrules all ENV variables.As is stated both during startup and in the admin interface at the top.
Either login into the admin interface, and replace the token there and press save. Or make sure all changed settings are converted to ENV variables and remove the
config.json.