Repository navigation
fix(core): fail at once on an encrypted TLS key - #118
Merged
Merged
Conversation
- validate_tls_files loads the key with an empty password, so a passphrase-protected key stops startup with a message instead of OpenSSL prompting for one - the pyproject notes say the image runs app/serve.py, not fastapi run - INSTALL says the key must be unencrypted and the TLS settings belong in the .env Compose reads, so the healthcheck sees them Signed-off-by: Simon van Lierde <simonvanlierde@gmail.com>
Merging this PR will not alter performance1 warning
Comparing |
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.
Three small follow-ups to the local HTTPS support in 0.7.2, from a correctness review of the release.
TLS_KEY_FILEmade OpenSSL try to prompt for the password: in the container that failed with a cryptic[Errno 22] Invalid argument, and on a host with a terminal startup would wait at the prompt.validate_tls_filesnow loads the key with an empty password, so it fails at once with "the key must be unencrypted".pyproject.tomlstill said the image runsfastapi run; it runsapp/serve.pysince 0.7.2..envnext tocompose.yml, so the container's healthcheck sees them too.Tests: the new encrypted-key test failed with the
[Errno 22]message before the change.just checkpasses (946 passed).