[bitnami/elasticsearch] with autoGenerated:true yields incorrect certificate for elasticsearch service. #31469
Labels
elasticsearch
tech-issues
The user has a technical issue about an application
triage
Triage is needed
Name and Version
bitnami/elasticsearch-21.4.2
What architecture are you using?
amd64
What steps will reproduce the bug?
When installing with bitnami/elasticsearch using helm with
security.tls.autoGenerated:true
(see values.yaml), rollout is successful and everything seems to work fine.However when connecting to the elastic search using ..svc.cluster.local (or just the less qualified, as
elasticsearch
) the certificate returned is NOT signed forCN: elasticsearch
but instead signed usingCN: elasticsearch-coordinating
, and Alternate Names:elasticsearch
(amongst others).Given that by default, OpenSSL::SSL.verify_certificate_identity checks the common name (CN) field in the certificate... not the SAN... using
OpenSSL::SSL::VERIFY_PEER
seems impossible to configure?Are you using any custom parameters or values?
helm upgrade --install elasticsearch oci://registry-1.docker.io/bitnamicharts/elasticsearch --create-namespace -n test-ns --values values.yaml
with the following:
What is the expected behavior?
I would expect that connecting to
elasticsearch
directly, using OpenSSL:SSL:VERIFY_PEER and the correct ca_file would function.I understand bitnami/redis, bitnami/postgres and others are not exactly following the same layer topology / k8s components, but they do work with VERIFY_PEER
What do you see instead?
certificate returned by connecting to
elasticsearch
, clearly showing CN aselasticsearch-coordinating
:Additional information
I understand a quick (and dirty) approach is to use VERIFY_NONE, however I'm not a fan of cutting corners when corners needn't be cut.
Connecting to elasticsearch-coordinating-hl service would yield the same problem (
CN: elasticsearch-coordinating
).I created my own certificates but that seemed problematic when spinning off the chart resulting in
SSL/TLS request received but SSL/TLS is not enabled on this node, got (16,3,1,7),
, hence being unsuccessful 😭Any additional information or guidance towards achieving VERIFY_PEER would be great, I'd sure consider contributing some additional documentation once I have this to work!
... unless I'm missing something here?!
The text was updated successfully, but these errors were encountered: