-
Notifications
You must be signed in to change notification settings - Fork 34
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
Allow CSR that contains either IP or DNS as SANs #22
base: master
Are you sure you want to change the base?
Conversation
@jnummelin I really don't want to annoy anyone, but having this PR merged would be really, really helpful |
@dbaumgarten no worries. I haven't been working with stamper (or any other kontena org projects) in a good while and hence all the notifications from these have fallen into /dev/null unfortunately. I'll be looking at all the open PRs in coming week or so. |
@@ -73,7 +73,7 @@ func isNodeServingCert(csr *capi.CertificateSigningRequest, x509cr *x509.Certifi | |||
klog.Warningf("Org does not match: %s", x509cr.Subject.Organization) | |||
return false | |||
} | |||
if (len(x509cr.DNSNames) < 1) || (len(x509cr.IPAddresses) < 1) { | |||
if (len(x509cr.DNSNames) < 1) && (len(x509cr.IPAddresses) < 1) { | |||
return false |
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.
As defined in the original issue #35 maybe we should also log here something why we're rejecting the CSR. I.e. something like No DNS or IP addresses given in CSR
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.
Added! 6041f9f
a89c0d0
to
6041f9f
Compare
In some environments, kubelet may only send IP addresses or DNS address as SANs in CSR. For example, kubelet which starts with `--hostname-override=IP_ADDRRES` only sends IP addresses. So we should allow this CSR.
6041f9f
to
d5f08cd
Compare
In some environments, kubelet may only send IP addresses or DNS
address as SANs in CSR. For example, kubelet which starts with
--hostname-override=IP_ADDRRES
only sends IP addresses.So we should allow this CSR.