make squid's allowed domains editable at runtime in the swarm ui
This commit is contained in:
parent
86e80250bb
commit
c9abc2a42b
1 changed files with 2307 additions and 35 deletions
|
|
@ -112,7 +112,7 @@ with no icon keeps the hyperhive mark.
|
|||
|
||||
The tab also has an agent badge, with the agent's icon and name, ahead of the
|
||||
connection badge. It opens the agent's details in a popover under the badge:
|
||||
the same status, state, wanted state, inference settings, resource caps, permissions and linked accounts as the
|
||||
the same status, state, wanted state, inference settings, resource caps, permissions, allowed domains and linked accounts as the
|
||||
panel on `/agents`, without the terminal preview. The popover doesn't dim the
|
||||
page. Selecting outside it, or Escape, closes it. From the keyboard, opening a
|
||||
popover moves focus into it, and Escape puts focus back on the badge. The filter
|
||||
|
|
@ -622,6 +622,38 @@ restarts the agent after its current turn. The panel reads
|
|||
the reason and a **retry** button. `swarmctl agent permissions set` sets the
|
||||
same grant from a shell.
|
||||
|
||||
### Allowed domains
|
||||
|
||||
The agent's detail panel lists the destinations it may reach through its
|
||||
hive's egress proxy under **allowed domains**, beyond the base list every
|
||||
agent has: the entries for every agent in the swarm (badge **swarm-wide**) and
|
||||
the ones for this agent alone (badge with the agent's name). An entry matters
|
||||
to a restricted agent. One with the unrestricted internet flag reaches any
|
||||
name the proxy's private-range rules leave. **remove** drops one entry;
|
||||
**add** opens a dialog with a domain box and a tick for every agent in the
|
||||
swarm. The tick is off by default, so an entry is for this agent alone.
|
||||
|
||||
A domain is a DNS name of at least two labels, such as `github.com`. One
|
||||
leading dot, as in `.githubusercontent.com`, also allows every subdomain; the
|
||||
dot form is the only wildcard, because exact names can't list a service that
|
||||
spreads over many hostnames, and an entry is the operator's choice. The
|
||||
controller refuses IP addresses, other wildcards, ports and paths, and a name
|
||||
the proxy already allows every agent (the base list). The dialog shows the
|
||||
refusal's reason under the box and leaves what you typed. Adding does a
|
||||
`POST /api/egress/allowed-domains` and removing a `DELETE` of the same path,
|
||||
each with `{"domain": "github.com", "agent": "atlas"}` (leave out `agent` for
|
||||
a swarm-wide entry); both answer the whole list, and `GET` reads it. Adding
|
||||
an entry that exists changes nothing.
|
||||
|
||||
A saved change isn't instant. Each hive reads the list about every 30
|
||||
seconds and reloads its proxy, so the name is reachable within a minute. The
|
||||
proxy's private-range rules still apply: an entry whose name resolves to a
|
||||
loopback, private or bridge address stays blocked. The first entry makes the
|
||||
swarm's list replace the names a hive's own `allowedDomains` lists, so add
|
||||
those names here too; a hive keeps its own list until then. See [the egress
|
||||
proxy](../networking/network.md#egress-proxy-squid) for what each hive does
|
||||
when the controller is old or unreachable.
|
||||
|
||||
### Creating an agent
|
||||
|
||||
The **+ agent** button opens a dialog of five steps, which you go through in
|
||||
|
|
|
|||
Loading…
Reference in a new issue