| Filename | Latest commit message | Latest commit date |
|---|---|---|
A bare String in a crate whose whole suite types validated names as hive_types::Ident, so a consumer had to re-derive at the boundary what every sibling field gets checked for free. Ident is strictly narrower than the store's charset — [a-z0-9-] against the [A-Za-z0-9._-] the users database allows, because that file holds humans too. Every agent name is a legal Ident by construction (creation parses one before the job is queued), so the narrowing costs real agents nothing. What it does mean is that a human hand-added to the agent group cannot be described as an agent: the reader omits that row and logs it, rather than failing the whole roster or quietly shrinking the answer. The REQUEST keeps its String. That side carries what a caller asked for, and validating it server-side is what lets a bad name be refused with a message instead of failing to deserialise. |
||
| .. | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
swarm-authelia-bridge-sock
Wire types for the swarm-authelia-bridge socket — the contract between
swarm-authelia-bridge (server, runs alongside swarm-authelia) and
swarm-controller (client).
Why it's its own crate
Same rationale as hive-priv-sock (which this mirrors in spirit, though the
transport differs — this bridge is network-facing HTTP, not a unix socket,
since it has to reach a possibly-split-host swarm-controller): the bridge
is a narrowly-scoped, unprivileged-but-file-owning helper, and splitting the
wire contract out of any larger crate keeps both its own dependency
footprint and its interface small enough to audit at a glance. No server or
client logic here, only the request/response shapes both sides import.
Shape
Two operations: idempotently ensure an agent exists as an authelia subject,
and list the ones that do. Deliberately not a wholesale-replace-the-file API — the bridge
reads users.yml, changes what the request named, and writes it back; a
caller only ever asks for one user to exist, never sends rendered YAML or a
file blob. See swarm-authelia-bridge/README.md for the helper itself.