fix(nix): a missing swarm-services leaf must not kill the whole gateway
main is already unborked -- the constraint-syntax fix landed directly in31e47632and the hive-tls-ca ordering race inb5066ad0. What is left is the reason the syntax bug became an OUTAGE rather than a warning, and it is independent of both. nginx refuses to load a config naming a cert file that does not exist: `cannot load certificate ... no such file` fails the pre-start test, so the vhost does not degrade -- the ENTIRE proxy dies and restart-loops into start-limit-hit, taking the forge, the dashboard and matrix with it. Signing tolerated the leaf's absence and the container import tolerated it; the vhost reference did not, and that is the one that decides whether anything serves. Absence stays a normal state here: the leaf only exists where the swarm CA is autoconfigured. So the import now installs the HIVE leaf at the services path instead of removing the file. That is a name mismatch on those vhosts -- browsers warn, strict clients refuse -- and every other name keeps working. A bad certificate is a bad afternoon; a dead gateway is a dead hive. Also keeps the comment explaining why every nameConstraints entry needs its own `permitted;` prefix, so the next reader doesn't re-derive it from an outage.
This commit is contained in:
parent
31e47632f4
commit
cf4a60b837
2 changed files with 28 additions and 4 deletions
|
|
@ -270,6 +270,15 @@ in
|
|||
# redundant — a DNS constraint says nothing about an
|
||||
# iPAddress SAN, and an unconstrained name type is a name
|
||||
# type this CA is unconstrained for.
|
||||
#
|
||||
# ⚠️ EVERY entry carries its own `permitted;` / `excluded;`
|
||||
# prefix. openssl's parser takes the qualifier per subtree, not
|
||||
# once for a run of them: `permitted;DNS:a,DNS:b` is rejected
|
||||
# outright with `v2i_NAME_CONSTRAINTS: invalid syntax`, which
|
||||
# fails the whole unit. The hive CA next door emits exactly one
|
||||
# permitted name, so the missing-prefix form is accidentally
|
||||
# valid there and does NOT generalise — this list is always
|
||||
# longer than one.
|
||||
printf 'nameConstraints=critical,%s,excluded;IP:0.0.0.0/0.0.0.0,excluded;IP:0:0:0:0:0:0:0:0/0:0:0:0:0:0:0:0\n' \
|
||||
"$(echo "$want" | sed 's/^/permitted;DNS:/' | paste -sd, -)"
|
||||
} > "$ext"
|
||||
|
|
|
|||
Loading…
Reference in a new issue