Commit Graph

66 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
joshvanl
e804431dba Fire event for informational purposes when the CertificateRequest has not yet been approved.
Signed-off-by: joshvanl <me@joshvanl.dev>
2022-10-23 18:04:58 +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
irbekrm
591fb3cfc9 Code review feedback
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-04-28 10:12:16 +01:00
irbekrm
cb0c8ba3e3 Log Venafi API calls
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-04-20 10:32:02 +01:00
irbekrm
99edfcfbfc Adds Venafi metrics
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-04-20 08:48:41 +01: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
bd18c0ed86 Update CertificateRequest controllers to use new controller factory
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
d69a4e1a3c Change ParseCertificateChain to ParseSingleCertificateChain
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-05-12 14:15:54 +01:00
joshvanl
1030bbadb5 Change Venafi Signer to use ParseCertificateChain to populate Status.CA
correctly

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-05-12 14:14:47 +01:00
Richard Wall
c9eb75c447 Remove unused test-case field
pkg/controller/certificaterequests/venafi/venafi_test.go:787:2                           structcheck  `issuer` is unused

Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2021-05-07 09:55:09 +01:00
Richard Wall
c15d30742d Remove duplicate import
pkg/controller/certificaterequests/venafi/venafi_test.go:43:2: package "github.com/jetstack/cert-manager/pkg/controller/test" is being imported more than once (ST1019)
pkg/controller/certificaterequests/venafi/venafi_test.go:44:2: other import of "github.com/jetstack/cert-manager/pkg/controller/test"

Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2021-05-04 14:50:37 +01:00
joshvanl
e05adbf06b Remove expected events when Ready Denied condition set
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-04-09 18:20:07 +01:00
joshvanl
50a84eaf1d Sets the Ready condition to False when a request is Denied
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-04-09 15:34:32 +01:00
joshvanl
32d0c5af4e Updates Approved/Denied tests for new reasons
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-03-17 13:10:39 +00:00
joshvanl
a3e63b1787 Update CertificateRequest controllers to use new Denied type, and add
tests for when a CertificateRequest is denied

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-03-17 13:10:39 +00:00
joshvanl
e62e8c517b Updates CertificateRequest signer tests to check Approved behaviour
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-03-17 13:10:39 +00:00
Richard Wall
50a388a8a1 Fix unit tests
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2021-01-20 14:26:43 +00:00
Richard Wall
95d26b7c60 Extract the CA from Venafi response
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2021-01-20 14:14:48 +00:00
Maartje Eyskens
ab0cd57dc5 Use The cert-manager Authors.
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-12-11 19:04:13 +01:00
Maartje Eyskens
1788a9d758 Update copyright to cert-manager project
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-12-08 19:04:49 +01:00
Richard Wall
f3f321bbbc Update to vcert v4.11.0
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-10-08 15:02:50 +01:00
Richard Wall
55514f048c Move Venafi Pickup ID annotation key to the external API package
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-21 10:27:47 +01:00
Richard Wall
81eb53f597 ./hack/update-all.sh
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-20 14:28:06 +01:00
Richard Wall
a70298180a Run a script to update v1alpha2 usage to v1
Script is available at https://github.com/jetstack/cert-manager/pull/3201

Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-20 14:26:51 +01:00
Maartje Eyskens
827ce9c5ad Revert log levels on errors
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-12 10:59:42 +02:00
Maartje Eyskens
86dee5ed41 Set error log levels
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-12 10:59:41 +02:00
Maartje Eyskens
fecd0b3518 Set all log levels for info
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-12 10:59:41 +02:00
Maartje Eyskens
657a410178 Fix tests
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-07-10 16:20:50 +02:00
Maartje Eyskens
7c01c74b90 Move annotation update logic
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-07-10 11:05:07 +02:00
Maartje Eyskens
e952560810 implement review feedback
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-07-07 14:16:29 +02:00
Maartje Eyskens
35365b79c9 Use venafi.cert-manager.io/pickup-id
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-07-02 10:04:21 +01:00
Maartje Eyskens
00d37aa21d Make wait timeout error less alarming
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-07-02 10:04:21 +01:00
Maartje Eyskens
b81a0af6f8 Implement feedback
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-07-02 10:04:21 +01:00
Maartje Eyskens
63c66ee415 Implement feedback
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-07-02 10:04:21 +01:00
Maartje Eyskens
ca5361d79d Make unit tests work
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-07-02 10:04:21 +01:00
Maartje Eyskens
ac9895d91b Make Venafi issuer async
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-07-02 10:04:21 +01:00
Maartje Eyskens
d40f010180 Error on an invalid custom field type
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-02-12 11:34:28 +01:00
Maartje Eyskens
1ebc9ef56b Properly sort imports
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-02-12 10:29:10 +01:00
Maartje Eyskens
292d7f1e61 Update vcert
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-02-07 09:19:24 +01:00
Maartje Eyskens
1eb4fc6846 Create internalvanafiapi to prevent cyclic imports
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-02-06 11:11:37 +01:00
Maartje Eyskens
e040d4f284 Implement feedback
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-02-06 10:32:06 +01:00
Maartje Eyskens
15b9a940e7 Add tests for custom fields inside internal/venafi
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-02-05 16:14:49 +01:00
Maartje Eyskens
ae742c588e Add tests for custom fields inside certificaterequest controller
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-02-05 15:36:30 +01:00
Maartje Eyskens
93f0cfa717 Use internal CustomField to add json tags
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-02-05 14:12:16 +01:00
Maartje Eyskens
42f3bca6ef Move annotation to apis
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-02-05 14:08:41 +01:00
Maartje Eyskens
6ecc07ba26 Update bazel
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-02-04 15:37:40 +01:00