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
|
|
@ -6,7 +6,7 @@
|
|||
//! `swarm_secret_client::queue::controller_client_path`, read at start under
|
||||
//! this daemon's own certificate, held only in memory and read again when
|
||||
//! authelia refuses it (`swarm_secret_client::stored_secret`). It is never on
|
||||
//! this host's disk. `swarm-secret-publish`, in authelia's
|
||||
//! this host's disk. authelia's mint (`authelia-swarm-secrets`), in its
|
||||
//! container, puts it there.
|
||||
//!
|
||||
//! [`init`] runs once in `main`, before anything calls [`get`].
|
||||
|
|
@ -114,8 +114,8 @@ async fn fetch_secret() -> Result<String> {
|
|||
match stored {
|
||||
Some(c) if !c.value.trim().is_empty() => Ok(c.value.trim().to_owned()),
|
||||
_ => bail!(
|
||||
"nothing at {path}: swarm-secret-publish, in authelia's container, has not \
|
||||
published this daemon's client secret"
|
||||
"nothing at {path}: authelia's mint, in its container, has not \
|
||||
stored this daemon's client secret"
|
||||
),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue