Skip to content

Add Option to Generate Secrets Idempotently#331

Open
schrieveslaach wants to merge 1 commit into
masterfrom
idempotent-random-secret-bootstrapping
Open

Add Option to Generate Secrets Idempotently#331
schrieveslaach wants to merge 1 commit into
masterfrom
idempotent-random-secret-bootstrapping

Conversation

@schrieveslaach

Copy link
Copy Markdown
Contributor

In order to avoid that secrets will be re-generated whenever a bootstrapping container on the Kubernetes backend runs, PREvant mounts the previously generated secrets into the next run of the bootstrapping. That means bootstrapping container may lookup if files exists under /run/secrets// and then reuse this value in order to avoid too much randomness when generating passwords.

For example, if a bootstrapping container generates a OpenID client secret, the second time the bootstrapping runs, it can re-use the already existing secret.

Fixes #328

In order to avoid that secrets will be re-generated whenever a
bootstrapping container on the Kubernetes backend runs, PREvant mounts
the previously generated secrets into the next run of the bootstrapping.
That means bootstrapping container may lookup if files exists under
/run/secrets/<secret-name>/<secret-key> and then reuse this value in
order to avoid too much randomness when generating passwords.

For example, if a bootstrapping container generates a OpenID client
secret, the second time the bootstrapping runs, it can re-use the
already existing secret.
@schrieveslaach schrieveslaach force-pushed the idempotent-random-secret-bootstrapping branch from 14c6ebb to dc97fa7 Compare June 17, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Idempotent Generation of Random Generated Secrets in Companion Bootstrapping

1 participant