-
Notifications
You must be signed in to change notification settings - Fork 134
Configuration options to support an additional client TLS cert in addition to the server certificate #312
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
thelabdude
merged 13 commits into
apache:main
from
thelabdude:issue-300-mtls-client-cert
Sep 1, 2021
Merged
Configuration options to support an additional client TLS cert in addition to the server certificate #312
thelabdude
merged 13 commits into
apache:main
from
thelabdude:issue-300-mtls-client-cert
Sep 1, 2021
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
2237ccf to
1adf882
Compare
thelabdude
commented
Aug 30, 2021
thelabdude
commented
Aug 30, 2021
thelabdude
commented
Aug 30, 2021
b8c1aba to
537b425
Compare
Contributor
HoustonPutman
left a comment
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.
Looks really good! Don't have many comments to make other than small things.
…, leave blank for true
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.
Fixes #300
Solr supports using a different TLS certificate (keystore & truststore) for making client requests (to other Solr pods) than the server certificate. This PR enhances the TLS configuration options to support this additional client certificate.
I also cleaned up the Prometheus exporter TLS code to allow only using a truststore as the exporter doesn't need a keystore unless mTLS is enabled since the exporter only exposes HTTP endpoints. In other words, the exporter config should support users only providing a truststore and not require a keystore (for flexibility).
I also renamed
mountedServerTLSDirtomountedTLSDirsince I introduced aspec.SolrClientTLSto theSolrCloudSpecstruct; this is a new struct added for v0.4.0, so no back-compat concerns with this rename. When I originally createdmountedServerTLSDir, I was thinking I would have amountedClientTLSDiras well for this feature but I think having an additional top-levelSolrClientTLSon theSolrCloudSpecis better since we don't want to introduceClientKeystore+ClientKeystorePassword+ClientTruststore... for the non-mounted dir option. Also,mountedTLSDirworks better for the Prometheus exporter CRD since it's only a TLS client and doesn't serve HTTPs traffic.It probably doesn't make sense to review the "diff" for
controllers/util/solr_tls_util.goand instead just go over the entire file since I had to make so many changes there to accommodate these changes.Here's an example SolrCloud config to put these changes into context: