| Filename | Latest commit message | Latest commit date |
|---|---|---|
swarm-authelia-bridge gains ListOperators, the usernames in authelia's operator group (`operatorGroup = "admins"`, passed in from swarm-authelia.nix). Unlike the two agent verbs, which admit any active token, it answers only the client named by SWARM_AUTHELIA_BRIDGE_OPERATOR_READER_CLIENT_ID (swarm-controller's queueClientId) and returns 403 to every other active token: authelia issues machine tokens to every hive and its agents as well. The bridge's introspection now models `client_id` to make that check, the same way swarm-nats-auth's does. swarm-controller runs a grant-only pass at start and every five minutes: read the group, map each username to the account an SSO login lands on (tuwunel lowercases `preferred_username`), skip anyone already joined to `#admins:<server>` (tuwunel's definition of admin) or without a matrix account, and send `!admin users make-user-admin <user>` there as @swarm with the swarm appservice token. Nothing is ever revoked: tuwunel has no command for it (#4799). The admin-room calls (alias, joined members, profile, send) go into swarm-matrix-client next to whoami, keeping its no-body-in-errors rule. Closes #4585 |
||
| .. | ||
| 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.