-
Notifications
You must be signed in to change notification settings - Fork 0
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
Apache + Nginx requires key path to exist #118
Comments
To set up a Debian machine with Apache (for some reason Debian instructions are completely different than other Linux distributions for Apache):
|
For some reason, the initial error message I was getting about a week ago was that it couldn't find the key file (as was expected, since the file didn't exist). Now, the error I get is: $ sudo apache2ctl configtest
AH00526: Syntax error on line 3 of /etc/apache2/sites-enabled/default-ssl.conf:
SSLCryptoDevice: Invalid argument; must be one of: 'builtin' (none), 'rdrand' (Intel RDRAND engine), 'dynamic' (Dynamic engine loading support)
Action 'configtest' failed.
The Apache error log may have more information. The reason why the error might have changed is that perhaps initially I forgot to include the Interestingly, the documentation for
However, running
So maybe this is a bug with Apache; not immediately sure. I found a proposed workaround at https://serverfault.com/a/786372, but I unfortunately did not have time to try it out. |
Apache and Nginx do some preprocessing of the key path specified in the configuration to ensure that the key path is a real file. The key loader function will most likely need to read from a real file as a result.
As stated in the original design document:
It is unclear if Apache requires the key file to be PEM-encoded, though some of the error messages I got when testing strongly suggest that it does do some PEM-processing of the key. If this is the case, this would require much more additional legwork to figure out an easy way for users to generate PEM-encoded keys for Apache.
I was not able to determine if Nginx also requires the key file to be PEM-encoded.
Despite this limitation, Luna HSM appears to still use the “interpret the input file path as the actual key resource ID” approach and seems to have some work around for it in Apache (though it’s not immediately clear how it works). See https://www.youtube.com/watch?v=ur4JyzP1FBc for Luna’s guide to integrating the Luna HSM engine with Apache.
The text was updated successfully, but these errors were encountered: