module-eval: drop 18 redundant cases and merge assertion-only hosts
Refs #5379
This commit is contained in:
parent
e9f313e75d
commit
2ff253e520
15 changed files with 122 additions and 359 deletions
|
|
@ -49,13 +49,7 @@ let
|
|||
deploy.nats.enable = true;
|
||||
};
|
||||
|
||||
# The store's host with the hive's own reader pointed somewhere else.
|
||||
natsOnStoreHostReaderMoved = hive {
|
||||
deploy.bao.enable = true;
|
||||
deploy.nats.enable = true;
|
||||
deploy.bao.clientCertFile = "/etc/pki/h1.pem";
|
||||
deploy.bao.clientKeyFile = "/etc/pki/h1-key.pem";
|
||||
};
|
||||
inherit (shared) natsOnStoreHostReaderMoved;
|
||||
|
||||
# A queue host holding only the hive's own store reader, placed by hand: no
|
||||
# store here, and no responder leaf named.
|
||||
|
|
@ -309,17 +303,6 @@ let
|
|||
refusedWithoutIdentity natsWithHiveReaderOnly
|
||||
&& natsWithHiveReaderOnly.services.hyperhive.deploy.nats.authBaoClientCertFile == null;
|
||||
}
|
||||
{
|
||||
# Reads the RENDERED settings, not the option: `calloutBlocks {…} // {
|
||||
# … }` is a shallow merge, and a future edit that dropped or shadowed
|
||||
# this key would still evaluate cleanly — the only reader that would
|
||||
# notice is a publisher whose row exceeds upstream's much smaller
|
||||
# default, and by then it is a dropped row, not an eval failure.
|
||||
# Piggybacks on the queue-only fixture above, which already
|
||||
# renders this container's full config.
|
||||
name = "the queue's payload ceiling is set, not inherited from the server's default";
|
||||
ok = natsQueueOnly.containers.swarm-nats.config.services.nats.settings.max_payload == 8388608;
|
||||
}
|
||||
{
|
||||
# What keeps a callout request inside one principal: the responder is
|
||||
# the callout account's only member, and no system account exists to
|
||||
|
|
@ -485,16 +468,6 @@ let
|
|||
&& lib.hasInfix "--agent-token-publish-subject '$$SWARM.agent-state.{agent}'" exec
|
||||
&& lib.hasInfix "--store-cert-role swarm-nats-auth" exec;
|
||||
}
|
||||
{
|
||||
# Its own arm, like the two above: the icon write is a separate feature
|
||||
# and dropping it must not hide behind the streams still being granted.
|
||||
name = "the responder grants a verified agent its own icon key";
|
||||
ok =
|
||||
let
|
||||
exec = (responderOf natsQueueOnly).serviceConfig.ExecStart;
|
||||
in
|
||||
lib.hasInfix "--agent-token-publish-subject '$$KV.agent-icons.{agent}'" exec;
|
||||
}
|
||||
{
|
||||
# The whole per-agent grant, compared as a list rather than by infix: a
|
||||
# wider subject added beside these (`$$JS.API.>`, another stream's name)
|
||||
|
|
@ -722,21 +695,6 @@ let
|
|||
autheliaColocated.services.hyperhive.swarm.authelia.url
|
||||
== autheliaNotColocated.services.hyperhive.swarm.authelia.url;
|
||||
}
|
||||
{
|
||||
# …and the name it resolves through is a DOMAIN, not a host this config
|
||||
# picked. `127.0.0.1` is what a co-location-derived default renders on
|
||||
# the IdP host, the bridge address is what the queue's defaults render,
|
||||
# and neither is an address a client may be handed: the domain is
|
||||
# allowed to resolve differently in different places, which is the
|
||||
# whole property.
|
||||
name = "the swarm IdP address names no host address";
|
||||
ok =
|
||||
let
|
||||
url = autheliaNotColocated.services.hyperhive.swarm.authelia.url;
|
||||
bridgeIp = autheliaNotColocated.services.hyperhive.network.bridgeIp;
|
||||
in
|
||||
!(lib.hasInfix "127.0.0.1" url) && !(lib.hasInfix "localhost" url) && !(lib.hasInfix bridgeIp url);
|
||||
}
|
||||
{
|
||||
# The queue container's own journal forwarder, on the store's host and
|
||||
# on a queue host with no store and no swarm collector: it exports to
|
||||
|
|
@ -773,12 +731,6 @@ let
|
|||
natsWithStoreIdentity
|
||||
];
|
||||
}
|
||||
{
|
||||
# The read grant the fetch relies on: the responder's role, the identity
|
||||
# the forwarder logs in with, reads the queue client's secret.
|
||||
name = "the queue container's store identity may read the forwarder's client secret";
|
||||
ok = lib.hasInfix "path \"secret/data/swarm/services/swarm-nats/oidc/client\" {" natsOnStoreHost.systemd.services.swarm-bao-nats-auth-policy.script;
|
||||
}
|
||||
{
|
||||
# The far end: a receiver, authenticator, pipeline entry and gateway
|
||||
# route of its own, checking the queue client as audience. Rendered on
|
||||
|
|
|
|||
Loading…
Reference in a new issue