Skip to main content

Module snapshot_store

Module snapshot_store 

Source
Expand description

Where the snapshot signing key lives (snapshot-auth.ts loadSnapshotKey, secretToolKeyring): ULTRON_RLM_SNAPSHOT_KEY_STORE = file (default) keeps <agentDir>/rlm-snapshot.key; auto moves the key into the OS keyring when one answers (through libsecret’s secret-tool), leaving a marker file; keyring insists on the keyring and otherwise uses a key for this process only. Exposure reduction, not secrecy: model code runs as the same user. secret-tool is found on the session’s PATH only, and runs with the session’s desktop variables.

Structs§

LoadedSnapshotKey
SecretToolKeyring
The login keyring through secret-tool (GNOME Keyring, KWallet’s Secret Service, KeePassXC), keyed by the resolved profile directory. A call that does not answer within the timeout (an unlock prompt nobody answers) counts as unavailable, and is killed.

Enums§

KeySource
Where a loaded key lives: the OS keyring, the profile file, or only this process (its snapshots do not outlive it).
KeyStore

Constants§

RLM_SNAPSHOT_KEY_STORE_ENV
SNAPSHOT_KEYRING_MARKER
Marker left in place of the key file once the key lives in the OS keyring; it holds no secret.

Traits§

SnapshotKeyring
A secret store outside the profile directory (SnapshotKeyring).

Functions§

load_snapshot_key
loadSnapshotKey: the per-profile key from the store store selects. In auto mode a reachable keyring takes over the key (an existing key file is copied in, read back, and deleted, and a marker records it); once the marker exists an unreachable keyring gives a key for this process only, with a warning, so no second persistent key is ever made.
secret_tool_keyring
secretToolKeyring(agentDir) over the session environment var: secret-tool from its PATH, a 5 s timeout.
session_snapshot_key
The key a session’s kernels sign snapshots with (session-worker.ts: loadSnapshotKey(getAgentDir()), its warning on stderr): the store from ULTRON_RLM_SNAPSHOT_KEY_STORE, the keyring through the session environment’s secret-tool. None when the key cannot be loaded (the kernel then uses a process key).

Type Aliases§

Lookup
What a keyring lookup found: None when the store cannot be reached (no Secret Service, locked keyring, a timeout), Some(None) when it holds no key.