-
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
tlscommon: require cert in ServerConfig.Validate #19584
tlscommon: require cert in ServerConfig.Validate #19584
Conversation
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.
❕ Build Aborted
Expand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
Pinging @elastic/integrations-services (Team:Services) |
jenkins run the tests please |
Checking the last CI output relevant tests did look ok. One flaky test failed, and there have been a few network timeouts when publishing results. |
@axw Can you please backport this to 7.x? Thanks! |
* 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)
* 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.
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