Commit Graph

5760 Commits

Author SHA1 Message Date
Arsh Sharma
89bf0022d6 changes from pair programming sesh
Signed-off-by: Arsh Sharma <arshsharma461@gmail.com>
2021-08-02 16:22:51 +05:30
Arsh Sharma
58410f5deb added comment for skip
Signed-off-by: Arsh Sharma <arshsharma461@gmail.com>
2021-07-30 18:21:58 +05:30
Arsh Sharma
8ce7ca8d63 testing: seeing if skip option fixes the failing tests
Signed-off-by: Arsh Sharma <arshsharma461@gmail.com>
2021-07-30 17:00:56 +05:30
Arsh Sharma
2baaea339f created a fs for long domain
Signed-off-by: Arsh Sharma <arshsharma461@gmail.com>
2021-07-27 19:13:19 +05:30
Arsh Sharma
83f80691c7 changes from pair programming session 22nd July
Signed-off-by: Arsh Sharma <arshsharma461@gmail.com>
2021-07-22 17:18:22 +05:30
jetstack-bot
05cfd7bb72
Merge pull request #4218 from inteon/verify_upgrade_use_check_api
Use 'kubectl cert-manager check api' in verify-upgrade.sh
2021-07-21 20:37:20 +01:00
jetstack-bot
8ea29ba49a
Merge pull request #4237 from SgtCoDFish/parsechaintest
Fix check for self-signed certs in EncodeX509Chain
2021-07-21 17:49:20 +01:00
Ashley Davis
17ec9ea8e7
fix check for self-signed certs in EncodeX509Chain
see also https://github.com/jetstack/cert-manager/issues/4142

EncodeX509Chain checked for self-signed certs by comparing the subject
and issuer of the cert in question, which is invalid since it's
perfectly fine for those to match.

the correct behavior is to use cert.CheckSignatureFrom(cert). this bug
was exposed in 1.4 when ParseSingleCertificateChain started using
EncodeX509Chain in the critical path of several issuers; when end-users
had leaf certificates with subjects matching their issuer's subject, the
bug was triggered.

includes newly written tests for EncodeX509Chain and a test for
ParseSingleCertificateChain

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2021-07-21 16:45:48 +01:00
jetstack-bot
f489c7df02
Merge pull request #4236 from irbekrm/fix_version_finding
Fix how last published release version is calculated for upgrade tests
2021-07-21 15:15:20 +01:00
Ashley Davis
31360580f0
Merge pull request #4232 from SgtCoDFish/cabasicconstraint_e2e
CA Basic Constraint checks in e2e tests
2021-07-21 14:10:03 +01:00
irbekrm
48d4f955ea Fix how last published release is calculated
It should always be the last published non-alpha/beta release

Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-07-21 13:58:44 +01:00
Ashley Davis
05b31e96f2
add conformance suite check for issuing CA certificates
this is disabled for all issuers except selfsigned and CA. the intention
is to pave the way for adding maxPathLen support later.

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2021-07-20 12:09:17 +01:00
Ashley Davis
6b5df6b42b
remove unused ValidateIssuedCertificate function
this function doesn't appear to be used anywhere, which makes it a
little confusing when trying to work out how the checks are done in the
e2e tests.

given that we encourage people not to import cert-manager as a module
and that anyone who does is likely not to use functions in the test
directory, it seems safe enough to remove this rather than deprecating
it.

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2021-07-20 12:08:06 +01:00
jetstack-bot
c92c8c8f13
Merge pull request #4108 from JoshVanL/certificate-signing-request=venafi
CertificateSigningRequest Venafi controller
2021-07-20 10:13:34 +01:00
joshvanl
a1a953f40f More comments
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-07-19 19:29:40 +01:00
Ashley Davis
24baa7e526
minor code style / comment changes in test files
Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2021-07-19 17:19:13 +01:00
Ashley Davis
c86f20f4b5
add crd make target & don't change GOPROXY in update-codegen.sh
there seems to be justification for setting GOSUMDB to a universal value
here, but setting GOPROXY doesn't seem to provide value here

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2021-07-19 17:19:13 +01:00
joshvanl
0fdd52e603 Adds comments to some func's and changes return err names to be more
clear

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-07-19 15:50:23 +01:00
joshvanl
0116bf18bd Changed Venafi CSR request "the request will be retried" -> "waiting"
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-07-19 15:50:23 +01:00
joshvanl
37e117c452 Change CSRModifer in Kube CSR conformance tests to be a function in
definition so has access to runtime shared variables at runtime

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-07-19 15:50:23 +01:00
joshvanl
8413b302fd Adds random domain suffix to Venafi e2e tests
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-07-19 15:50:23 +01:00
joshvanl
6e57e1093f Adds comment about what the pickup ID is in the CSR controller
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-07-19 15:50:23 +01:00
joshvanl
e0fc320d41 Remove CA annotation being set on Venafi CertificateSigningRequest
controller

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-07-19 15:50:23 +01:00
joshvanl
644cda69d8 Disable Ed255119 e2e tests for Venafi CSRs
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-07-19 15:50:23 +01:00
joshvanl
a469e07f1a Adds Venafi E2E CertificateSigningRequest conformance suite
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-07-19 15:50:23 +01:00
joshvanl
ff2dfd7b64 Moves venafi addon into the framework addons package
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-07-19 15:50:23 +01:00
joshvanl
65cec6c212 Wires up Venafi CertificateSigningRequest controller
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-07-19 15:50:23 +01:00
joshvanl
c4914f7103 Adds venafi CertificateSigningRequest controller
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-07-19 15:50:23 +01:00
joshvanl
dcc3ad44b4 Adds CertificateSigningRequest venafi annotations to experimental API
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-07-19 15:50:23 +01:00
Inteon
629924c123
use 'kubectl cert-manager check api' in verify-upgrade.sh
Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
2021-07-16 16:38:47 +02:00
jetstack-bot
88e85d0725
Merge pull request #4205 from inteon/kubectl_check_api
Add kubectl 'cert-manager check api' command
2021-07-16 14:43:15 +01:00
Inteon
21bc98979e
improved ux
Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
2021-07-16 13:11:40 +02:00
jetstack-bot
1b7e706c72
Merge pull request #4158 from maelvls/add-gateway-api-split-controller
Implement the Gateway API shim ("gateway-shim" controller)
2021-07-15 21:38:59 +01:00
Maël Valais
368c7659ee gateway-shim: test: two different secrets create two Certificates
Signed-off-by: Maël Valais <mael@vls.dev>
2021-07-15 20:35:47 +02:00
Maël Valais
073fce8db5 e2e: retry the certificate update due to optimistic locking
Signed-off-by: Maël Valais <mael@vls.dev>
2021-07-15 20:35:47 +02:00
Maël Valais
e5436df521 gateway-shim: don't crash cert-manager if the Gateway CRD isn't there
The Gateway CRD has to be installed, meaning that the CRDs may be
installed after cert-manager. We don't want cert-manager to crash in
that case; instead, we let the user know that cert-manager will keep
retrying looking for the CRDs with this message on startup:

  controller.go:181] cert-manager/controller/build-context "msg"="the
  Gateway API CRDs do not seem to be present, cert-manager will keep
  retrying watching for them"

The user then sees the following message printed (using an exponential
back-off):

  reflector.go:167: Failed to watch *v1alpha1.Gateway: failed to list
  *v1alpha1.Gateway: the server could not find the requested resource
  (get gateways.networking.x-k8s.io)

Signed-off-by: Maël Valais <mael@vls.dev>
2021-07-15 20:35:47 +02:00
Maël Valais
f77954e5e3 gateway-shim: document issuerForIngressLike and translateAnnotations
Signed-off-by: Maël Valais <mael@vls.dev>
2021-07-15 20:35:41 +02:00
Maël Valais
b5142f84c0 gateway-shim: only discover the gateway api when gateway-shim is enabled
Signed-off-by: Maël Valais <mael@vls.dev>
2021-07-15 20:35:34 +02:00
Maël Valais
30f9c123d3 gateway-shim: add the gateway-shim controller
Note that the gateway-shim is only half the work for supporting the
Gateway API in cert-manager. The other half is the HTTP01 solver
support, which is still worked on.

The Gateway API in cert-manager is releases as an experimental feature
and needs to be enabled manually with the following flag:

  --controllers=*,gateway-shim

All the annotations supported by ingress-shim are also supported by
gateway-shim, with some exceptions:

  "acme.cert-manager.io/http01-ingress-class"

This annotation is not supported on the Gateway resource. Although the
Gateway resource also has a "gatewayClass" field, we will need to add
another field instead of "ingress-class" to avoid confusion with the
ingress-shim.

  "acme.cert-manager.io/http01-edit-in-place"

This annotation is not supported because it is specific to some ingress
controllers like ingress-gce.

  "kubernetes.io/tls-acme"

This annotation is not supported because it is a behavior inherited from
kube-lego and we chose not to keep this behavior with the Gateway API.

Unlike the ingress-shim, you can reuse the same Secret name in multiple
TLS configurations on the same Gateway resource.

The ingress-shim now shows the exact location of the duplicate
secretName when the user gives the same secretName in two separate TLS
blocks.

Signed-off-by: Maël Valais <mael@vls.dev>
Co-authored-by: Jake Sanders <i@am.so-aweso.me>
2021-07-15 20:34:55 +02:00
Maël Valais
1cd44fa730 gateway-shim: conformance: a cert should get created for a Gateway
Signed-off-by: Maël Valais <mael@vls.dev>
2021-07-15 20:34:50 +02:00
Maël Valais
a496dd3216 addons: add gateway-api to the addons
Signed-off-by: Maël Valais <mael@vls.dev>
2021-07-15 20:21:49 +02:00
Inteon
ac7775bdb4
made errors human readable, added unit tests, added check api to e2e, fixed os.Exit(1)
Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
2021-07-15 16:50:31 +02:00
Inteon
5458173739
Add kubectl 'cert-manager check api' command
Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
2021-07-15 16:50:31 +02:00
jetstack-bot
6885bcafaf
Merge pull request #4149 from maelvls/refactor-ingress-shim
ingress-shim: untangle logic for "looking for cert owners"
2021-07-14 09:49:28 +01:00
jetstack-bot
c546f5bbd9
Merge pull request #4190 from inteon/helm_labels
Remove Helm-specific labels & add version label
2021-07-13 18:27:03 +01:00
Maël Valais
b13b751d63 PR review with Irbe: re-queue Ingress on "Update" and "Add" of certs
Signed-off-by: Maël Valais <mael@vls.dev>
Co-authored-by: Irbe Krumina <irbekrm@gmail.com>
2021-07-13 19:06:10 +02:00
jetstack-bot
3d54c7e6d2
Merge pull request #4206 from alrs/alrs-fix-acme-err
test/integration/acme: fix dropped error
2021-07-13 17:25:03 +01:00
Inteon
c7d92681b8
add comments
Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
2021-07-13 17:58:28 +02:00
jetstack-bot
e3ef37bb6a
Merge pull request #4208 from irbekrm/bump_go
Bump the version of Go SDK being downloaded
2021-07-13 16:24:03 +01:00
irbekrm
84419ba85f Bump the version of Go SDK being downloaded
Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-07-13 14:58:51 +01:00