`swarm agent create` failed with "no user store at swarm-authelia-bridge-users.json but users.yml already holds users" on any hive that had users. The guard was correct; what was wrong is that two files both claimed to be canonical for one physical file. The bridge kept a private users.json and rendered users.yml from it, while swarmctl kept its own pair against the same users.yml. A writer whose own JSON was absent could not tell "nothing here yet" from "someone else's users", so it refused to write at all. users.yml becomes the store: read before write, through serde_norway rather than a hand-rolled emitter. Unknown top-level and per-user keys round-trip through `extra`, or whichever process writes second would silently delete what the first added. Validation stays on the write path -- a bare to_string(&store) serialises perfectly and drops the "no control character ever reaches this file" guarantee silently. The seed constant goes with the guard: nothing writes a seed now, an absent file is an empty store, and left as a pub constant it read as if the seed dance were still load-bearing.
24 lines
489 B
TOML
24 lines
489 B
TOML
[package]
|
|
name = "swarm-authelia-bridge"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
readme = "README.md"
|
|
|
|
[[bin]]
|
|
name = "swarm-authelia-bridge"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
axum.workspace = true
|
|
reqwest.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
serde_norway = "0.9.42"
|
|
swarm-authelia-bridge-sock.workspace = true
|
|
tokio.workspace = true
|
|
tracing.workspace = true
|
|
tracing-subscriber.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|