-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
Description
If your client certificate is issued from an intermediate CA, rather than from the Root CA, then it seems this plugin doesn't send the intermediate with the request, which causes a 401 from Kubernetes. I tested this with check-kube-nodes-ready.rb; I'm unsure if it affects the other plugins, as well.
Steps to reproduce:
- kube-apiserver is running with a Root CA
ROOTas its--client-ca-fileargument. - Issue an intermediate,
INT, fromROOT. - Issue a client cert,
CLI, fromINT. - Configure a sensu-plugins-kubernetes check, either via kubeconfig or directly via flags, to use the
CLIcert and key to authenticate. Include the full chain fromCLIback toROOTin the cert file configured. - Get a 401 from Kubernetes:
Unable to authenticate the request due to an error: x509: certificate signed by unknown authority
If you instead send the INT cert and key, you are able to authenticate.
This makes me suspect that the plugin isn't sending the full chain from the client cert.