Cluster creation failed with certificate validation error when using mirror registry with self-signed certificate #1857
Labels
area/airgap
All features for disconnected environments
external
An issue, bug or feature request filed from outside the AWS org
kind/bug
Something isn't working
team/cli
Milestone
What happened:
Failed in validation step during cluster creation due to invalid registry certificate when using self-signed certificate and provided the
registryMirrorConfiguration.caCertContent
fieldWhat you expected to happen:
CA certificate is valid and cluster creation should proceed without any error.
How to reproduce it (as minimally and precisely as possible):
Use registry mirror configuration that has a self-signed certificate and provided the self-signed CA certificate as well in caCertContent field.
Anything else we need to know?:
The CA and server certificate for the registry mirror I was using on harbor was generated using AWS Private CA. When validating server certificate using openssl_client the certificate is valid.
It looks to me that the error message was coming from this validation function. I do not believe CA certificate should have sans name and a better way to validate the certificate would be like what golang x509 Certificate.Verify example in which it takes into consideration both CA certificate and server certificate.
I think the test case that was written here is incorrect as the test certificate is the generated server certificate (server.crt) not the CA certificate that signed it. The function should evaluate
registryMirrorConfiguration.caCertContent
not a certificate that is presented by the server.I also found out that using a registry with self signed certificate helm template doesn't respect
--insecure-skip-tls-verify
which causing cillium deployment to fail. A separate issue is opened in helm github pagehelm/helm#10868
Environment:
v0.8.2
The text was updated successfully, but these errors were encountered: