pub struct EncryptionPolicyEngine { /* private fields */ }Expand description
Engine that registers encryption policies and validates keys/configurations against them.
Implementations§
Source§impl EncryptionPolicyEngine
impl EncryptionPolicyEngine
Sourcepub fn add_policy(&mut self, policy: EncryptionPolicy)
pub fn add_policy(&mut self, policy: EncryptionPolicy)
Register a policy. Replaces any existing policy with the same id.
Sourcepub fn validate_key(
&self,
key: &Key,
policy_id: &str,
) -> Result<PolicyValidationResult, PolicyError>
pub fn validate_key( &self, key: &Key, policy_id: &str, ) -> Result<PolicyValidationResult, PolicyError>
Validate a key against a policy.
Checks:
- key size >=
min_key_size - key algorithm is in
required_algorithms - key age (days since
created_at) <key_rotation_interval_days
Sourcepub fn validate_encryption_at_rest(
&self,
encrypted: bool,
policy_id: &str,
) -> Result<PolicyValidationResult, PolicyError>
pub fn validate_encryption_at_rest( &self, encrypted: bool, policy_id: &str, ) -> Result<PolicyValidationResult, PolicyError>
Validate whether encryption at rest is present when required by a policy.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EncryptionPolicyEngine
impl RefUnwindSafe for EncryptionPolicyEngine
impl Send for EncryptionPolicyEngine
impl Sync for EncryptionPolicyEngine
impl Unpin for EncryptionPolicyEngine
impl UnsafeUnpin for EncryptionPolicyEngine
impl UnwindSafe for EncryptionPolicyEngine
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.