TLS handshake fails
Core Clusters connect to CDM Node on port 6237 over TLS. The handshake fails in two cases. The certificate that CDM Node serves does not match the domain of the Core Cluster, or the Core Cluster does not trust the issuer of the certificate. The Core Cluster cannot join CDM until the handshake succeeds.
Symptoms
-
The log of the Cennso Agent on the Core Cluster contains a TLS error that includes
x509. Typical messages arecertificate is valid for ..., not ...for a name mismatch andcertificate signed by unknown authorityfor an untrusted issuer. -
The
opensslcheck from your workstation reports a verification error. The check connects with the domain that the Core Cluster uses:bashFor a name mismatch, the output is:
textFor a certificate from an issuer that your workstation does not trust, the output names the verification error. For example, a self-signed certificate gives:
text
Possible causes
-
The certificate does not contain a name that matches the domain. A wildcard name matches exactly one DNS label, so
*.test.example.netdoes not matchcdm-node.public.test.example.net. To list the names in the certificate that CDM Node serves, run:bash -
The certificate comes from an issuer that is not publicly trusted. To show the issuer, run:
bash
Solution
To resolve this issue, correct the certificate:
If a name is missing, add it to
spec.dnsNamesof thecdm-tls-certCertificate and apply the resource. Add one wildcard for each domain level, for example*.public.test.example.net. For the steps, see Configure the CDM TLS certificate.If the issuer is not publicly trusted, change
spec.issuerRefof the Certificate to aClusterIssuerthat uses a publicly trusted certificate authority.Wait until CDM Node serves the new certificate. CDM Node 1.7.0 and later restart by themselves. For earlier versions, see CDM Node serves an old certificate.
Run the
opensslcheck again. The output isVerification: OKwhen the certificate is correct.