Keylime
Keylime is an open source, CNCF-hosted remote attestation system built on TPM 2.0. It is the core attestation engine Ratatouille runs on top of. Rather than rebuilding TPM quote verification, IMA log appraisal, and agent lifecycle management, Ratatouille orchestrates Keylime and adds the policy management, GitOps integration, and API layer on top.
Keylime documentation â GitHub
Components
Section titled âComponentsâKeylime has three components. The agent runs on every device being attested. It is a Rust binary that interfaces with the local TPM â producing quotes, registering with the registrar, and streaming IMA log data to the verifier. Ratatouilleâs install script deploys and configures the agent automatically.
The registrar is a central service that holds the enrolled agent inventory and their AIK (Attestation Identity Key) certificates. When an agent enrolls, the registrar verifies its EK certificate against the TPM manufacturerâs CA, establishes the AIK, and records the device.
The verifier continuously polls enrolled agents â by default every ~10 seconds â requesting a fresh TPM quote and IMA log segment. It appraises the quote signature, PCR values, and IMA log entries against the active policy for that agent. Ratatouilleâs verifier adapter wraps Keylimeâs verifier API to pull attestation results and surface them in the dashboard and API.
What Keylime verifies
Section titled âWhat Keylime verifiesâOn each polling cycle, Keylime verifies:
- The TPM quote is signed by the agentâs AIK (proving it came from a registered TPM)
- The quote includes the requested nonce (proving freshness â not a replay)
- PCR values in the quote match expected values (Ratatouille configures PCR[7] for Secure Boot state and PCR[10] for the IMA log)
- IMA log entries hash-extend correctly into PCR[10] (the log hasnât been truncated or tampered with)
- Each IMA log entryâs file hash appears in the active runtime policy (no unknown binaries executed)
If any check fails, the agentâs status is set to FAILED and Ratatouille surfaces the failure immediately.
How Ratatouille uses Keylime
Section titled âHow Ratatouille uses KeylimeâRatatouille treats Keylime as infrastructure. When you enroll a device via rat enroll, the install script:
- Installs and starts the Keylime Rust agent
- The agent registers with Ratatouilleâs registrar
- Ratatouilleâs tenant controller (
keylime_tenant) pushes the active runtime policy to the verifier for that agent - The verifier begins continuous polling
Policy updates (from a signed Git push) are fanned out via keylime_tenant -c update to the verifier, which picks up the new allowed-hash set on the next poll cycle.
Further reading
Section titled âFurther readingâRATS Framework â the IETF architecture Keylime implements. Linux IMA â the kernel subsystem that produces the measurements Keylime verifies. Sigstore / Cosign â how runtime policies are signed before being pushed to Keylime.