-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Allow test-with-ssl-plugin to be used in FIPS #66554
Conversation
Selectively use PEM files instead of keystores so that the plugin can be applied to projects even if these would run in fips mode
Pinging @elastic/es-delivery (Team:Delivery) |
@elasticmachine update branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -18,3 +18,11 @@ The certificates are generated using catch-all SAN in the following procedure: | |||
`keytool -export -alias test-client -keystore test-client.jks -storepass keypass -file test-client.crt` | |||
6. Import the client certificate in the node's keystore: | |||
`keytool -import -alias test-client -keystore test-node.jks -storepass keypass -file test-client.crt -noprompt` | |||
7. Convert the node's keystore to PKCS#12 temporarily so that we can export the private key ( as keytool doesn't allow this) | |||
`keytool -importkeystore -srckeystore test-node.jks -srcstorepass keypass -destkeystore test-node.p12 -deststoretype PKCS12 -deststorepass keypass` | |||
8. Export the client's private key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8. Export the client's private key | |
8. Export the node's private key |
`keytool -importkeystore -srckeystore test-node.jks -srcstorepass keypass -destkeystore test-node.p12 -deststoretype PKCS12 -deststorepass keypass` | ||
8. Export the client's private key | ||
`openssl pkcs12 -in test-node.p12 -passin pass:keypass -nocerts -nodes -out test-node.key` | ||
9. Convert the node's keystore to PKCS#12 temporarily so that we can export the private key ( as keytool doesn't allow this) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9. Convert the node's keystore to PKCS#12 temporarily so that we can export the private key ( as keytool doesn't allow this) | |
9. Convert the client's keystore to PKCS#12 temporarily so that we can export the private key ( as keytool doesn't allow this) |
7. Convert the node's keystore to PKCS#12 temporarily so that we can export the private key ( as keytool doesn't allow this) | ||
`keytool -importkeystore -srckeystore test-node.jks -srcstorepass keypass -destkeystore test-node.p12 -deststoretype PKCS12 -deststorepass keypass` | ||
8. Export the client's private key | ||
`openssl pkcs12 -in test-node.p12 -passin pass:keypass -nocerts -nodes -out test-node.key` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any value to have encryption here? Since this file is mainly used for testing FIPS, so most likely the private key will be encrypted in the wild.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have enough coverage for this in unit tests, but on the other hand, why not ? :)
@elasticmachine update branch |
@elasticmachine update branch |
Selectively use PEM files instead of keystores so that the plugin can be applied to projects even if these would run in fips mode
Selectively use PEM files instead of keystores so that the plugin
can be applied to projects even if these would run in fips mode