aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/design.md31
1 files changed, 29 insertions, 2 deletions
diff --git a/docs/design.md b/docs/design.md
index 73974bb..fda2c29 100644
--- a/docs/design.md
+++ b/docs/design.md
@@ -527,8 +527,9 @@ ACTIVE) and the pipelines that move them. That is the provider's side,
and this design is the last part of it:
- SOURCE and the pipelines (generate, derive the public key, publish it)
- happen outside the host, in the tool that makes submissions; sources
- (section 10) are where it reads SOURCE.
+ happen outside the host, in the sources themselves (a password store and
+ its generators) and the tool that makes submissions; enstate only reads
+ SOURCE, by sources (section 10).
- TARGET is the receptor's snapshot; ACTIVE is the views.
- REGISTRY is where the fleet channel's submissions come from: every
host's public halves, composed per host.
@@ -582,6 +583,32 @@ rather than a syntax of its own:
break removed, UTF-8 or not), since an entry is a file, without the
source list having to say so; record items are JSON, as `+json`.
+**Locations**: a source declared once, by name, and used by many items,
+with variables from each item's fields, which its placeholders take as
+`$(var:NAME)` (or `${var:NAME}`), as data, like any placeholder's value:
+
+```json
+{
+ "locations": {
+ "secrets": {
+ "source": { "command": ["secrets", "$(env:HOSTNAME)", "show", "$(var:key)"] }
+ }
+ },
+ "channel": "secrets",
+ "items": {
+ "retiolum.key": { "location": "secrets", "key": "retiolum.ed25519_key.priv" },
+ "retiolum.pub": { "location": "secrets", "key": "retiolum.ed25519_key.pub" }
+ }
+}
+```
+
+A source list may include files of locations (`"include": [ … ]`), so that
+the source lists of many hosts share them. Locations are read only:
+enstate never writes to a source. Making values that don't exist yet is
+the source's business (a password store's generator, a tool like `secrets
+HOST generate-tinc-keys`), which knows its layout, its recipients, and how
+each kind of key is made; enstate doesn't generate (section 9).
+
Given the schema of the system it deploys (a file in that system), `pack`
checks the source list against it before it runs any source: channels,
slots, required slots without a source.