-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Support decryption of SSL key #3133
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
Merged
Merged
Conversation
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
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
0e32efc to
8cf9ce2
Compare
shell scripts can't be executed in Windows, so let's not bother.
Member
|
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). |
Contributor
Author
|
@MSP-Greg Thanks for the quick review and patch! Could you take a look now? |
MSP-Greg
approved these changes
Apr 29, 2023
Member
|
Great work @stanhu 👍 |
Contributor
Author
|
@nateberkopec Sure thing! When is the next Puma release slated to go out? |
Member
|
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_commandwill 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_passwordparameter (https://www.nginx.com/blog/secure-distribution-ssl-private-keys-nginx/),
while Apache has a
SSLPassPhraseDialogoption (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.