From d9c170e51da80622fa4018687d4e4db0df1aa406 Mon Sep 17 00:00:00 2001 From: Tim Bruijnzeels Date: Thu, 29 Apr 2021 08:36:49 +0200 Subject: [PATCH] Migrate re-issuance of ROAs and Child Certificates as part of pre 0.9.0 Publish Commands. (#501) --- src/commons/api/history.rs | 12 +++++------- src/daemon/ca/commands.rs | 2 +- src/upgrades/v0_9_0/old_commands.rs | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/commons/api/history.rs b/src/commons/api/history.rs index cf8ec85e..c960b2f7 100644 --- a/src/commons/api/history.rs +++ b/src/commons/api/history.rs @@ -460,8 +460,7 @@ pub enum StorableCaCommand { RoaDefinitionUpdates { updates: RoaDefinitionUpdates, }, - AutomaticRoaRenewal, - Republish, + ReissueBeforeExpiring, RepoUpdate { service_uri: ServiceUri, }, @@ -550,12 +549,12 @@ impl WithStorableDetails for StorableCaCommand { StorableCaCommand::RoaDefinitionUpdates { updates } => CommandSummary::new("cmd-ca-roas-updated", &self) .with_added(updates.added().len()) .with_removed(updates.removed().len()), - StorableCaCommand::AutomaticRoaRenewal => CommandSummary::new("cmd-ca-roas-renewed", &self), - StorableCaCommand::Republish => CommandSummary::new("cmd-ca-publish", &self), StorableCaCommand::RepoUpdate { service_uri } => { CommandSummary::new("cmd-ca-repo-update", &self).with_service_uri(service_uri) } + StorableCaCommand::ReissueBeforeExpiring => CommandSummary::new("cmd-ca-reissue-before-expiring", &self), + // RTA StorableCaCommand::RtaPrepare { name } => { CommandSummary::new("cmd-ca-rta-prepare", &self).with_rta_name(name) @@ -683,14 +682,13 @@ impl fmt::Display for StorableCaCommand { } Ok(()) } - StorableCaCommand::AutomaticRoaRenewal => { - write!(f, "Automatically re-issue ROAs before they would expire") + StorableCaCommand::ReissueBeforeExpiring => { + write!(f, "Automatically re-issue objects before they would expire") } // ------------------------------------------------------------ // Publishing // ------------------------------------------------------------ - StorableCaCommand::Republish => write!(f, "Republish"), StorableCaCommand::RepoUpdate { service_uri } => write!(f, "Update repo to server at: {}", service_uri), // ------------------------------------------------------------ diff --git a/src/daemon/ca/commands.rs b/src/daemon/ca/commands.rs index 13c3a129..8d9deebb 100644 --- a/src/daemon/ca/commands.rs +++ b/src/daemon/ca/commands.rs @@ -244,7 +244,7 @@ impl From for StorableCaCommand { CmdDet::RouteAuthorizationsUpdate(updates, _, _) => StorableCaCommand::RoaDefinitionUpdates { updates: updates.into(), }, - CmdDet::RouteAuthorizationsRenew(_, _) => StorableCaCommand::AutomaticRoaRenewal, + CmdDet::RouteAuthorizationsRenew(_, _) => StorableCaCommand::ReissueBeforeExpiring, // ------------------------------------------------------------ // Publishing diff --git a/src/upgrades/v0_9_0/old_commands.rs b/src/upgrades/v0_9_0/old_commands.rs index 98708ba9..58d3895b 100644 --- a/src/upgrades/v0_9_0/old_commands.rs +++ b/src/upgrades/v0_9_0/old_commands.rs @@ -245,7 +245,7 @@ impl From for StorableCaCommand { StorableCaCommand::KeyRollFinish { resource_class_name } } OldStorableCaCommand::RoaDefinitionUpdates(updates) => StorableCaCommand::RoaDefinitionUpdates { updates }, - OldStorableCaCommand::Republish => StorableCaCommand::Republish, + OldStorableCaCommand::Republish => StorableCaCommand::ReissueBeforeExpiring, OldStorableCaCommand::RepoUpdate(_service_uri) => { unreachable!("migrated differently getting the service uri for embedded repo") }