document the controller tcp listener and its two leaves
This commit is contained in:
parent
187ed82de0
commit
cd786ef401
1 changed files with 83 additions and 1 deletions
|
|
@ -141,6 +141,21 @@ The socket path is `services.hyperhive.deploy.swarm-controller.socketPath`, defa
|
|||
`/run/swarm-controller/controller.sock`, exported to the process as
|
||||
`SWARM_CONTROLLER_SOCKET`.
|
||||
|
||||
## The optional TCP listener
|
||||
|
||||
`services.hyperhive.swarm.controller.tcp.enable` (default off) adds a TLS listener beside the
|
||||
socket, for a gateway that reaches the controller over the network. The routes trust their
|
||||
transport and check no caller, so the listener finishes a handshake for one client only
|
||||
(`src/tcp_tls.rs`): a certificate that chains to the swarm services root, carries `clientAuth`,
|
||||
and names `gateway-client.<swarm.domain>` in a subject alternative name. No certificate, another
|
||||
name, or the `serverAuth`-only swarm-services leaf is refused during the handshake, before any
|
||||
HTTP. The socket stays and answers exactly as before.
|
||||
|
||||
The daemon takes five variables, all or none (`SWARM_CONTROLLER_TCP_LISTEN`, `_CERT`, `_KEY`,
|
||||
`_CLIENT_CA`, `_CLIENT_NAME`), which the nix module sets from the options. It re-reads the server
|
||||
certificate and key when either file changes, so a rotation needs no restart; it reads the client CA
|
||||
once at start. [`ca.md`](../docs/4-implementation/swarm/ca.md) covers where both leaves come from.
|
||||
|
||||
## ⚠️ The socket's directory is its access control
|
||||
|
||||
The socket is `0666`. It has to be: nginx runs as a different user and
|
||||
|
|
|
|||
Loading…
Reference in a new issue