swarm: drop the -agent client suffix refusal from authelia and the queue responder
authelia.agentClientSuffix is removed (tombstoned) and the responder takes no --agent-client-suffix: hive-<name>-agent is parsed as hive <name>-agent like any other id. The reserved word agent still keeps a hive from being named *-agent.
This commit is contained in:
parent
6bcffb0ebb
commit
e01770c056
1 changed files with 33 additions and 233 deletions
|
|
@ -682,30 +682,6 @@ in
|
|||
+ "services.hyperhive.swarm.hives; rename the hive or the "
|
||||
+ "colliding client.";
|
||||
}
|
||||
{
|
||||
# A hive whose name ENDS with the agent suffix mints an id the
|
||||
# queue's responder reads as a hive's agent client, which it refuses:
|
||||
# `hive-foo-agent` parses as *the agents of hive foo* before it
|
||||
# parses as *the hive foo-agent*, because the agent rule is the
|
||||
# more specific one and therefore runs first. A NATS denial arrives
|
||||
# as a timeout, so the symptom names nothing.
|
||||
#
|
||||
# Checkable here and nowhere downstream: the responder runs in a
|
||||
# container with no view of the roster (`policy.rs`'s `hive_name`
|
||||
# says why that is deliberate), so this is the last place that knows
|
||||
# both the naming scheme and the set of names.
|
||||
assertion =
|
||||
!cfg.oidc.hiveIdentities
|
||||
|| !lib.any (h: lib.hasSuffix cfg.agentClientSuffix h) (lib.attrNames hyperhiveCfg.swarm.hives);
|
||||
message =
|
||||
"services.hyperhive.swarm.hives contains "
|
||||
+ lib.concatMapStringsSep ", " (h: "'${h}'") (
|
||||
lib.filter (h: lib.hasSuffix cfg.agentClientSuffix h) (lib.attrNames hyperhiveCfg.swarm.hives)
|
||||
)
|
||||
+ " — names ending with '${cfg.agentClientSuffix}', the suffix the "
|
||||
+ "queue refuses as a hive's agent client. Such a hive's own client "
|
||||
+ "id reads as one, and the queue refuses it. Rename the hive.";
|
||||
}
|
||||
# The two obligations `authelia.bearer.authz` carries. Authelia
|
||||
# enforces both itself — but in its `preStart` validator, so a
|
||||
# violation produces a green `nixos-rebuild switch` and an authelia
|
||||
|
|
|
|||
Loading…
Reference in a new issue