egress: let every agent reach the swarm's own endpoints under forward reject
With the egress intercept on, the forward chain rejects what `agent_allow` does not hold, and `agent_allow` only held an agent's ssh connections. An agent whose secret store, queue, logs or metrics endpoint is not on the bridge was refused, so no agent started on a hive away from the swarm host. hive-c0re's egress worker now also renders a `* <ipv4> <port>` line for each endpoint URL it hands to agents (HIVE_AGENT_BAO_ADDR, HIVE_AGENT_LOGS_QUERY_URL, HIVE_AGENT_METRICS_URL, HIVE_AGENT_NATS_URL), resolved like the ssh hosts. `hive-priv egress-pin` expands a `*` line to the MAC of every agent port. An older hive-priv skips the line, as it skips any unknown name. Closes #6902
This commit is contained in:
parent
e77758d0d0
commit
ecfc21b962
1 changed files with 205 additions and 13 deletions
|
|
@ -381,7 +381,10 @@ in
|
|||
The file hive-c0re renders with the SSH connections each agent may open,
|
||||
one `<agent> <ipv4> <port>` per line: the addresses behind the `host` of
|
||||
each connection in the permissions record of an agent whose `ssh` switch
|
||||
is on. `hive-priv egress-pin` turns each line into elements of the
|
||||
is on. A `*` line instead of an agent name allows the address and port to
|
||||
every agent: hive-c0re writes one for the secret store, the queue, the
|
||||
logs and the metrics endpoint of the swarm, so that `reject` does not cut
|
||||
agents off from them. `hive-priv egress-pin` turns each line into elements of the
|
||||
`agent_allow` set of the `inet hive_egress` table, keyed by the MAC of
|
||||
the agent's port, and the forward chain accepts TCP to an address and
|
||||
port in it before it logs or refuses. The file is read when a port is
|
||||
|
|
|
|||
Loading…
Reference in a new issue