Local key agent: daemon, Rust client library and toy consumer. One crate per backend mechanism; the SQLite dummy backend first.
  • Rust 93.4%
  • Shell 4.2%
  • Python 1.5%
  • Dockerfile 0.5%
  • Ruby 0.4%
Find a file
Rémy Sanchez e278c9a876
[WVR-180] Let the security agent fix what an upgrade breaks (#23)
The point of the model is to take the highest usable dependency, not the smallest one that silences the advisory: allow a semver-incompatible bump, edit source/tests when the upgrade breaks them, commit the whole tree, and record a Fixes section. It still may not edit its own workflows or add an ignore instead of fixing the issue. Also add packaging/security-cron.sh and the systemd/cron recipe, because GitHub schedule has been delaying or dropping hourly slots by hours in this repository.
2026-11-08 07:06:48 +01:00
.github [WVR-180] Let the security agent fix what an upgrade breaks (#23) 2026-11-08 07:06:48 +01:00
crates [WVR-155] Make the socket-activated listener non-blocking 2026-10-18 14:06:27 +02:00
debian [WVR-155] Build the packages with the latest stable Rust; test the 1.94 floor separately 2026-10-18 17:34:30 +02:00
docs [WVR-180] Let the security agent fix what an upgrade breaks (#23) 2026-11-08 07:06:48 +01:00
packaging [WVR-180] Let the security agent fix what an upgrade breaks (#23) 2026-11-08 07:06:48 +01:00
.gitignore [WVR-156] Backends as separate packages, loaded at run time 2026-10-18 13:20:03 +02:00
AGENTS.md [WVR-179] Automate the 0.1 APT release and add the security bot (#12) 2026-11-08 00:18:58 +01:00
Cargo.lock [security] Fix RustSec advisories for 0.1.1 (#20) 2026-11-08 01:09:32 +01:00
Cargo.toml [security] Fix RustSec advisories for 0.1.1 (#20) 2026-11-08 01:09:32 +01:00
DECISIONS.md [WVR-155] Build the packages with the latest stable Rust; test the 1.94 floor separately 2026-10-18 17:34:30 +02:00
deny.toml [WVR-180] Prefer the highest version the tests allow (#21) 2026-11-08 01:28:39 +01:00
LICENSE [WVR-140] Bootstrap tpmd workspace and dummy backend 2026-10-14 22:12:41 +02:00
README.md [WVR-155] Package tpmd for Debian, with a nightly channel beside a stable one 2026-10-18 13:20:00 +02:00
rust-toolchain.toml [WVR-140] Bootstrap tpmd workspace and dummy backend 2026-10-14 22:12:41 +02:00
rustfmt.toml [WVR-140] Bootstrap tpmd workspace and dummy backend 2026-10-14 22:12:41 +02:00

tpmd

tpmd is a local key agent: a daemon that owns private signing keys and signs on behalf of local applications, so applications never hold or export private key material. Applications talk to it over a local IPC channel using the tpmd-client Rust library.

This workspace builds four backends behind one interface: the dummy engine (a software P-256 store in SQLite, level file), the OS credential store (level keyring, on every platform), the Linux TPM (sealed and hardware) and the Windows CNG Platform Crypto Provider (hardware). The consumer contract — daemon, IPC protocol, client library and a toy consumer — is the same for all of them.

Workspace layout

Crate Role
tpmd-proto Serializable messages, Postcard frame codec, limits, version negotiation. No OS or storage dependencies.
tpmd-backend The Backend trait (async, object-safe), SecurityLevel, Principal and the error taxonomy.
tpmd-store SeaORM entities and migrations for the one SQLite file every backend shares.
tpmd-backend-dummy SQLite software P-256 store (level file).
tpmd-backend-keyring OS credential store (level keyring): Secret Service, login keychain or Credential Manager, one store per OS.
tpmd-backend-linux-tpm Linux TPM 2.0 store (levels sealed and hardware), hand-rolled transport, no libtss2.
tpmd-backend-windows-cng Windows CNG Platform Crypto Provider store (level hardware), all FFI in one module.
tpmd-ipc Cross-platform local endpoint: Unix socket, macOS socket, Windows named pipe, with native caller authentication.
tpmd The daemon: serve loop, caller authentication, namespace and floor enforcement, backend registry and selection, CLI.
tpmd-client The consumer API, hiding the transport.
tpmd-demo A toy consumer that walks the Tunnel Weaver key life-cycle with a simulated relay.

Quick start (Linux / macOS)

# terminal 1 — start the agent against a scratch state directory
cargo run -p tpmd -- serve --state-dir /tmp/tpmd-demo

# terminal 2 — run the toy life-cycle
cargo run -p tpmd-demo -- --state-dir /tmp/tpmd-demo run

See docs/demo.md for the full walk-through, including the Windows commands.

License

Apache-2.0. See LICENSE.