commit d181c27f55708984f67fbfb7384347ab3aed79bf
parent b07692e148c6e139a25ec5dd2f14b7459419b3ee
Author: triesap <tyson@radroots.org>
Date: Mon, 6 Apr 2026 23:27:49 +0000
cli: remove dead identity generate config
Diffstat:
7 files changed, 0 insertions(+), 39 deletions(-)
diff --git a/src/cli.rs b/src/cli.rs
@@ -17,10 +17,6 @@ pub struct CliArgs {
pub no_log_stdout: bool,
#[arg(long, global = true)]
pub identity_path: Option<PathBuf>,
- #[arg(long = "allow-generate-identity", global = true, action = ArgAction::SetTrue)]
- pub allow_generate_identity: bool,
- #[arg(long = "no-allow-generate-identity", global = true, action = ArgAction::SetTrue)]
- pub no_allow_generate_identity: bool,
#[arg(long, global = true)]
pub signer_backend: Option<String>,
#[arg(long, global = true)]
@@ -112,7 +108,6 @@ mod tests {
"--log-stdout",
"--identity-path",
"identity.local.json",
- "--allow-generate-identity",
"--signer-backend",
"myc",
"--myc-executable",
@@ -137,7 +132,6 @@ mod tests {
.and_then(|path| path.to_str()),
Some("identity.local.json")
);
- assert!(parsed.allow_generate_identity);
assert_eq!(parsed.signer_backend.as_deref(), Some("myc"));
assert_eq!(
parsed
diff --git a/src/commands/runtime.rs b/src/commands/runtime.rs
@@ -23,7 +23,6 @@ pub fn show(config: &RuntimeConfig, logging: &LoggingState) -> RuntimeShowView {
},
identity: IdentityRuntimeView {
path: config.identity.path.display().to_string(),
- allow_generate: config.identity.allow_generate,
},
signer: SignerRuntimeView {
backend: config.signer.backend.as_str().to_owned(),
diff --git a/src/domain/runtime.rs b/src/domain/runtime.rs
@@ -86,7 +86,6 @@ pub struct LoggingRuntimeView {
#[derive(Debug, Clone, Serialize)]
pub struct IdentityRuntimeView {
pub path: String,
- pub allow_generate: bool,
}
#[derive(Debug, Clone, Serialize)]
diff --git a/src/render/mod.rs b/src/render/mod.rs
@@ -79,11 +79,6 @@ fn render_human(output: &CommandOutput) -> Result<(), RuntimeError> {
)?;
writeln!(stdout, "identity")?;
writeln!(stdout, " path: {}", view.identity.path)?;
- writeln!(
- stdout,
- " allow generate: {}",
- yes_no(view.identity.allow_generate)
- )?;
writeln!(stdout, "signer")?;
writeln!(stdout, " backend: {}", view.signer.backend)?;
writeln!(stdout, "myc")?;
@@ -255,7 +250,6 @@ mod tests {
},
identity: IdentityConfig {
path: "identity.json".into(),
- allow_generate: false,
},
signer: SignerConfig {
backend: SignerBackend::Local,
diff --git a/src/runtime/config.rs b/src/runtime/config.rs
@@ -9,7 +9,6 @@ const ENV_LOG_FILTER: &str = "RADROOTS_LOG_FILTER";
const ENV_LOG_DIR: &str = "RADROOTS_LOG_DIR";
const ENV_LOG_STDOUT: &str = "RADROOTS_LOG_STDOUT";
const ENV_IDENTITY_PATH: &str = "RADROOTS_IDENTITY_PATH";
-const ENV_IDENTITY_ALLOW_GENERATE: &str = "RADROOTS_IDENTITY_ALLOW_GENERATE";
const ENV_SIGNER_BACKEND: &str = "RADROOTS_SIGNER_BACKEND";
const ENV_MYC_EXECUTABLE: &str = "RADROOTS_MYC_EXECUTABLE";
@@ -38,7 +37,6 @@ pub struct LoggingConfig {
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct IdentityConfig {
pub path: PathBuf,
- pub allow_generate: bool,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
@@ -121,15 +119,6 @@ impl RuntimeConfig {
.clone()
.or_else(|| env.var(ENV_IDENTITY_PATH).map(PathBuf::from))
.unwrap_or_else(|| PathBuf::from("identity.json")),
- allow_generate: resolve_bool_pair(
- args.allow_generate_identity,
- args.no_allow_generate_identity,
- ENV_IDENTITY_ALLOW_GENERATE,
- false,
- env,
- "--allow-generate-identity",
- "--no-allow-generate-identity",
- )?,
},
signer: SignerConfig {
backend: args
@@ -242,7 +231,6 @@ mod tests {
"--log-stdout",
"--identity-path",
"custom-identity.json",
- "--allow-generate-identity",
"--signer-backend",
"local",
"--myc-executable",
@@ -258,10 +246,6 @@ mod tests {
"RADROOTS_IDENTITY_PATH".to_owned(),
"env-identity.json".to_owned(),
),
- (
- "RADROOTS_IDENTITY_ALLOW_GENERATE".to_owned(),
- "false".to_owned(),
- ),
("RADROOTS_SIGNER_BACKEND".to_owned(), "myc".to_owned()),
("RADROOTS_MYC_EXECUTABLE".to_owned(), "env-myc".to_owned()),
]));
@@ -274,7 +258,6 @@ mod tests {
resolved.identity.path,
PathBuf::from("custom-identity.json")
);
- assert!(resolved.identity.allow_generate);
assert_eq!(resolved.signer.backend, SignerBackend::Local);
assert_eq!(resolved.myc.executable, PathBuf::from("bin/myc-cli"));
}
@@ -294,10 +277,6 @@ mod tests {
"RADROOTS_IDENTITY_PATH".to_owned(),
"state/identity.json".to_owned(),
),
- (
- "RADROOTS_IDENTITY_ALLOW_GENERATE".to_owned(),
- "true".to_owned(),
- ),
("RADROOTS_SIGNER_BACKEND".to_owned(), "myc".to_owned()),
("RADROOTS_MYC_EXECUTABLE".to_owned(), "bin/myc".to_owned()),
]));
@@ -311,7 +290,6 @@ mod tests {
);
assert!(resolved.logging.stdout);
assert_eq!(resolved.identity.path, PathBuf::from("state/identity.json"));
- assert!(resolved.identity.allow_generate);
assert_eq!(resolved.signer.backend, SignerBackend::Myc);
assert_eq!(resolved.myc.executable, PathBuf::from("bin/myc"));
}
diff --git a/tests/identity_commands.rs b/tests/identity_commands.rs
@@ -86,7 +86,6 @@ fn identity_show_json_reports_unconfigured_without_creating_identity() {
"--json",
"--identity-path",
identity_path.to_str().expect("identity path"),
- "--allow-generate-identity",
"identity",
"show",
])
diff --git a/tests/runtime_show.rs b/tests/runtime_show.rs
@@ -32,7 +32,6 @@ fn runtime_show_json_reflects_environment_configuration() {
.env("RADROOTS_LOG_DIR", "logs/runtime")
.env("RADROOTS_LOG_STDOUT", "false")
.env("RADROOTS_IDENTITY_PATH", "state/identity.json")
- .env("RADROOTS_IDENTITY_ALLOW_GENERATE", "true")
.env("RADROOTS_SIGNER_BACKEND", "myc")
.env("RADROOTS_MYC_EXECUTABLE", "bin/myc")
.args(["runtime", "show"])
@@ -45,7 +44,6 @@ fn runtime_show_json_reflects_environment_configuration() {
assert_eq!(json["logging"]["filter"], "debug");
assert_eq!(json["logging"]["directory"], "logs/runtime");
assert_eq!(json["identity"]["path"], "state/identity.json");
- assert_eq!(json["identity"]["allow_generate"], true);
assert_eq!(json["signer"]["backend"], "myc");
assert_eq!(json["myc"]["executable"], "bin/myc");
}