aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/README.md b/README.md
index 30dc439..303f2a7 100644
--- a/README.md
+++ b/README.md
@@ -156,6 +156,26 @@ Who may log in goes in a layer, e.g.:
A guest's address is its VM's, by name (`vms`, see host setup), or else
its tap's own (see `fc-egress vms`).
+Secrets, like API keys, come from the host at boot, too, never through
+the store or `/xchg` (which other VMs started in the same directory
+see): a layer declares what it needs, where it goes (default:
+`/run/secrets/NAME`), and whose it is (default: root's, 0400):
+
+```nix
+{ fc.secrets."hermes.env" = { owner = "hermes"; }; }
+```
+
+and the run script, which doesn't start the guest without them, gets
+them with `--secret NAME=FILE` (FILE read once, so a pipe will do):
+
+```sh
+./result/bin/run-firecracker-vm --secret hermes.env=<(pass show hermes/env)
+```
+
+They're only that guest's, and only in its memory (`/run`), until it
+stops; to change one, restart the guest. A secret the guest doesn't
+declare ends up in `/run/secrets/NAME`, root's, with a warning.
+
The guest's system can be built in layers, each a NixOS module on top of
the ones before (the first on top of the base system):