Skip to content

Commit 5de15f0

Browse files
committed
docs(config): describe switching ACME and EST off with their settings kept
Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
1 parent 44843aa commit 5de15f0

2 files changed

Lines changed: 54 additions & 14 deletions

File tree

‎docs/acme.md‎

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,37 @@ workflow, and accepting the request would imply one.
140140
## Switching it on, changing it and switching it off
141141

142142
ACME runs on an intermediate or issuing node only. A Root serves no enrolment
143-
protocol, so a config that sets `pki.acme` on a Root is refused by
143+
protocol, so a config that switches `pki.acme` on at a Root is refused by
144144
`config apply`, by the maintenance install and by `ceremony start --config`.
145145

146146
> [!CAUTION]
147-
> Don't add `pki.acme` to a Root's config. It is refused, and nothing is
148-
> stored. Serve ACME from an issuing node under that Root instead.
147+
> Don't switch `pki.acme` on in a Root's config. It is refused, and nothing
148+
> is stored. Serve ACME from an issuing node under that Root instead. A
149+
> Root accepts a block with `enabled: false`, and never serves it.
149150

150151
To switch ACME on, add the `pki.acme` block and run `config apply`. To
151-
switch it off, remove the block and apply again. Over the API the block is
152-
`Pki.acme` with an explicit `enabled` flag: `enabled: false` switches it
153-
off, and leaving the block out of an `ApplyConfig` keeps what the node has.
152+
switch it off and keep its settings, set `enabled: false` in the block and
153+
apply again; to switch it back on, set `enabled: true` (or remove the line).
154+
A block without `enabled` is on. Removing the block switches ACME off and
155+
drops its settings.
156+
157+
```yaml
158+
pki:
159+
acme:
160+
enabled: false
161+
# the rest of the block stays as it was
162+
```
163+
164+
The node stores a switched-off block's settings and `config get` prints the
165+
block with `enabled: false`, so flipping `enabled` alone is enough to switch
166+
it back on. The Fleet Manager switches a protocol the same way. Nothing reads
167+
a switched-off block at boot, so changing only its settings does not need a
168+
reboot.
169+
170+
Over the API the block is `Pki.acme` with an explicit `enabled` flag.
171+
`enabled: false` switches it off and keeps the settings sent with it, an
172+
`enabled: false` block with no settings drops them, and leaving the block out
173+
of an `ApplyConfig` keeps what the node has, on or off.
154174

155175
> [!WARNING]
156176
> Every ACME change, switching it on or off included, takes effect at the
@@ -167,7 +187,7 @@ Protocols: ACME on (not running, reboot pending), EST off
167187
Reboot: pending (the stored config changes take effect at the next boot)
168188
```
169189

170-
`hmac_key_base64` is write-only. `cryptosctl config get` prints it blank, with its
190+
`hmac_key_base64` is write-only, in a switched-off block too. `cryptosctl config get` prints it blank, with its
171191
`key_id`. Leave a blank value as it is and `config apply` keeps the one the
172192
node stores for that `key_id`; set a value to replace it. A new `key_id`
173193
needs its value, and an apply that leaves it blank is refused. Removing an

‎docs/est.md‎

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,17 +202,37 @@ is routing rather than decoration.
202202
## Switching it on, changing it and switching it off
203203

204204
EST runs on an intermediate or issuing node only. A Root serves no enrolment
205-
protocol, so a config that sets `pki.est` on a Root is refused by
205+
protocol, so a config that switches `pki.est` on at a Root is refused by
206206
`config apply`, by the maintenance install and by `ceremony start --config`.
207207

208208
> [!CAUTION]
209-
> Don't add `pki.est` to a Root's config. It is refused, and nothing is
210-
> stored. Serve EST from an issuing node under that Root instead.
209+
> Don't switch `pki.est` on in a Root's config. It is refused, and nothing
210+
> is stored. Serve EST from an issuing node under that Root instead. A
211+
> Root accepts a block with `enabled: false`, and never serves it.
211212
212213
To switch EST on, add the `pki.est` block and run `config apply`. To
213-
switch it off, remove the block and apply again. Over the API the block is
214-
`Pki.est` with an explicit `enabled` flag: `enabled: false` switches it
215-
off, and leaving the block out of an `ApplyConfig` keeps what the node has.
214+
switch it off and keep its settings, set `enabled: false` in the block and
215+
apply again; to switch it back on, set `enabled: true` (or remove the line).
216+
A block without `enabled` is on. Removing the block switches EST off and
217+
drops its settings.
218+
219+
```yaml
220+
pki:
221+
est:
222+
enabled: false
223+
# the rest of the block stays as it was
224+
```
225+
226+
The node stores a switched-off block's settings and `config get` prints the
227+
block with `enabled: false`, so flipping `enabled` alone is enough to switch
228+
it back on. The Fleet Manager switches a protocol the same way. Nothing reads
229+
a switched-off block at boot, so changing only its settings does not need a
230+
reboot.
231+
232+
Over the API the block is `Pki.est` with an explicit `enabled` flag.
233+
`enabled: false` switches it off and keeps the settings sent with it, an
234+
`enabled: false` block with no settings drops them, and leaving the block out
235+
of an `ApplyConfig` keeps what the node has, on or off.
216236

217237
> [!WARNING]
218238
> Every EST change, switching it on or off included, takes effect at the
@@ -229,7 +249,7 @@ Protocols: ACME off, EST on (not running, reboot pending)
229249
Reboot: pending (the stored config changes take effect at the next boot)
230250
```
231251

232-
`password_sha256` is write-only. `cryptosctl config get` prints it blank, with its
252+
`password_sha256` is write-only, in a switched-off block too. `cryptosctl config get` prints it blank, with its
233253
`username`. Leave a blank value as it is and `config apply` keeps the one the
234254
node stores for that `username`; set a value to replace it. A new `username`
235255
needs its value, and an apply that leaves it blank is refused. Removing an

0 commit comments

Comments
 (0)