mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-31 09:18:28 +00:00
feat(kms): wire OperationContext into an audit event contract (#5534)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user