pub struct VaultValue {
pub ref: String,
pub subject: String,
pub secret: bool,
pub salt: Vec<u8>,
pub value: Vec<u8>,
}Expand description
A personal or secret value that a command or event keeps outside the signed log. The payload
holds {"$vault": ref} instead, and vault_refs lists the ref. The ref commits to the value:
ref = hex(SHA-256(kernable.v1.vault message)), see SIGNING.md,
over a random salt, the subject, secret and the value, so it reveals nothing once erased.
The kernel keeps values encrypted and deletable, in a vault whose key is derived from the
kernel’s --instance-key; without one, a submit with vault values fails with FAILED_PRECONDITION and a
result with vault values is rejected (no_vault).
Personal values belong to a subject and are erased by an event that erases it; secret
values are deleted when their command completes.
Fields§
§ref: Stringlowercase hex, see above
subject: Stringpersonal: whose value it is; empty for secrets
secret: bool§salt: Vec<u8>16 random bytes, only on writes
value: Vec<u8>the JSON encoding of the field
Trait Implementations§
Source§impl Clone for VaultValue
impl Clone for VaultValue
Source§impl Debug for VaultValue
impl Debug for VaultValue
Source§impl Default for VaultValue
impl Default for VaultValue
impl Eq for VaultValue
Source§impl Hash for VaultValue
impl Hash for VaultValue
Source§impl Message for VaultValue
impl Message for VaultValue
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for VaultValue
impl PartialEq for VaultValue
impl StructuralPartialEq for VaultValue
Auto Trait Implementations§
impl Forget for VaultValue
impl Freeze for VaultValue
impl Move for VaultValue
impl RefUnwindSafe for VaultValue
impl Send for VaultValuewhere
RawVecInner: Send,
impl Sync for VaultValuewhere
RawVecInner: Sync,
impl Unpin for VaultValue
impl UnsafeUnpin for VaultValue
impl UnwindSafe for VaultValuewhere
RawVecInner: UnwindSafe,
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request