Commit Graph

18 Commits

Author SHA1 Message Date
Tim Ramlot
0cf0f80b40
switch to non-deprecated functions in source code
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2023-05-10 19:22:49 +02:00
irbekrm
7d592a8270 Swap upstream core informers factory with out wrapper
This does not actually change how the informers work. This also adds a partial metadata client to root context

Signed-off-by: irbekrm <irbekrm@gmail.com>
2023-03-22 09:03:16 +00:00
Tim Ramlot
b999749854
improve gen.CSR and use it everywhere
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2022-11-10 09:21:31 +01:00
Ashley Davis
fb231ab641
Remove bazel 🎉
This removes all .bazel and .bzl files, and a bunch of scripts relating
to bazel, now that it's been entirely replaced.

There are still a few places where traces could be removed, but this
removes the brunt of the bazel stuff that remains.

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-07-26 11:38:50 +01:00
Monis Khan
2a33c7a5c2
Use Kubernetes CSR spec.expirationSeconds to express cert duration
This change adds the ability to express certificate duration using
the Kubernetes CSR spec.expirationSeconds field alongside the existing
approach of using the experimental.cert-manager.io/request-duration
annotation.  Both approaches are supported as the expirationSeconds
field requires Kubernetes v1.22+.

Signed-off-by: Monis Khan <mok@vmware.com>
2022-03-21 09:40:32 -04:00
joshvanl
b426b5acf7 Use UpdateOrApplyStatus in CertificateSigningRequest controllers
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-07 14:18:14 +00:00
Ashley Davis
3a055cc2f5
rename all uses of github.com/jetstack/cert-manager
This was done by running the following command twice:

 ```bash
 grep -Ri "github.com/jetstack/cert-manager" . | \
 cut -d":" -f1 | \
 sort | \
 uniq | \
 xargs sed -i
 "s/github.com\/jetstack\/cert-manager/github.com\/cert-manager\/cert-manager/"
 ```

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-02-02 09:08:31 +00:00
joshvanl
fb391a26e5 Update CertificateSigningRequest controller to use new ContextFactory
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-01-27 12:51:49 +00:00
Ashley Davis
68f5ceb3b4
Fix manually specified Certificate and CertificateRequest versions
Basically all modern X.509 certs are version 3, but confusingly to
specify "version 3" in an encoded cert, the version number is actually
2.

For PKCS#10 CSRs, the only valid version is 1, which again
confusingly has the value "0" when encoded.

This was incorrect in many places, including one place in which the
version number on a CSR was used as a certificate's version number,
when the two are entirely unrelated.

Go ignores these values, so there's no functional changes here; still,
it's better to be accurate.

Go ignoring CSR version and specifying 0:
https://cs.opensource.google/go/go/+/refs/tags/go1.17:src/crypto/x509/x509.go;l=1958

Go ignoring Certificate version and specifying 2:
https://cs.opensource.google/go/go/+/refs/tags/go1.17:src/crypto/x509/x509.go;l=1534

PKCS#10 CSR specification in RFC 2986 section 4.1:
https://datatracker.ietf.org/doc/html/rfc2986#section-4

X.509 Cert specification in RFC 5280 section 4.1.2.1:
https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.1

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2021-08-19 14:48:12 +01:00
joshvanl
37dbf770da Fire event when CertificateSigningRequest hasn't been signed yet
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-07-20 10:39:27 +01:00
joshvanl
7e8bf731b2 Remove the experimental.cert-manager.io/ca annotation from the
CertificateSigningRequest

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-06-25 16:02:37 +01:00
joshvanl
d5007c2e37 Adds the CertificateSigningRequest selfsigned controller
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-06-14 10:18:54 +01:00
joshvanl
abdd1f54fa Fix CA CertificateSigningRequest controller to return potential error
from updating failed status

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-06-07 17:48:49 +01:00
joshvanl
36bd7a459c Changes CSR util signername to use if statements rather than switch
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-05-28 10:34:43 +01:00
joshvanl
9e1b0342d0 Updates with review comments
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-05-27 18:48:50 +01:00
joshvanl
e014b6655d Use ca.crt with the CertificateSigningRequest CA controller
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-05-27 10:49:21 +01:00
joshvanl
62dee4783e Adds CertificateSigningRequest CA Issuer controller as optional
controller

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-05-27 00:32:24 +01:00
joshvanl
3b74c34089 Adds CertificateSigningRequest CA Issuer controller
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-05-27 00:25:02 +01:00