-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support decryption of SSL key #3133
Merged
Merged
Conversation
This file contains 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
stanhu
force-pushed
the
sh-support-openssl-decrypt-key
branch
2 times, most recently
from
April 29, 2023 05:15
f313f4f
to
0e32efc
Compare
This commit makes it possible to store an encrypted SSL key on disk and have Puma decrypt it at runtime by supplying a `key_password_command`. Supplying a `key_password_command` will cause Puma to: 1. Execute the external program. 2. Read the password from stdout and remove the trailing newline. 2. Configure the OpenSSL callbacks to use the password. Other Web servers, such as NGINX and Apache, have a similar feature. NGINX only allows supplying a password file via the `ssl_password` parameter (https://www.nginx.com/blog/secure-distribution-ssl-private-keys-nginx/), while Apache has a `SSLPassPhraseDialog` option (https://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslpassphrasedialog) that allows an admin to execute an external program. Closes puma#3132
stanhu
force-pushed
the
sh-support-openssl-decrypt-key
branch
from
April 29, 2023 05:21
0e32efc
to
8cf9ce2
Compare
shell scripts can't be executed in Windows, so let's not bother.
Thank you for the PR. Good idea. Re the Windows tests, I think they'll run and pass with the changes at MSP-Greg@096b970f01 (or the patch). |
@MSP-Greg Thanks for the quick review and patch! Could you take a look now? |
MSP-Greg
approved these changes
Apr 29, 2023
Great work @stanhu 👍 |
@nateberkopec Sure thing! When is the next Puma release slated to go out? |
Probably 2 weeks |
maxlazio
pushed a commit
to gitlabhq/omnibus-gitlab
that referenced
this pull request
Jun 8, 2023
This commit adds support for `puma['ssl_key_password_command']` to make it possible to store encrypted SSL keys on disk. This requires Puma v6.3.0 (puma/puma#3133) to work: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/122200. Relates to https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/7799 Changelog: added
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.
This pull request makes it possible to store an encrypted SSL key on disk and have Puma decrypt it at runtime by supplying a
key_password_command
. Supplying akey_password_command
will cause Puma to:Other Web servers, such as NGINX and Apache, have a similar feature.
NGINX only allows supplying a password file via the
ssl_password
parameter (https://www.nginx.com/blog/secure-distribution-ssl-private-keys-nginx/),
while Apache has a
SSLPassPhraseDialog
option (https://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslpassphrasedialog) that allows an admin to execute an external program.Closes #3132
Description
Please describe your pull request. Thank you for contributing! You're the best.
Your checklist for this pull request
[ci skip]
to the title of the PR.#issue
" to the PR description or my commit messages.