-
Notifications
You must be signed in to change notification settings - Fork 4.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
Cherry-pick #19584 to 7.x: tlscommon: require cert in ServerConfig.Validate #19692
Conversation
* tlscommon: require cert in ServerConfig.Validate It does not make sense to configure server-side TLS without specifying a certificate and key pair. Check that both a certificate and key are configured. We were previously checking that both or neither were specified. (cherry picked from commit c63cd32)
Pinging @elastic/integrations-services (Team:Services) |
Can someone please merge this for me, once it's approved and passes CI? I'm on vacation this week. |
💔 Tests FailedExpand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures
--------------------- >> end captured stdout << ----------------------
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
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
Cherry-pick of PR #19584 to 7.x branch. Original message:
What does this PR do?
When validating server-side TLS config, ensure there is a certificate and key pair.
Why is it important?
It does not make sense to configure server-side TLS without specifying a certificate and key pair. If users enable TLS (
ssl.enabled
) for a server (e.g. APM Server) but do not specify a certificate or key file, then they should receive a helpful error message indicating that the configuration is missing.Checklist
- [ ] I have made corresponding changes to the documentation(The metricbeat docs talk about client cert/key only; the APM Server docs already state that these config fields are required.)- [ ] I have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
It should exit with an error containing the phrase "certificate file not configured".
Related issues
elastic/apm-server#3908