feat(swarm-authelia-bridge): mark agent identities with a group, and answer for the set
The users database holds humans and agents in one namespace and nothing in it said which was which, so a roster read had no predicate to read with. Marks positively, at creation. The alternative — everyone who is not an operator — fails in the direction that matters: an account created without a group is an operator who cannot log in, a mistake the swarm UI docs already warn about, and it would have rendered as an agent. The group is a constant for the same reason the operator group it mirrors is one. An identity that predates the marker gains it when agent creation runs again, which is already the agreed migration for those; AlreadyExists therefore reports that the subject was there, not that nothing was written. ListAgentIdentities reads through this process because the store is owned by a uid swarm-controller does not have — the same reason the write goes through here — and answers with names alone, never the digests it sits next to.
This commit is contained in:
parent
78217bc10f
commit
3700167279
5 changed files with 240 additions and 22 deletions
|
|
@ -16,8 +16,8 @@ client logic here, only the request/response shapes both sides import.
|
|||
|
||||
## Shape
|
||||
|
||||
One operation today: idempotently ensure an agent exists as an authelia
|
||||
subject. Deliberately **not** a wholesale-replace-the-file API — the bridge
|
||||
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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue