keep authelia's oidc client secrets in the store, not on disk
The mint creates each client's secret in the swarm secret store and writes only the digest to disk. It mints only when the store answers and holds none. A new unit moves the plaintext files an earlier release left into the store and removes each once the store holds the same value. The bridge reads its secret from the store into /run before each start. The secret publisher unit and its path unit are gone.
This commit is contained in:
parent
e334e677e0
commit
d30cb7d122
1 changed files with 1086 additions and 486 deletions
|
|
@ -352,14 +352,15 @@ let
|
|||
{
|
||||
# The writer and the reader spell the path independently; this is the
|
||||
# one place that sees both rendered.
|
||||
name = "the hive collector reads the path the secret publisher writes";
|
||||
name = "the hive collector reads the path the mint writes";
|
||||
ok =
|
||||
let
|
||||
fetch = builtins.unsafeDiscardStringContext (hiveOtelFetch hiveOtelAllLocal).script;
|
||||
publish = builtins.unsafeDiscardStringContext hiveOtelAllLocal.containers.swarm-authelia.config.systemd.services.swarm-secret-publish.script;
|
||||
publish = builtins.unsafeDiscardStringContext hiveOtelAllLocal.containers.swarm-authelia.config.systemd.services.authelia-swarm-secrets.script;
|
||||
path = "secret/swarm/hives/h1/oidc/client";
|
||||
in
|
||||
lib.hasInfix "bao kv get -field=value ${path}" fetch && lib.hasInfix "bao kv put ${path} " publish;
|
||||
lib.hasInfix "bao kv get -field=value ${path}" fetch
|
||||
&& lib.hasInfix "mint_client_secret hive-h1 ${path}" publish;
|
||||
}
|
||||
{
|
||||
# The store's units exist only on its host. The PKI unit is wanted, never
|
||||
|
|
|
|||
Loading…
Reference in a new issue