Repository navigation
Conversation
Every secret that the config holds inline can now be read from a separate file: admin.password_hash, admin.session_secret, admin.protocol_login_pin_hash, turn.password, network.localkey and network.mqtt_password. This keeps secrets out of config files that are generated by tools or stored in world-readable places, and works with Docker secrets, systemd credentials and similar mechanisms. Inline values keep working unchanged.
The MITM launcher reads admin.session_secret to enable protocol session sync. It now also reads admin.session_secret_file and reports a file that cannot be read. Inline secrets that are not strings, such as a numeric MQTT password, keep their previous value.
diferhe
force-pushed
the
feat/config-secret-files
branch
from
November 29, 2026 11:14
78018a0 to
4fdcc08
Compare
1 of 2 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
Every secret that
config.tomlholds inline can now be read from a separate file instead, by adding_fileto the key:admin.password_hash_fileadmin.session_secret_fileadmin.protocol_login_pin_hash_fileturn.password_filenetwork.localkey_filenetwork.mqtt_password_fileThis keeps secrets out of config files that are generated by tools or stored in world-readable places, and works with Docker secrets, systemd credentials, sops-nix, agenix and similar tools. The existing
tls.*_fileoptions already work this way.Details:
tls.*_fileoptions._filevariant is an error, because it is unclear which one should win.mitm_redirect.pyreadsadmin.session_secretto enable protocol session sync. It now also understandsadmin.session_secret_file, follows a symlinkedconfig.tomllike the server does, and reports a file it cannot read.The options are documented in
config.example.toml.Before you open this PR (optional, but very helpful)
PRs I reviewed:
Proof that it works
Tested on:
What I did and what happened:
New tests in
tests/test_config.pyandtests/test_mitm_redirect.pycover:session_secret_filein the MITM launcher, a file it cannot read, and a symlinked configuv run pytest -qpasses in full.Screenshots (required for any UI change)
No UI changes.