Expand description
The process-wide vault session and its audit.
One VaultSession per forge process, built from [vault] at boot and
swapped on a reload that changes the section. It owns the tokens and the
derived keys; the connector holds neither. A call the server rejects with
401 tries the refresh token, and only a failed refresh locks the session
and makes the next held call ask for the master password. [vault] idle_minutes, when set, locks an unused session on its first read after
the bound.
The master password never enters this struct. It arrives with one answer, is used to derive the master key, and is zeroized before the answer is dropped.
Re-exportsΒ§
use std::path::Path;πuse std::path::PathBuf;πuse forge_connectors::vault::crypto;πuse forge_connectors::vault::crypto::Unlocked;πuse forge_connectors::vault::models::Prelogin;πuse forge_connectors::vault::models::SyncData;πuse forge_connectors::vault::models::TokenResponse;πuse forge_connectors::vault::models::TwoFactorCode;πuse forge_connectors::vault::VaultClient;πuse forge_connectors::vault::VaultError;πuse forge_primitives::vault::VaultReleased;πuse forge_primitives::vault::VaultTool;πuse serde_json::Value;πuse zeroize::Zeroize;πuse zeroize::Zeroize;πuse zeroize::Zeroizing;πuse crate::SessionSlot;πuse crate::config::VaultConfig;πuse crate::protocol::SessionUpdate;πuse crate::update_fanout::UpdateFanout;π
StructsΒ§
- Audit
File π - Session
State π - The sessionβs live half: the tokens and the derived keys, or neither.
- Tokens π
- The access and refresh tokens one unlock produced.
- Vault
Audit π - The append-only audit file, rotated 10 MB x 6.
- Vault
Session π - One process-wide Vaultwarden session.
- Vault
State - The shared vault session as a view draws it: whether it is locked and the idle bound the config set.
ConstantsΒ§
- AUDIT_
MAX_ πBYTES - AUDIT_
MAX_ πFILES
FunctionsΒ§
- production_
client π - The production vault clients: the machineβs extra TLS roots,
https_only, the accountβs own user agent, and the vault familyβs bounds. The download client takes a longer read and total bound because an attachment is opaque ciphertext up to the serverβs cap. - rotate π
- rotated_
path π