Secrets can be passed directly in config, as file, or as env #499

Merged
lx merged 2 commits from config-files-env into main 2023-02-06 14:18:59 +00:00
Owner
  • rpc_secret, metrics_token and admin_token now also have file and env versions
  • files are checked to not be world-readable, unless special flag is set

Fix #449

- [x] rpc_secret, metrics_token and admin_token now also have file and env versions - [x] files are checked to not be world-readable, unless special flag is set Fix #449
lx added 1 commit 2023-02-03 14:29:55 +00:00
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
656b8d42de
secrets can be passed directly in config, as file, or as env
lx reviewed 2023-02-06 10:59:46 +00:00
@ -420,3 +421,3 @@
You can use any random string for this value. We recommend generating a random token with `openssl rand -hex 32`.
### `admin_token` (since version 0.7.2)
`metrics_token` was introduced in Garage version 0.7.2.
Author
Owner

v0.7.2

v0.7.2
@ -65,1 +65,4 @@
#[derive(StructOpt, Debug)]
pub struct Secrets {
/// RPC secret network key, used to replace rpc_secret in config.toml when running the daemon or doing admin operations
Author
Owner

split comment

split comment
@ -187,1 +191,3 @@
(Some(_), None) => {
secret_from_file(
&mut parsed_config.rpc_secret,
&mut parsed_config.rpc_secret_file,
Author
Owner

second argument not mut

second argument not mut
lx added 1 commit 2023-02-06 11:24:23 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
80e2326998
fixes for pr 499
lx merged commit d14678e0ac into main 2023-02-06 14:18:59 +00:00
Sign in to join this conversation.
No description provided.