local-encrypt: document unattended/headless threat model#852
Merged
Conversation
Contributor
|
The changes in this PR will be included in the next version bump.
|
commit: |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
varlock-website | 89e72cb | Commit Preview URL Branch Preview URL |
Jul 06 2026, 07:18 PM |
philmillman
approved these changes
Jul 3, 2026
621a344 to
150a701
Compare
Adds a threat-model section to the local-encryption guide: TPM-sealed unattended decryption for headless/CI hosts, what it protects at rest vs. a process already running as your user, and that the Linux presence gate is a consent prompt rather than an at-rest boundary (the TPM unseal isn't bound to polkit). Backend-comment and encrypt-note code changes from the original version are dropped here — they landed via #854 (Windows TPM support).
150a701 to
89e72cb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What & why
Documents the threat model for varlock's local encryption in headless / unattended environments — the posture was real but implicit and undocumented.
This started from a real question (a self-hoster storing a 1Password service account token as "secret-zero" on a headless Ubuntu box, hand-rolling TPM sealing via
systemd-creds). Digging in surfaced that we already do exactly this natively: on Linux with a TPM the key seals to the TPM andvarlock loaddecrypts unattended, with zero setup. The gap was never "make it work headless" — it's that the unattended posture happens implicitly (whenever no presence gate is set up) and was never written down.Changes
systemd-credssetup --linux-biometricsas the opt-in presence gate for interactive machinesDesign decision: no opt-in gate
We considered gating unattended decrypt behind an explicit opt-in (refuse-by-default unless a flag says unattended is intended) and decided against it:
setup --linux-biometricsstep). "No gate" is the deliberate default, not a silent downgrade.So the right move was honesty (docs), not a gate.
Follow-up (not in this PR)
Fail-open edge. A machine that had a presence gate and loses it (polkit removed,
pkcheckgone) silently falls through to unattended decrypt instead of prompting. Because the Linux gate is consent-grade, the security delta is ~nil — but the lost consent prompt is a real UX surprise. The planned fix is a per-machine "a gate was configured here" marker + a TTY-only warning when it disappears (never on headless/CI, to keep deploys quiet) — deliberately not per-key (staleness trap). This would cover Linux and the now-merged Windows path together, so it's tracked as a unified follow-up rather than bolted onto this docs PR.