swarm-authelia-bridge: check the username charset of the user being written
publish -> render_yaml -> validate re-checked validate_username on every user in the file, humans included. authelia accepts names the charset refuses (first.last@corp), so one hand-added user made every EnsureAgentIdentity fail with a 500 until it was removed, while readiness (which only parsed the file) stayed green. The reserved-name guard already avoids this hazard. validate now checks only what a write would emit wrong (control characters), for every user. The charset check stays on the name a request writes, in handle. A user outside the charset is passed through unchanged and named in a warn line on each write. Readiness now also runs that check, so a file the bridge cannot render is not ready.
This commit is contained in:
parent
66b384cd07
commit
d3c084a0e3
2 changed files with 136 additions and 5 deletions
|
|
@ -24,7 +24,7 @@ ends when the last clone of the check drops.
|
|||
| ----------------------- | ------------------------------------------------------------------------------------- |
|
||||
| `swarm-logs-auth` | a login to the store under its own certificate |
|
||||
| `swarm-metrics-auth` | the read of the stored bearer, the lookup it makes anyway |
|
||||
| `swarm-authelia-bridge` | the users file loads (the bridge has no secret store) |
|
||||
| `swarm-authelia-bridge` | the users file loads and renders again (no secret store) |
|
||||
| `swarm-controller` | a login to the store; the probe reads the queue connection live, since it's in memory |
|
||||
|
||||
The controller starts its check once, when it starts serving
|
||||
|
|
|
|||
|
|
@ -231,6 +231,8 @@ publishes it as
|
|||
It answers only swarm-controller's OIDC client
|
||||
(`swarm.controller.queueClientId`) and refuses every other token `403`.
|
||||
|
||||
A write checks the name it creates or changes, not the whole file. A name someone added by hand with characters outside the roster's set stays in the file, and each write logs a warning naming it. The bridge counts as not ready only while the file holds a value it can't write back, such as a control character.
|
||||
|
||||
On first boot this module seeds the users database with a placeholder subject marked `disabled`, so authelia has a non-empty store to start against before any real account exists (`swarm-authelia.nix:873`). Authelia's session, storage and other keys live in the swarm secret store; the container copies them into place at start, seeded from the files an earlier release generated there, and generates them itself only where it has no store identity. Nothing rotates them automatically; replacing one
|
||||
invalidates data already written (sessions, the encrypted store), so
|
||||
that's an operator action.
|
||||
|
|
|
|||
Loading…
Reference in a new issue