Closed rdslw closed 1 month ago
Not sure what we can do here. Vaultwarden stores what it receives. I find the steps a bit strange but will try to reproduce it.
Are you sure you didn't mixed and the Vaultwarden KDF settings with the account KDF settings? Those are two totally different items.
Thanks for fast reply.
as to reproducability: problem no2 (webvault shows different values just on clicking PKDF2 vs argon type) shall be easy to reproduce, as it happens on newest v1.32.2. Can provide short video here if interested to see it.
As to the problem no1 (different value in sqlite users table vs what webvault shows) and popup warning -> I'm not sure when it started, probably earlier. while on v1.3?.*
I understand that users table, and webavult (settings -> security -> keys) both shows account KDF settings. Am I correct?
where can I check/see Vaultwarden KDF settings? config.json + /admin ?
Also the kdf can't change without user interaction. Else you wouldn't be able to login again anymore.
The Vaultwarden kdf is visible in the admin settings
ok, so what I'm seeing is relevant to the account KDF settings.
To summarize:
problem 1: popup shows, even if KDF settings (as verified in sqlite) are 700007
problem 2: values shown for KDF settings are wrong (settings -> security -> keys)
a. I have 700007 as sqlite shows b. go to the settings>security>keys: I see there 100000 as current KDF c. while being there, change PBKDF2 to argontype, and back (NB: just clicking, no clicking 'change kdf' button. d. KDF shows 600000 (vaultwarden default)
Again, which column are you looking at? Since I am not able to reproduce this at all using the steps you mentioned.
I have done the following. For the database i used this query:
SELECT uuid, password_iterations, client_kdf_type, client_kdf_iter, client_kdf_memory, client_kdf_parallelism FROM users
docker run -it -e DISABLE_ADMIN_TOKEN=true -v "${PWD}/tmp:/data" -p8080:80 docker.io/bitwardenrs/server:1.20.0
docker run -it -e DISABLE_ADMIN_TOKEN=true -v "${PWD}/tmp:/data" -p8080:80 ghcr.io/dani-garcia/vaultwarden:1.32.2
Database results: | version | uuid | password_iterations | client_kdf_type | client_kdf_iter | client_kdf_memory | client_kdf_parallelism |
---|---|---|---|---|---|---|---|
v1.20.0 | 5ce61ca9-9694-40ee-bac2-017851ff8637 | 100000 | 0 | 100000 | - | - | |
v1.20.0 | 5ce61ca9-9694-40ee-bac2-017851ff8637 | 100000 | 0 | 700007 | - | - | |
v1.32.2 | 5ce61ca9-9694-40ee-bac2-017851ff8637 | 600000 | 0 | 700007 | NULL | NULL |
I Did the same but then started from v1.29.2 which is the last v1.2* verison.
docker run -it -e DISABLE_ADMIN_TOKEN=true -v "${PWD}/tmp:/data" -p8080:80 ghcr.io/dani-garcia/vaultwarden:1.29.2
docker run -it -e DISABLE_ADMIN_TOKEN=true -v "${PWD}/tmp:/data" -p8080:80 ghcr.io/dani-garcia/vaultwarden:1.32.2
Database results: | version | uuid | password_iterations | client_kdf_type | client_kdf_iter | client_kdf_memory | client_kdf_parallelism |
---|---|---|---|---|---|---|---|
v1.29.0 | cd1b2ee6-aac0-4345-a1a6-20946df19c4d | 600000 | 0 | 600000 | NULL | NULL | |
v1.29.0 | cd1b2ee6-aac0-4345-a1a6-20946df19c4d | 600000 | 0 | 700007 | NULL | NULL | |
v1.32.2 | cd1b2ee6-aac0-4345-a1a6-20946df19c4d | 600000 | 0 | 700007 | NULL | NULL |
I was originally looking at passwords_iterations column.
Here is result of your query run now. sqlite> SELECT uuid, password_iterations, client_kdf_type, client_kdf_iter, client_kdf_memory, client_kdf_parallelism FROM users ...> ; X1..e3|100000|0|100000|| X2..12|700007|0|900009|| X3..e4|700007|0|100000||
Looks like problem no1 was my mistake of X2 vs X3 user, which with problem no2 make me no trusting values shown. sorry for that. shall probably change issue title to "KDF values shown wrong in webavult upon selecting different algo type"
Looks like only problem 2 exists, on both users (X2 and X3).
How to reproduce:
use current version v1.32.2
login to webavaul
go to settings/security/keys, see:
switch algorithm type to argon, DO NOT click button 'change kdf', see:
switch again algorithm type to PBKDF2, see wrong iterations:
problem no2 visible here: iterations is now 600000 while was 100000 on step 3. User iterations is 100000.
Well, that seems like a UI client issue, and it shows the default recommend value. If you do not click on save then it will still be 100_000 unless you save of course.
As this is a web-vault/client issue, and this project does not maintain or develop those, it's not something we can fix (easily).
If anything, I would suggest to check and verify if this also happens on the Bitwarden Cloud environment, if so, report this in there client repo on GitHub. Else it might be fixed already in a version newer than v2024.6.2, which Vaultwarden does not (yet) support.
As this is a client issue, I'm going to move this to a discussion.
Vaultwarden Build Version
v1.32.2
Deployment method
Other method
Custom deployment method
personalized docker container
Reverse Proxy
none
Host/Server Operating System
Linux
Clients
Web Vault
Client Version
firefox 131.0.3
Steps To Reproduce
Expected Result
Actual Result
sqlite> select email,password_iterations from users; x1@x1|100000 x2@x2|700007 x3@x3|700007
Above steps used login x2. Login x3 also shows bug no 2 (wrong value upon type switching), while there was popup, but was dismissed and does not appear again, ALTHOUGH kdf was not changed.
I'm not sure in which version it happenes.
Logs
No response
Screenshots or Videos
No response
Additional Context
No response