feat(kms): bulk DEK rekey sweep with admin API and kms:Rekey action (#6654)

This commit is contained in:
唐小鸭
2026-08-26 18:19:28 +08:00
committed by GitHub
parent ff47714363
commit 286626c1bd
16 changed files with 823 additions and 8 deletions
+7
View File
@@ -712,6 +712,12 @@ pub enum KmsAction {
/// Preflight or execute a KMS restore.
#[strum(serialize = "kms:Restore")]
RestoreAction,
/// Run the bulk rekey sweep that rewraps stored object DEK envelopes onto
/// current master key versions. Cluster-scoped: it walks and rewrites
/// object metadata across buckets, so it is never conferred by a per-key
/// role template.
#[strum(serialize = "kms:Rekey")]
RekeyAction,
}
#[cfg(test)]
@@ -754,6 +760,7 @@ mod tests {
("kms:Decrypt", KmsAction::DecryptAction),
("kms:Backup", KmsAction::BackupAction),
("kms:Restore", KmsAction::RestoreAction),
("kms:Rekey", KmsAction::RekeyAction),
] {
let action = Action::try_from(raw).expect("Should parse KMS action");
assert_eq!(action, Action::KmsAction(expected));
+2 -1
View File
@@ -854,13 +854,14 @@ mod test {
/// Actions that act on the service or on every key's material at once. No role
/// template may confer them.
const KMS_CLUSTER_ADMIN_ACTIONS: [KmsAction; 6] = [
const KMS_CLUSTER_ADMIN_ACTIONS: [KmsAction; 7] = [
KmsAction::AllActions,
KmsAction::ConfigureAction,
KmsAction::ServiceControlAction,
KmsAction::ClearCacheAction,
KmsAction::BackupAction,
KmsAction::RestoreAction,
KmsAction::RekeyAction,
];
const KMS_ROLE_TEMPLATES: [&str; 3] = [default::KMS_KEY_ADMINISTRATOR, default::KMS_KEY_USER, default::KMS_AUDITOR];