refactor(kms): share a KMS client for all KMS operations (#744)

This commit is contained in:
Sanchith Hegde
2023-03-15 21:53:38 +05:30
committed by GitHub
parent 5c9bec9f53
commit a3ff2e8d4f
14 changed files with 347 additions and 306 deletions

View File

@ -313,6 +313,18 @@ pub enum VaultError {
UnexpectedResponseError(bytes::Bytes),
}
#[derive(Debug, thiserror::Error)]
pub enum KmsError {
#[error("Failed to base64 decode input data")]
Base64DecodingFailed,
#[error("Failed to KMS decrypt input data")]
DecryptionFailed,
#[error("Missing plaintext KMS decryption output")]
MissingPlaintextDecryptionOutput,
#[error("Failed to UTF-8 decode decryption output")]
Utf8DecodingFailed,
}
#[derive(Debug, thiserror::Error)]
pub enum ProcessTrackerError {
#[error("An unexpected flow was specified")]