feat(kms): wire OperationContext into an audit event contract (#5534)

This commit is contained in:
Zhengchao An
2026-08-01 12:12:00 +08:00
committed by GitHub
parent 2d8ad5caee
commit 5a6e850c67
14 changed files with 1498 additions and 21 deletions
+15
View File
@@ -130,6 +130,21 @@ pub enum KmsBackend {
Static,
}
impl KmsBackend {
/// Stable identifier for logs, metrics, and audit records.
///
/// External consumers key off these values, so treat them as a wire
/// contract rather than a rendering detail.
pub fn as_str(&self) -> &'static str {
match self {
KmsBackend::VaultKv2 => "vault-kv2",
KmsBackend::VaultTransit => "vault-transit",
KmsBackend::Local => "local",
KmsBackend::Static => "static",
}
}
}
/// Main KMS configuration
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct KmsConfig {