Repository navigation
Improve CertificateRequest's CSR validation code - #6056
Conversation
6f6f942 to
f99b0c8
Compare
|
/retest |
f99b0c8 to
c9f90cd
Compare
1a64f12 to
d54b604
Compare
d54b604 to
810b301
Compare
SgtCoDFish
left a comment
There was a problem hiding this comment.
I like the desire to refactor this and make it clearer - I'm a little scared by the unsafe and the mystery ClientAuth validation stuff though!
4f73e9b to
82fa269
Compare
SgtCoDFish
left a comment
There was a problem hiding this comment.
/lgtm
/approve
/hold
I don't see anything here which should block merging, but I'm leaving a hold just for the breaking changes. Feel free to unhold or make non-breaking, I don't really mind either way!
There was a problem hiding this comment.
note: This file has a bunch of breaking changes in it. I suspect not many will be using any of these functions externally to cert-manager, but any breakage feels a little icky to me and I don't think we need break people here. I don't think it's a blocker though
82fa269 to
7f4f536
Compare
059d960 to
8793376
Compare
8793376 to
a214afd
Compare
|
I split #6199 out of this PR first. DONE |
e6cbfb6 to
905e0a9
Compare
Signed-off-by: Tim Ramlot <[email protected]>
905e0a9 to
4d7f628
Compare
| wantE: []*field.Error{}, | ||
| a: someAdmissionRequest, | ||
| wantE: []*field.Error{ | ||
| field.Invalid(fldPath.Child("request"), nil, "encoded CSR error: the KeyUsages [] do not match the expected KeyUsages [ 'digital signature', 'key encipherment' ]"), |
There was a problem hiding this comment.
This behavior is more correct, if a empty set of KeyUsages is encoded, we still want to compare it to the Usages array,
SgtCoDFish
left a comment
There was a problem hiding this comment.
/lgtm
/approve
/unhold
I see no reason not to merge! My existing comments about whether or not this should be a feature gate remain, but we can merge this to move forwards in any case!
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: inteon, SgtCoDFish The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The CSR validation code is too complex and behaves unexpectedly in some scenarios.
Simply put, we want what is encoded CSR to match what is encoded in the CertificateRequest resource.
Currently there are some gaps in this validation logic (see tests for more info).
Kind
/kind cleanup
/kind bug
Release Note