Ashley Davis
5e31fa37ff
selfsigned: warn when certs have empty issuer DNs
...
as raised in#3634 - RFC 5280 states that the issuer field cannot be
empty, but this could easily happen with selfsigned certs which had
an empty subject (as the issuer matches the subject when the cert is
self signed)
this commit detects when a cert would be issued selfsigned with an
empty subject DN and emits a warning event, allowing cluster operators
to detect the warning and potentially either re-issue to generate a
compliant cert, or else accept the risk.
Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2021-03-26 11:51:46 +00:00
joshvanl
65acf10858
Don't log error output in approver when CertificateRequest is deleted
...
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-03-17 13:10:39 +00: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
c94ad99731
Updates approver controller to use custom Approved Reason
...
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
09f91a2a99
Update approver controller to use new Denied condition type
...
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
joshvanl
1d758a5ccf
Updates the base CertificateRequest controller to first check for the
...
approval condition to be present and set to true, before processing
further
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-03-17 13:10:39 +00:00
joshvanl
2db7582586
Adds CertificateRequest approver controller. This controller will
...
currently _always_ set the Approved condition to true on
CertificateRequests
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-03-17 13:10:39 +00:00
jetstack-bot
70c66e02a0
Merge pull request #3641 from JoshVanL/certificate-request-identity
...
CertificateRequest UserInfo fields
2021-03-15 14:26:15 +00:00
Maël Valais
f6cb6b8787
ocspServers test: give a link to the TODO issue
...
Signed-off-by: Maël Valais <mael@vls.dev>
2021-03-05 16:57:38 +01:00
Maël Valais
97893e1c69
PR comment: fix misspelling
...
Signed-off-by: Maël Valais <mael@vls.dev>
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2021-03-05 16:42:48 +01:00
Maël Valais
0facd3bdd4
ocspServers field: fix flaky unit test
...
Truncating the time to the second did not seem to be enough. Some CI
builds would fail due to the truncation yielding different times.
Instead of truncating, I propose to use a delta of 1 second.
Signed-off-by: Maël Valais <mael@vls.dev>
2021-03-04 17:20:51 +01:00
jetstack-bot
a9c672e900
Merge pull request #3699 from maelvls/ocsp-unit-test
...
Add unit tests around the new ocspServers field
2021-03-01 19:12:49 +00:00
Maël Valais
e7b3e6c4e5
PR comment: no more "return" in test code
...
Signed-off-by: Maël Valais <mael@vls.dev>
Co-authored-by: Irbe Krumina <irbekrm@gmail.com>
2021-03-01 14:12:02 +01:00
Maël Valais
dc4f0a34e9
PR comment: compare time.Time instead of strings
...
Also removed the unused "givenNamespace"
Signed-off-by: Maël Valais <mael@vls.dev>
Co-authored-by: Irbe Krumina <irbekrm@gmail.com>
2021-02-25 10:28:56 +01:00
Maël Valais
e50f26fc97
PR comment: fix notAfter test case using time.Truncate
...
Signed-off-by: Maël Valais <mael@vls.dev>
Co-authored-by: Irbe Krumina <irbekrm@gmail.com>
2021-02-24 15:07:54 +01:00
Maël Valais
c9dcae2313
ocspServers field: add unit test
...
Signed-off-by: Maël Valais <mael@vls.dev>
2021-02-24 11:05:59 +01:00
Lars Lehtonen
0270377f6c
pkg/controller/certificaterequests/acme: fix dropped test error
...
Signed-off-by: Lars Lehtonen <lars.lehtonen@gmail.com>
2021-02-23 18:13:37 -08:00
joshvanl
235adea826
Remove CertificateRequest validation in CertificateRequest controllers
...
as this happens at admission time.
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-02-08 19:20:57 +00:00
Maël Valais
ba22785445
Rename ocspServer to oscpServers
...
Signed-off-by: Maël Valais <mael@vls.dev>
Co-authored-by: James Munnelly <james@munnelly.eu>
2021-02-03 11:13:32 +01:00
Hugo Stijns
5f18cce622
add option to specify OCSP server
...
Signed-off-by: Hugo Stijns <hugo@boosboos.net>
Signed-off-by: Maël Valais <mael@vls.dev>
2021-02-03 09:09:03 +01: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
Richard Wall
27d0f011be
Delete Order if its certificate data is bad or unexpected
...
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-12-15 13:46:52 +00:00
Richard Wall
fb01c3b3c2
Tests for handling of Orders with bad certificates
...
* Badly formed certificates, and
* certificates with an unexpected public key.
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-12-15 13:44:59 +00:00
Richard Wall
98e2f1c8f3
Wait for order-controller to add certificate data to the Order
...
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-12-15 10:22:38 +00:00
Richard Wall
02883417ee
Re-organise the handling of non-failed but not-yet-valid Orders
...
Exit early in this case and move the happy case to the end of the function.
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-12-15 10:22:38 +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
Maartje Eyskens
d705838e83
Implement feedback
...
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-11-20 09:46:49 +01:00
Maartje Eyskens
66f787ef33
Fix a lost EnableNotAfterDate
...
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-11-20 09:46:49 +01:00
Maartje Eyskens
04d88479e4
Pass duration on until ACME order creation
...
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-11-20 09:46:49 +01:00
Maartje Eyskens
1b33e8029a
Fix unit tests
...
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-11-20 09:46:08 +01:00
Maartje Eyskens
7b6573aa35
Add duration into ACME
...
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-11-20 09:45:32 +01:00
jetstack-bot
8e0e858199
Merge pull request #3288 from meyskens/acme-ip
...
Add support for IPs in ACME
2020-10-16 10:48:15 +02: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
Maartje Eyskens
d8023a79d0
Fix error format
...
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-10-08 15:24:56 +02:00
Maartje Eyskens
542b329914
Implement feedback
...
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-10-08 15:24:56 +02:00
Maartje Eyskens
1cbfe49938
Fix CN check for IPs as well as add tests
...
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-10-08 15:24:56 +02:00
Maartje Eyskens
58b462eef9
Fix nil in spec
...
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-10-08 15:24:56 +02:00
Maartje Eyskens
39de7f3b99
Fix IP type
...
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-10-08 15:24:56 +02:00
Maartje Eyskens
b3e25815a5
Add support for IPs in ACME
...
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-10-08 15:24:56 +02:00
Maartje Eyskens
9d0a1b136e
Update pkg/controller/certificaterequests/acme/acme.go
...
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
Co-authored-by: Richard Wall <wallrj@users.noreply.github.com>
2020-09-01 15:05:48 +02:00
Maartje Eyskens
6756856e82
Nil out request in spec again for order
...
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-31 10:08:54 +02:00
Maartje Eyskens
f1c6c93df5
Fix CR and make a general function
...
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-28 15:06:54 +02:00
Maartje Eyskens
69186afbdd
Move logic to utils
...
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-28 09:59:48 +02:00
Maartje Eyskens
bb89b50c8f
Fix invalid DNS-1123 on ACME computed names
...
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-28 09:54:18 +02: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
821d824cc2
Revert renaming of CSR > Request in comments and in error messages
...
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-20 14:28:07 +01:00