Backend#
The pages of Integrations describe export targets
shirudo can use and alert on. This section describes a reference backend: it checks
every keepalive’s TPM quote and compares what each target reports with the
upatch tree it follows. It lives in tools/backend/: an OpenTelemetry Collector
configuration, a ClickHouse schema, the jobs that load trees and SBOMs,
and their tests. It is also what the end-to-end tests of shirudo itself
run against, at the scale of many nodes and many upatches, which
validates the event structure and the workflows with a working backend.
A target only sends its keepalive to the collector it is configured with, and nothing on the target depends on the backend. The backend does make it possible to test many nodes and to validate resource requirements. Start from it and adapt retention, access control, sizing and features for your deployment.
What it does#
An OpenTelemetry Collector configuration that writes every keepalive to ClickHouse, where a materialized view checks its quote with
shirudo-quote-check, installed as the ClickHouse functiontpm_quote_check, and keeps the record or the reason it was refused. A node is known by the name of its attestation key, never by the host name it claims, and its records are ordered by the quote’s clock.A tree ingest job that loads every publication of a upatch tree through
shirudo bpm tree show, which verifies it as a target does, and thefixesits operations carry.A table,
node_status, refreshed every minute, that says for every node whether it is healthy, unhealthy or stale, with one line per check: the record is fresh, the target reports no problem, its mask and roots match the tree, it is at the head of the tree or still within the time a rollout may take, the upatches it has loaded are from the published tree, and its outcomes match the results expected of the node.A table,
node_vulns, refreshed every five minutes, that says which advisories affect each node’s image and kernel and whether a published upatch shields it, which matches vulnerabilities to nodes from a standard SBOM.
shirudo-quote-check and shirudo bpm tree show come with the
operator package, shirudo-quote-check and
shirudo bpm describe them. A pass of the quote check says
that the body is what one key signed, not that the key lives in a
genuine TPM, so every node reads untrusted until you enroll its key
(Maintain the backend) and insert enrolled for its ak_name
into shirudo.nodes. Neither says that the body is true: root on a
target can have its TPM quote a body of its own, so
healthy is the target’s own account until shirudo attest verify
confirms it (R17 of Threat model).
Files#
Path |
Purpose |
|---|---|
Collector configuration: OTLP over HTTPS in, |
|
Declares the |
|
The schema, loaded in the order of the file names, and
|
|
Loads every segment of a upatch tree into the reference tables. |
|
Loads the labels the operator gives the nodes, out of band (Label the nodes). |
|
Allows builds of shirudo, by |
|
Enrolls the attestation keys a builder created in TPMs, from its records (Enroll keys from a builder). |
|
Loads the shields that |
|
Stores the CycloneDX SBOM of an image in the SBOM store, for an image pipeline to call (Store an image’s SBOM). |
|
Scans the SBOM of every image in the SBOM store and loads the
outcome into |
|
What the jobs share and read from their own directory: a job is
installed with both and with its |
|
The SQL tests and their runner, |
|
A terminal view of the nodes, over |