Add --no-secrets-in-config command line option #18092
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds the
--no-secrets-in-config
command line option that makes Synapse reject all configurations containing keys with in-line secret values. Currently this rejectsturn_shared_secret
registration_shared_secret
macaroon_secret_key
recaptcha_private_key
recaptcha_public_key
experimental_features.msc3861.client_secret
experimental_features.msc3861.jwk
experimental_features.msc3861.admin_token
form_secret
redis.password
This PR complements my other PRs1 that add the corresponding
_path
variants for this class of config options. It enables admins to enforce a policy of no secrets in configuration files and guards against accident and malice.Because I consider the flag
--no-secrets-in-config
to be security-relevant, I did not add a corresponding--secrets-in-config
flag; this way, if Synapse command line options are appended at various places, there is no way to weaken the once-set setting with a succeeding flag.Pull Request Checklist
EventStore
toEventWorkerStore
.".code blocks
.(run the linters)
Footnotes
#17690, #17717, #17983, #17984, #18004, #18090 ↩