pub struct VaultState {
pub users: Vec<User>,
pub api_keys: Vec<(UserId, ApiKey)>,
pub bootstrapped: bool,
pub master_secret: Option<Vec<u8>>,
pub kv: HashMap<String, String>,
}Expand description
Serializable snapshot of all auth state (users, api keys, bootstrap seal, the master secret for the certificate-based seal, and a key-value store for arbitrary encrypted secrets).
Fields§
§users: Vec<User>§api_keys: Vec<(UserId, ApiKey)>(owner UserId, api_key) pairs. The owner carries tenant scope
so an API key under (acme, alice) reattaches to the correct
user when a same-named user exists in another tenant.
bootstrapped: bool§master_secret: Option<Vec<u8>>The 32-byte master secret stored inside the encrypted vault.
Present after bootstrap; None for legacy vaults that pre-date
the certificate seal system.
kv: HashMap<String, String>Arbitrary encrypted key-value store for secrets.
Keys use dot-notation with red.secret.* prefix (e.g., “red.secret.aes_key”).
Values are hex-encoded bytes or UTF-8 strings.
Implementations§
Source§impl VaultState
impl VaultState
Sourcepub fn deserialize(data: &[u8]) -> Result<Self, VaultError>
pub fn deserialize(data: &[u8]) -> Result<Self, VaultError>
Deserialize the vault state from the text payload format.
Trait Implementations§
Source§impl Debug for VaultState
impl Debug for VaultState
Source§impl Default for VaultState
impl Default for VaultState
Source§fn default() -> VaultState
fn default() -> VaultState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for VaultState
impl RefUnwindSafe for VaultState
impl Send for VaultState
impl Sync for VaultState
impl Unpin for VaultState
impl UnsafeUnpin for VaultState
impl UnwindSafe for VaultState
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
Mutably borrows from an owned value. Read more
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> 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 moreSource§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>
Wrap the input message
T in a tonic::Request