Configuration
The agent reads one configuration file at the start of every invocation:
/etc/lota/lota.conf, or the file --config names. The file sets what
the options of Command line also set, holds the publisher profiles,
and carries the few settings no option reaches. The parser is
src/agent/config.c; configs/lota.conf.example lists every
key with a comment.
File
The package does not own /etc/lota/lota.conf; an upgrade never replaces
it. --add-publisher appends profiles to it, and grows it to at most
262144 bytes.
The agent opens the file with O_NOFOLLOW, so a symbolic link in its
place is refused. It loads the file only when the file is regular, neither
group- nor world-writable, and owned by root; a caller other than root also
accepts a file it owns itself.
A missing default file is no error and leaves every key at its default. A
default file the caller cannot read gives a warning and the defaults. A file
--config names must exist and be readable. Any other failure, including a
single bad line, ends the command with status 1.
Syntax
The file is lines of key = value. Whitespace around the key and the value
is dropped. A line whose first character after leading whitespace is # is
a comment, and so is an empty line; a # later in a line is part of the
value. A line is at most 1022 characters; a longer one is an error.
Every key also has a spelling with - in place of _, and bpf_path
also answers to bpf. A boolean takes true, yes or 1 and
false, no or 0.
A path is absolute, holds no .. component and no control character, and
is taken as written: symbolic links in it are not resolved. An empty value
clears a single path key. A list key adds one entry per line, and refuses an
empty value.
The parser reports every bad line with its file and line number and goes on
to the end, so one pass shows every problem. A file with any error is refused
whole: an unknown key, a line with no =, an empty key, a value out of
range or too long, or a profile that does not validate.
Keys
Keys before the first [profile ...] header are top-level keys. The last
column says what SIGHUP does with a changed value (Reloading).
Key |
Value |
On reload |
|---|---|---|
|
Verifier host for a report with no profile. No default. |
Next start. |
|
Its port, 1 to 65535. Default 8443. |
Next start. |
|
Path of the CA certificate the verifier's TLS chain must reach. |
Next start. |
|
SHA-256 of the verifier's certificate: 64 hex characters, colons and spaces allowed. Refused when the file has profiles. |
Next start. |
|
Always refused; the command line alone turns TLS verification off. |
-- |
|
|
Applied. |
|
Booleans, default false. In effect only in |
Applied. |
|
List, at most 256: a file whose fs-verity digest the agent allows. The paths are measured at startup. |
Next start. |
|
List, at most 64: a library path the agent trusts. |
Applied. |
|
List, at most 1024: a PID, 1 to 4294967295, to protect. |
Applied. |
|
Path of the enforcement object. Default
|
Next start. |
|
Path of the key that verifies the object's signature, and the
file's own signature on a reload that leaves |
Next start. |
|
Boolean, default false: write |
Next start. |
|
Seconds between reports: 0, or 30 to 240. Default 0 (Intervals). |
Next start. |
|
Persistent handle of the host AIK, in any base, nonzero, at most 0xffffffff. Default 0x81010002. |
Next start. |
|
Boolean, default false: also keep the AIK authorization sealed to PCRs, and try that copy first. |
Next start. |
|
Boolean, default false: seal the AIK authorization, remove the plaintext copy, and use no other. |
Next start. |
|
Boolean, default false: seal under the persistent primary key in
place of a transient one, while its Name matches the one
|
Next start. |
|
Path of the kernel image the report names. Default
|
Next start. |
|
List, at most 4, no repeats: a user, 0 to 4294967295, served an IPC
socket at |
Next start. |
|
Boolean, default false: detach as |
Next start. |
|
Path of the PID file. Default |
Next start. |
|
|
Applied. |
The command line wins over the file for a single value, and adds to the
file's lists (Command line). --dump-config prints what the two
set together.
Intervals
attest_interval and --attest-interval are 0, or 30 to 240 seconds.
The ceiling keeps a token the agent mints inside every relying party's
freshness window. With 0, --attest reports once to a server named
with no profile, and every 240 seconds to publisher profiles.
Publisher profiles
A [profile "name"] header opens a profile, and every key up to the next
header belongs to it. A profile describes one publisher: its CA, which
enrolls the host, and its verifier, which takes the reports
(Publishers).
The name is not empty, is shorter than 64 characters and holds no " and
no control character. A file has at most 8 profiles and no two with the same
name. A header that does not parse, or names a section other than
profile, is an error, and the keys under it are not read.
Key |
Value |
|---|---|
|
Host of the publisher's CA. Required. |
|
Its port. Default 8444. |
|
Path of the CA's trust anchor. Required. Its key names the profile's state directory (Agent). |
|
Host of the publisher's verifier, without a port. Required.
|
|
Its port. Default 8443. Refused with |
|
SHA-256 of the verifier's certificate, as at top level. |
|
|
|
Seconds between reports to this publisher, as |
mode = enforce
log_level = info
[profile "example"]
ca = ca.example.net
ca_cert = /etc/lota/example-ca.pem
verifier = verifier.example.net
Reloading
SIGHUP makes the daemon and the --attest loop read the file again.
A file that does not load leaves the running state untouched, and a missing
file is a warning.
The daemon applies a changed mode, the five switches, protect_pid,
trust_lib, log_level and the profiles at once. A reload that leaves
enforce needs a <file>.sig beside the file that verifies under the
key the daemon started with (--policy-pubkey, policy_pubkey,
/etc/lota/policy.pub, then enforcement.pub); otherwise the reload is
refused whole. A switch, library or PID given on the command
line stays in effect even when the file drops it.
Every key marked "Next start" keeps the value the agent started with. For
allow_verity, bench, the three seal_* keys, kernel_path,
policy_pubkey, aik_handle and container_listener_uid the agent
logs that the change waits for the next start.
The --attest loop rebuilds its publisher list from the profiles and
keeps everything else. A loop started with --pin-sha256 and no profiles
refuses a reload that adds profiles, and goes on reporting to its server.