mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-07-16 05:34:10 +03:00
Non-editable config overriden when using admin page #956
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 @nbdd0121 on GitHub (Feb 26, 2021).
Subject of the issue
If non-editable configs are specified in config.json, it will be lost when configs are saved in the admin page (which, in a sense, made them editable).
Your environment
Steps to reproduce
Expected behaviour
Non-editable configs stay in config.json.
Actual behaviour
Non-editable configs are gone in config.json.
@BlackDex commented on GitHub (Feb 26, 2021):
I'm not following you.
If you add a non-editable manually to the config.json you find it strange that it disappears after you press save??
That sounds illogical, because, they are non-editable they should disappear and only able to work via
export.envor-e.@nbdd0121 commented on GitHub (Feb 27, 2021):
The wiki page makes it sound like the two methods are equivalent (with config.json taking priority) and does not mention about non-editable configs at all (I only know that certain things are non-editable by peeking into config.rs).
Since I would like to make some changes using config.json, by following the recommendation of that wiki page I had all my configurations entirely in config.json and does not set any environment variables. (Personally I would also prefer to use a single config.json because that way all my config is in one place).
I think it is reasonable to expect from the wiki's wording that admin page keeps non-editable configs intact.
@jjlin commented on GitHub (Feb 27, 2021):
My mistake for not clarifying which config items aren't editable via config.json. I'll update the wiki later to mention that read-only config can only be set via environment variable.
@BlackDex commented on GitHub (Feb 27, 2021):
As a side note, if you want to have a single file use the .env file either via docker-compose, or mount that file via
-v /path/to/env-file:/.envThough for changing those settings you need to restart bitwarden.
Also, if you modify the config.json file it will always loose it's contents of you keep bitwarden runnen and press the save button. Because it doesn't reload/re-read that file. It only rewards it during startup and writes during save.