[][src]Struct secret_keeper_cloudkms::CloudKmsKeeper

pub struct CloudKmsKeeper { /* fields omitted */ }

SecretKeeper implementation that uses Google Cloud KMS for key storage

Implementations

impl CloudKmsKeeper[src]

pub async fn new_default() -> Result<Self, Error>[src]

Constructs a new Google Cloud KMS keeper with default options

pub async fn new(_opt: CloudKmsOptions) -> Result<Self, Error>[src]

Constructs a new google CloudKMS keeper

pub async fn register(self) -> Result<(), Error>[src]

register with SecretKeeper so it can be discovered with SecretKeeper::for_uri

Trait Implementations

impl Create for CloudKmsKeeper[src]

fn create_key<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    key_name: &'life1 str,
    params: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

Creates the key. key_name is any valid key name params are url-encoded parameters that can be created with serde_urlencoded

Params:

  • 'parent' : /PROJECT/LOCATION/KEYRING

impl Debug for CloudKmsKeeper[src]

Implement Debug that skips Token

impl Display for CloudKmsKeeper[src]

Implement Display that skips Token

impl<'a> SecretKeeper for CloudKmsKeeper[src]

fn wrap<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 self,
    uri: &'life1 str,
    _nonce: &'life2 [u8],
    key: &'life3 [u8]
) -> Pin<Box<dyn Future<Output = Result<WrappedKey, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
[src]

Sends key to cloud to be encrypted. key-encryption-key never leavs the Hashicorp vault. Returned encrypted key is a string

fn unwrap<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    _nonce: &'life1 [u8],
    wk: &'life2 WrappedKey
) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

Sends key to hashicorp vault to be decrypted. key-encryption-key never leavs the Hashicorp vault.

fn get_scheme(&self) -> &str[src]

Returns the scheme 'hashivault'

fn as_create(&self) -> Result<&dyn Create, Error>[src]

Returns instance of Create

impl Sync for CloudKmsKeeper[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]