glue: the secret publisher's authelia-dependent settings move out of the publisher module
The publisher's `enable` default read `deploy.authelia.enable` from the publisher's own module (swarm-secret-publisher.nix). It now defaults to `false`, and glue-secret-publisher-authelia.nix sets it `mkDefault true` wherever authelia runs, so the effective value is unchanged. The option loses its `defaultText`, and its description names the glue. The `deploy.authelia.enable` read in `active` stays: every file the unit copies is under authelia's `hostClientSecretDir`, so it is a requirement of the unit, not a co-location toggle. Part of #3742.
This commit is contained in:
parent
c06aa78b63
commit
3be6096c26
4 changed files with 34 additions and 6 deletions
|
|
@ -45,7 +45,9 @@ let
|
|||
haveClientIdentity = cfg.baoClientCertFile != null && cfg.baoClientKeyFile != null;
|
||||
|
||||
# Both halves have to be here: the mint (authelia, for the plaintext) and an
|
||||
# identity (for the store). Neither implies the other.
|
||||
# identity (for the store). Neither implies the other. Authelia here is a
|
||||
# requirement, not a co-location toggle: every file the unit copies is under
|
||||
# its `hostClientSecretDir`.
|
||||
active = cfg.enable && deployCfg.authelia.enable && haveClientIdentity;
|
||||
|
||||
hiveNames = lib.attrNames hyperhiveCfg.swarm.hives;
|
||||
|
|
@ -103,8 +105,7 @@ in
|
|||
options.services.hyperhive.deploy.swarm-secret-publisher = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = deployCfg.authelia.enable;
|
||||
defaultText = lib.literalExpression "deploy.authelia.enable";
|
||||
default = false;
|
||||
description = ''
|
||||
Publish the OIDC client secrets this host mints into the swarm's
|
||||
secret store, so a hive that does not run authelia can read its
|
||||
|
|
@ -112,8 +113,9 @@ in
|
|||
controller can read its own — from wherever it runs, this host
|
||||
included.
|
||||
|
||||
Defaults to whether this host mints the OIDC secrets, which is the
|
||||
only half of the question that is a property of *this* host.
|
||||
Defaults to whether this host mints the OIDC secrets (set by
|
||||
`glue-secret-publisher-authelia.nix`), which is the only half of the
|
||||
question that is a property of *this* host.
|
||||
|
||||
⚠️ Deliberately **not** `deploy.bao.enable`. That asks whether the
|
||||
store stands here, and a publisher beside a remote store, holding a
|
||||
|
|
|
|||
Loading…
Reference in a new issue