Generated a certificate, exported the root and intermediate certificates for the CA
Validated that all certificates can be linked up their chain (actually, even used it for a hello-world webhost just to be absolutely sure they work)
Renamed all the files to the correct naming and created cacerts: ca-cert.pem, ca-key.pem, cert-chain.pem and root-cert.pem
Tried to deploy istio using the manifests/examples/multicluster/values-istio-multicluster-gateways.yaml as per the guide
However, istiod continuously fails to work with the certificate and reports the following error:
Error: failed to create discovery service: failed to create CA: failed to create an istiod CA: certificate is not authorized to sign other certificates
I’ve tried swapping certificates to a legitimate wildcard certificate from GoDaddy but that failed as well. If I delete cacerts or use Istio’s sample certs, the deployment works. I did some digging and found that the sample ca-cert.pem provided with istioctl has the following which my custom CA cert and GoDaddy certificate does not have:
X509v3 Key Usage:
Certificate Sign
Could someone verify if this is a required condition for certificates to work with istiod? Is there an easier way to go about getting a custom CA to work with 1.6.2? My apologies if I missed this in the documentation somewhere, but if anyone could point it out to me, it would help alot, thanks!
Generated a Cert for Istio’s usage (ca-cert.pem & ca-key.pem). This was the extremely tricky part. The cert should have the Key Usage “Certificate Signing” and if you are using the same cfssl version that I am, add the Extended Key Usage “any”*
Combine the above 3 certs into a cert-chain.pem file
Use the 4 files to deploy cacerts as per the Istio guide
*I lack the expertise to explain the necessity behind the “any” Extended Key Usage but I got the clue from here: https://github.com/jetstack/cert-manager/issues/2407 on jessedearing’s comment about RFC 5280. If any Extended Key Usage exists, it must conform to the exact usage of the Key. Therefore, without knowing more about Istio’s usage of the Key, I added the “any” value. Please note, this could be insecure.
Hi,
I also used cfssl to create certs and add in istio, now I am not getting this error: “certificate is not authorized to sign other certificates”, but I see this error: “grpc: Server.Serve failed to complete security handshake tls: unknown certificate authority”
Were you able to solve this?
I have started working on istio implementation and able to see some progress. Have got few doubts and I see myself missing something in the documentation…
Currently, I am using a gateway, virtual service, destination rules, authorization services for 2 deployments and I am able to see the graph with mTLS enabled in the kiali dashboard. and it’s all working fine.
As I have to use now GoDaddy CA certs , gone through the documentation regarding " Plug in certificates and key into the cluster ", looks like during the fresh installation of the istio it’s picking custom CA certs but with below errors
2022-02-03T16:23:31.337162Z info initializing mesh networks from mesh config watcher
2022-02-03T16:23:31.337167Z info initializing mesh handlers
2022-02-03T16:23:31.337178Z info creating CA and initializing public key
2022-02-03T16:23:31.337214Z info Use local CA certificate
Error: failed to create discovery service: failed to create CA: failed to create an istiod CA: certificate is not authorized to sign other certificates
2022-02-03T16:23:31.338090Z error failed to create discovery service: failed to create CA: failed to create an istiod CA: certificate is not authorized to sign other certificates
I am a bit stuck in this and exploring for any other approaches if I have to look into anything if I am missing.
Can you please advise with some of the inputs regarding this