[][src]Struct libra_secure_storage::VaultStorage

pub struct VaultStorage { /* fields omitted */ }

VaultStorage utilizes Vault for maintaining encrypted, authenticated data for Libra. This version currently matches the behavior of OnDiskStorage and InMemoryStorage. In the future, Vault will be able to create keys, sign messages, and handle permissions across different services. The specific vault service leveraged herein is called KV (Key Value) Secrets Engine - Version 2 (https://www.vaultproject.io/api/secret/kv/kv-v2.html). So while Libra Secure Storage calls pointers to data keys, Vault has actually a secret that contains multiple key value pairs.

Implementations

impl VaultStorage[src]

pub fn new(
    host: String,
    token: String,
    namespace: Option<String>,
    certificate: Option<String>,
    renew_ttl_secs: Option<u32>,
    use_cas: bool
) -> Self
[src]

pub fn revoke_token_self(&self) -> Result<(), Error>[src]

pub fn get_all_key_versions(
    &self,
    name: &str
) -> Result<Vec<ReadResponse<Ed25519PublicKey>>, Error>
[src]

pub fn create_token(&self, policies: Vec<&str>) -> Result<String, Error>[src]

Creates a token but uses the namespace for policies

pub fn set_policy(
    &self,
    policy_name: &str,
    engine: &VaultEngine,
    key: &str,
    capabilities: &[Capability]
) -> Result<(), Error>
[src]

Create a new policy in Vault, see the explanation for Policy for how the data is structured. Vault does not distingush a create and update. An update must first read the existing policy, amend the contents, and then be applied via this API.

pub fn set_policies(
    &self,
    name: &str,
    engine: &VaultEngine,
    policy: &Policy
) -> Result<(), Error>
[src]

Trait Implementations

impl CryptoStorage for VaultStorage[src]

impl From<VaultStorage> for Storage[src]

impl KVStorage for VaultStorage[src]

impl TryInto<VaultStorage> for Storage[src]

type Error = &'static str

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for VaultStorage

impl Send for VaultStorage

impl Sync for VaultStorage

impl Unpin for VaultStorage

impl UnwindSafe for VaultStorage

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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

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>,