I am trying to use an ES service from a remote machine, using the cert
copied from the container: podman cp app:/usr/share/elasticsearch/config/certs
But simply doing a client.info() I am getting a elastic_transport.ConnectionTimeout: Connection timed out exception
File ".../miniconda3/envs/ocd4oak/lib/python3.13/site-packages/elastic_transport/_node/_http_urllib3.py", line 167, in perform_request
Doing a simpler, direct curl:
curl -v --cacert .../certs/ca/ca.crt -H "Authorization: ApiKey ...tLU0Jzdw==" --max-time 15 https://192.168.0.240:9200/
complains about the cert (produced by ES) not having a matching subjectAltName:
* subjectAltName does not match ipv4 address 192.168.0.240
* SSL: no alternative certificate subject name matches target ipv4 address '192.168.0.240'
* Closing connection
curl: (60) SSL: no alternative certificate subject name matches target ipv4 address '192.168.0.240'
More details here:
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
Your SSL/TLS certificate does not include the target IP address
(192.168.0.240) in its Subject Alternative Name (SAN) list.When you
connect via an IP address instead of a domain name, modern SSL
verification requires the certificate to explicitly list that IP
address as an IPAddress entry in its SAN.
I see mention of Subject Alternative Name here: Set up HTTPS | Elastic Docs
But it mentions a different format cert: elastic-stack-ca.p12 ; my ES node
has this: ./config/certs/ca
Do I need to create my own cert according to these instructions, or
am I misssing something else?