Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read config vars from files #1244

Merged
merged 1 commit into from
Nov 29, 2020

Conversation

janost
Copy link
Contributor

@janost janost commented Nov 29, 2020

Fixes #1194.

This is a better implementation of the change previously posted in #1235.

This change allows the user to read configuration variable values from arbitrary files by using the _FILE suffix in environment variables.

@dani-garcia
Copy link
Owner

Looks good to me, I also mostly agree with @BlackDex said here: #1235 (comment).

Reloading is a nice feature but the main problem is there are some settings that aren't reloadable on the fly, and until rocket async we don't have a way to restart the server itself, so it will mean it will work for some settings and not others.

If a user is loading the config from a file, it probably won't make much sense to let them set the value in the admin page config, because they probably want to control where and how the value is stored. At the same time, that's something they can themselves look for and be careful around it.

Also, maybe in this case we should completely disable the option to see the secrets from the admin page?

We should consider what we are going to do about that before the next release, or at least leave it as an undocumented feature until we have all those corners fleshed out.

Thanks!

@dani-garcia dani-garcia merged commit 9824d94 into dani-garcia:master Nov 29, 2020
@janost janost deleted the read-config-from-files branch November 29, 2020 15:32
@BlackDex BlackDex mentioned this pull request Dec 2, 2020
61 tasks
thelittlefireman pushed a commit to thelittlefireman/bitwarden_rs that referenced this pull request Mar 19, 2021
@ahmaddxb
Copy link

ahmaddxb commented Feb 9, 2023

I tried doing this but it didn't work

    environment:
       - ADMIN_TOKEN_FILE=/run/secrets/vaultwarden_admin_token

@BlackDex
Copy link
Collaborator

BlackDex commented Feb 9, 2023

@ahmaddxb , if you ever used the /admin interface to save settings, those env/file items are being overwritten.

@ahmaddxb
Copy link

ahmaddxb commented Feb 9, 2023

I got it work i was missing this,

    secrets:
      - vaultwarden_admin_token

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker Secret on SMTP_PASSWORD
4 participants