aboutsummaryrefslogtreecommitdiffstats
path: root/layers/switch.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-21 15:09:49 +0000
committertv <tv@krebsco.de>2026-11-21 15:09:49 +0000
commitab8c63531ca4a5d8eb185fcdafbe02122649416b (patch)
tree3f56fda69675e59e8eab6c84361b6dfe57267feb /layers/switch.nix
parent4e480218c0777ba9342ce2edd3b00ff3488229b2 (diff)
run-firecracker-vm: secrets, --secret NAME=FILE and fc.secrets
Secrets for a guest, like API keys, had no way in but the store or /xchg, which other VMs started in the same directory see. Now a layer declares the secrets its guest needs (fc.secrets.NAME, with where it goes, default /run/secrets/NAME, and whose it is, default root's, 0400), and the run script gets them with --secret NAME=FILE (FILE read once, so a pipe will do), refusing to start the guest without the declared ones. Like the SSH host key, it copies them into its private temporary directory and serves that via 9P on vsock port 568, to that guest only; there, fc-secrets copies them into place, before sysinit.target (so before any service with the default dependencies), but after the users get created, and unmounts the share again. A secret the guest doesn't declare goes to /run/secrets/NAME, root's, with a warning.
Diffstat (limited to 'layers/switch.nix')
0 files changed, 0 insertions, 0 deletions