mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-09-01 01:38:19 +00:00
cli: hide secret env values in help (#1418)
Closes #1417. Co-authored-by: bnjoroge1 <bnjoroge1@users.noreply.git.deuxfleurs.fr> Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1418
This commit is contained in:
+16
-3
@@ -19,7 +19,12 @@ pub struct Secrets {
|
|||||||
|
|
||||||
/// RPC secret network key, used to replace `rpc_secret` in config.toml when running the
|
/// RPC secret network key, used to replace `rpc_secret` in config.toml when running the
|
||||||
/// daemon or doing admin operations
|
/// daemon or doing admin operations
|
||||||
#[structopt(short = "s", long = "rpc-secret", env = "GARAGE_RPC_SECRET")]
|
#[structopt(
|
||||||
|
short = "s",
|
||||||
|
long = "rpc-secret",
|
||||||
|
env = "GARAGE_RPC_SECRET",
|
||||||
|
hide_env_values = true
|
||||||
|
)]
|
||||||
pub rpc_secret: Option<String>,
|
pub rpc_secret: Option<String>,
|
||||||
|
|
||||||
/// RPC secret network key, used to replace `rpc_secret` in config.toml and rpc-secret
|
/// RPC secret network key, used to replace `rpc_secret` in config.toml and rpc-secret
|
||||||
@@ -29,7 +34,11 @@ pub struct Secrets {
|
|||||||
|
|
||||||
/// Admin API authentication token, replaces `admin.admin_token` in config.toml when
|
/// Admin API authentication token, replaces `admin.admin_token` in config.toml when
|
||||||
/// running the Garage daemon
|
/// running the Garage daemon
|
||||||
#[structopt(long = "admin-token", env = "GARAGE_ADMIN_TOKEN")]
|
#[structopt(
|
||||||
|
long = "admin-token",
|
||||||
|
env = "GARAGE_ADMIN_TOKEN",
|
||||||
|
hide_env_values = true
|
||||||
|
)]
|
||||||
pub admin_token: Option<String>,
|
pub admin_token: Option<String>,
|
||||||
|
|
||||||
/// Admin API authentication token file path, replaces `admin.admin_token` in config.toml
|
/// Admin API authentication token file path, replaces `admin.admin_token` in config.toml
|
||||||
@@ -39,7 +48,11 @@ pub struct Secrets {
|
|||||||
|
|
||||||
/// Metrics API authentication token, replaces `admin.metrics_token` in config.toml when
|
/// Metrics API authentication token, replaces `admin.metrics_token` in config.toml when
|
||||||
/// running the Garage daemon
|
/// running the Garage daemon
|
||||||
#[structopt(long = "metrics-token", env = "GARAGE_METRICS_TOKEN")]
|
#[structopt(
|
||||||
|
long = "metrics-token",
|
||||||
|
env = "GARAGE_METRICS_TOKEN",
|
||||||
|
hide_env_values = true
|
||||||
|
)]
|
||||||
pub metrics_token: Option<String>,
|
pub metrics_token: Option<String>,
|
||||||
|
|
||||||
/// Metrics API authentication token file path, replaces `admin.metrics_token` in config.toml
|
/// Metrics API authentication token file path, replaces `admin.metrics_token` in config.toml
|
||||||
|
|||||||
Reference in New Issue
Block a user