Error "Unable to verify first certificate" on connection
See original GitHub issueI cannot log-in into a cluster if my cluster ca is in the form of certificate-authority-data
(from .kube/config …)
- cluster:
certificate-authority-data: asdfasdfasdfasdfasfdasdfasdfasdf
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:27 (13 by maintainers)
Top Results From Across the Web
Error: unable to verify the first certificate in nodejs
It means that the webserver you are connecting to is misconfigured and did not include the intermediate certificate in the certificate chain it...
Read more >Unable to Verify First Cert Issue - Enable SSL Cert Verification
Navigate to Certificate > Web Hosting > Certificates and select your SSL cert · Then right click and select “All Task” & “Export”...
Read more >Postman responds to API calls with "Error: Unable to verify the ...
Postman does not attempt to access the users certificate store to validate the Security Controls ST Root Authority certificate.
Read more >Unable to Verify the First Certificate with OpenSSL - Pavol Kutaj
This error means that the certificate chain is broken for OpenSSL — but does not have to be for browsers! Why? Because browsers...
Read more >Error: unable to verify the first certificate. How to fix? - NodeBB
As that answer on SO says, the error unable to verify the first certificate means that the webserver you are connecting to is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
One possible cause could be the difference between root CA sourced from Node compared to Golang.
Golang sources from: https://golang.org/src/crypto/x509/root_linux.go While Node sources from: https://github.com/nodejs/node/blob/v11.x/src/node_root_certs.h
The
NODE_EXTRA_CA_CERTS
environment variable is used by Node as a way to add extra CA certificates, as documented in https://nodejs.org/api/cli.html#cli_node_extra_ca_certs_file. It must be a file containing certificates in PEM format.From the Node documentation, neither the well known nor extra certificates are used when the
ca
options property is explicitly specified for a TLS or HTTPS client, which is what Kubebox is doing when thecertificate-authority-data
field is present in the kubeconfig file. So that may explain why the error occurs whencertificate-authority-data
is present.It’d be awesome if someone facing the issue could try setting the
NODE_EXTRA_CA_CERTS
, with a file containing certificates from https://golang.org/src/crypto/x509/root_linux.go.For the error occurring with
certificate-authority-data
present in kubeconfig file, it may be that intermediate certificates have to be bundled in the field, e.g.:If someone facing the issue for that case could be doing the test, that’d be awesome as well.
Otherwise, it’d be great if someone facing the issue could confirm the above, by providing the server certificate full chain, and the non-redacted
certificate-authority-data
value if present.@cscetbon let me re-open #21 then.