[][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.


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

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

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

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(
    policy_name: &str,
    engine: &VaultEngine,
    key: &str,
    capabilities: &[Capability]
) -> Result<(), Error>

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(
    name: &str,
    engine: &VaultEngine,
    policy: &Policy
) -> Result<(), Error>

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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