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
secrets can be passed directly in config, as file, or as env
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
656b8d42de
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
fixes for pr 499
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
80e2326998
lx merged commit d14678e0ac into main 2023-02-06 14:18:59 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#499
No description provided.