Environment variables#
Every environment variable that shirudo, shirudo-build, the
generator scripts and the libraries they link read. shirudo does not
clear or filter its environment beyond the refusals listed here.
Refused on a target#
init, and on a target that enforces every command except
genkey, build, help, version, image build and
image verify, refuse to run when one of these variables is set, even
to an empty value. The command logs bootstrap override <name> is
forbidden and fails with EPERM and exit status 1.
Variable |
Effect on a host without a config image |
|---|---|
|
Key directory of |
|
TCTI in place of |
|
TPM owner password in place of |
|
Eventlog path in place of |
|
Pending eventlog record in place of
|
|
File whose existence means “running in the initrd”, in place of
|
|
Root file system mount point in the initrd, in place of
|
SHIRUDO_KEYS_DIR also serves operator hosts. The others serve
development and tests.
TSS2_LOGFILE and SSLKEYLOGFILE are refused on a target the same
way. tpm2-tss and libcurl open the file they name with the process’s
authority, sealed state included, and neither has a use on a target.
shirudo and shirudo-build#
Variable |
Read by |
Effect |
|---|---|---|
|
|
Path of |
|
|
Search path. |
|
|
Arguments appended to |
|
|
Set by systemd to the device and inode of the journal stream a
service’s output is connected to. When it names the file that is
standard error, and |
|
|
Directory for temporary files, |
|
Registry credential lookup; |
|
Registry access#
Read by the target’s bpm commands and by shirudo-build bpm push,
shirudo-build bpm tree append and shirudo-build bpm tree show.
Honored on a target.
Variable |
Effect |
|---|---|
|
|
|
PEM file whose first certificate is added to the trusted CAs of
registry connections. Under |
|
Registry credentials. Used only when both are set, ahead of any auth file. |
|
Bearer token sent when a registry asks for one, in place of a token from the registry’s token service. |
|
Auth file in |
|
Directory holding |
Telemetry export#
Read by status --otel and by upatch map --otel and --all.
Honored on a target. <SIGNAL> is LOGS or METRICS. A
per-signal variable takes precedence over the generic one. See
OTLP documents.
Variable |
Effect |
|---|---|
|
Base URL, |
|
Full URL, used as given. |
|
Must be |
|
|
|
Comma-separated |
|
CA file for the collector’s certificate. |
|
Client certificate and key, both or neither. |
|
Request timeout in milliseconds, 1 to 120000. Default 10000. |
|
Region of |
|
S3 endpoint in place of the region’s. |
|
S3 credentials. Required for an S3 upload. |
|
S3 session token. |
|
CA file for the S3 endpoint. |
Libraries#
These variables control library behavior. Target entry refuses the log file destinations described above, and TPM setup always disables library logging, including during bootstrap.
Variable |
Library |
Effect |
|---|---|---|
|
libcurl |
libcurl appends the TLS session secrets of every registry, OTLP and S3 connection to this file. The static target’s libcurl is built with this support. Anyone who reads the file can decrypt the captured traffic. |
|
libcurl |
Proxy for registry, OTLP and S3 connections. |
|
tpm2-tss |
Log levels of the TPM library. shirudo always forces |
|
tpm2-tss |
Destination of those logs: |
|
libbpf |
|
|
libbpf |
bpffs path from which libbpf creates a BPF token when |
|
OpenSSL |
Not read. shirudo initializes OpenSSL without its configuration file. |
Generator and installer scripts#
Variable |
Read by |
Effect |
|---|---|---|
|
|
Key directory when |
|
GitHub repository releases are fetched from. Default
|
|
|
Same as |
|
|
Same as |
|
|
Same as |
|
|
|
Installation root. Default |
Environment files#
The units read these files with EnvironmentFile=-<file>. A missing
file is not an error. They are host files on the root file system,
outside the sealed state under /var/lib/shirudo and outside the
signed config. Root can change them, and the next run of the unit uses
what they hold. See Hardening checklist.
File |
Units |
Typical variables |
|---|---|---|
|
|
|
|
|
|
|
|
|
A variable from the first table set in one of these files makes the unit’s command fail on a target.