-
Notifications
You must be signed in to change notification settings - Fork 309
Updated CertificateValidationCallBack to build the CaCert bundle with respect to the rootChain certs to verify that they are correct. #860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… respect to the rootChain certs to verify that they are correct.
Welcome @KLazarov! |
could please sign cla and add testcases? |
I have now added the tests for the issue that my code fixes. They are at the bottom of CertificateValidationTests.cs. I'm still waiting from my company to completly fill out the EasyCLA as we got a bit stuck on it during the weekend. |
The EasyCLA has now been accepted. |
I looked into the code and seems your #859 code
makes more sense here the code is verifying if each ca cert on the cert's chain what is your idea? |
The issue that I stumbled upon and I'm trying to fix here is if there is a chain that is multiple steps long in a single file provided by the Service Account. As we are running a managed Kubernetes cluster, we get our Certificates generated by the provider, and in our case there are multiple certificates in the same file, and they describe the full chain. From my understanding running From what I see Do correct me if it's wrong/incorrect. |
ok could you please also remove then /LTGM |
Done. |
@KLazarov: you cannot LGTM your own PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Btw just read in the guide lines about squashing and commit message length: https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md#squashing I will squash it into one commit tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/LTGM
/
you do not have to, it is automatic |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: KLazarov, tg123 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/LGTM |
Implemented fix proposed at: #859
Problem:
Currently the cert verification works only if there is no multi level CA chain that it needs to verify on. If the chain is too long, it will mark
isTrusted
asfalse
.Suggestion
Instead of trying to directly compare the certs, we actually build the cert with the help of the chain and verify that it's correct. If the cert or the chain are broken, then
isTrusted
will befalse
. If the chain and cert is correct, thenisTrusted
will betrue
.