Skip to content
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

Issue with two SSL endpoints and two self signed CAs in ca_certs #2981

Open
williamhargrove opened this issue Oct 8, 2020 · 0 comments
Open

Comments

@williamhargrove
Copy link

williamhargrove commented Oct 8, 2020

Hi,

I am having an issue with elastalert connecting to an ES cluster over SSL using a self signed certificate issued by a private CA whilst also configuring an http "post" alert which is configured to hit an SSL endpoint using a self signed certificate signed by a different private CA. Unfortunately I am not in a position to be able to change this architecture.

I am running the elastalert 3.0.0-beta.1 docker image.

config.yaml:

es_host: elastic1
es_port: 9200

use_ssl: True
verify_certs: True
ca_certs: /opt/elastalert/root-ca.pem

The ca_certs file above contains the private CA that was used to sign the self-signed certificates issued to the elastic1 host.

This configuration works well and if I setup email based alerting, alerts matching my search criteria will be sent out.

Now I have setup an http_post_url to a server with a self signed cert issued by a different private CA.

http_post_url: "https://alertbot1:8079/sendJsonPayload"

Using this configuration, when an alert is fired I get a 'bad handshake Error' - certificate verify failed message in the log files, as shown below:

image

I then tried to add the private CA that signed the certificate issued to 'alertbot1' into the root-ca.pem file above (so it contained both root CAs). Having done that I get the same error as above.

It suggests to me that the file referenced by ca_certs above cannot contain more than one CA cert?

If I set

verify_certs: False
#ca_certs: /opt/.....

I get the following warning:

image

But the message is never delivered to the http_post_url endpoint.

Any suggestions or pointers on how I can move forward with this would be very gratefully received.

Thanks, Will.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant