From 7895f99d3afc6e97f62f52abe06a6ee8d0f0617f Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 14 Jun 2023 16:56:15 +0200 Subject: admin and cli: hide secret keys unless asked --- src/garage/cli/structs.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/garage/cli') diff --git a/src/garage/cli/structs.rs b/src/garage/cli/structs.rs index 2547fb8d..05d2ea31 100644 --- a/src/garage/cli/structs.rs +++ b/src/garage/cli/structs.rs @@ -328,7 +328,7 @@ pub enum KeyOperation { /// Get key info #[structopt(name = "info", version = garage_version())] - Info(KeyOpt), + Info(KeyInfoOpt), /// Create new key #[structopt(name = "create", version = garage_version())] @@ -356,9 +356,12 @@ pub enum KeyOperation { } #[derive(Serialize, Deserialize, StructOpt, Debug)] -pub struct KeyOpt { +pub struct KeyInfoOpt { /// ID or name of the key pub key_pattern: String, + /// Whether to display the secret key + #[structopt(long = "show-secret")] + pub show_secret: bool, } #[derive(Serialize, Deserialize, StructOpt, Debug)] -- cgit v1.2.3