hive-tls: fail swarm-services-cert when the store identity is absent
A hive fronting no swarm name fetches the store's pki root presenting its reader certificate. When deploy.bao.clientCertFile or clientKeyFile is unset, or either named file is not readable, the unit now exits 1 with a message naming both options and their paths, instead of exiting 0 with the root missing from the trust bundle. The module-eval cases that asserted the quiet skip assert the failure instead, and a new case covers the named-but-absent files.
This commit is contained in:
parent
8c2f81abad
commit
849bf46550
4 changed files with 52 additions and 16 deletions
|
|
@ -65,7 +65,10 @@ gateway can't serve a swarm service that runs behind another.
|
|||
`/var/lib/hive-tls/swarm-services-root.pem` (0644), written beside the
|
||||
leaf it signed and folded into `trust-bundle.pem`. A hive fronting no
|
||||
swarm name asks for no leaf and reads the root alone, from the store's
|
||||
`pki/ca/pem`, when it holds a store identity (`deploy.bao.clientCertFile`).
|
||||
`pki/ca/pem`, presenting its store identity
|
||||
(`deploy.bao.clientCertFile` / `clientKeyFile`) for the handshake. Every hive
|
||||
must hold one: without it, or with either file absent,
|
||||
`swarm-services-cert.service` fails with a message naming both options.
|
||||
On the host running
|
||||
the store it's also at
|
||||
`/var/lib/swarm-bao-services-pki/services-root.pem`. That's the file to
|
||||
|
|
|
|||
Loading…
Reference in a new issue