Commit Graph

3012 Commits

Author SHA1 Message Date
jetstack-bot
9f7a4053ab
Merge pull request #5746 from irbekrm/cainjector_remove_duplicate_cache
Remove the double cache mechanism for cainjector
2023-01-25 15:05:57 +00:00
Richard Wall
24cbfc7ba8 Revert "automount service account tokens off by default"
This reverts commit 954eb0d875.

Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2023-01-24 17:19:52 +00:00
Richard Wall
954eb0d875 automount service account tokens off by default
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2023-01-24 17:00:11 +00:00
irbekrm
3aba8ed32d Makes cainjector Certificate watch optional
Configurable via a flag, true by default

Signed-off-by: irbekrm <irbekrm@gmail.com>
2023-01-24 13:52:45 +00:00
irbekrm
4776597cb4 Remove the double cache mechanism for cainjector
Signed-off-by: irbekrm <irbekrm@gmail.com>
2023-01-23 17:38:46 +00:00
Tim Ramlot
191e7ca305
add (deprecated) stub functions
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2023-01-23 13:26:37 +01:00
Tim Ramlot
23de5240e9
move utility functions to reduce fragmentation and rename functions for consistency
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2023-01-23 13:19:39 +01:00
jetstack-bot
1038ca4494
Merge pull request #4502 from ctrought/master
support subject and email annotations for ingress/gateway
2023-01-20 14:35:37 +00:00
ctrought
575e3155c2 fix: goimports
Signed-off-by: ctrought <k8s@trought.ca>
2023-01-19 14:57:10 -05:00
irbekrm
216b60e98b RFC2136 solver has an init option to reset secrets lister
Signed-off-by: irbekrm <irbekrm@gmail.com>
2023-01-18 17:41:51 +00:00
irbekrm
1834afaa00 A bunch of comments on webhook solver functionality
With the goal of making folks working on these parts of code be aware that this is the one bit that will be imported in external projects

Signed-off-by: irbekrm <irbekrm@gmail.com>
2023-01-18 17:41:02 +00:00
jetstack-bot
aa7fe1130c
Merge pull request #5660 from irbekrm/certificate_labels
Ensures that certificate.spec.secretName and temporary private key Secrets are labelled
2023-01-09 10:57:30 +00:00
irbekrm
5e8fd7dc41 Policy check ensures that cert.sepc.secretName secret gets labelled
Makes sure that when an unlabelled Secret is encountered at any point (even outside issuance) it will be labelled

Signed-off-by: irbekrm <irbekrm@gmail.com>
2023-01-06 18:31:31 +00:00
irbekrm
213949a590 Keymanager controller ensures that temporary private key Secrets are labelled
Signed-off-by: irbekrm <irbekrm@gmail.com>
2023-01-06 18:30:34 +00:00
irbekrm
c7465fd921 Issuing controller ensures that cert.spec.secretName secrets are labelled
Signed-off-by: irbekrm <irbekrm@gmail.com>
2023-01-06 18:29:51 +00:00
irbekrm
767170d65f Adds a new label to cert-manager API
Signed-off-by: irbekrm <irbekrm@gmail.com>
2023-01-06 18:28:50 +00:00
jetstack-bot
248eff5bce
Merge pull request #5694 from irbekrm/fix_cainjector_namespace
Fix cainjector's namespace flag
2023-01-06 10:43:41 +00:00
irbekrm
ff80030737 Log error if CA source is in a namespace that is not in scope
cainjector will still watch cluster-scoped resources such as CRDs, so it can get references to Secrets or Certificates in namespaces that are out of scope

Signed-off-by: irbekrm <irbekrm@gmail.com>
2023-01-06 10:09:36 +00:00
irbekrm
87bef52337 Fix cainjector's namespace flag
Ensures that when cainjector has the namespace flag passed, namespaced resource caching is scoped to that namespace

Signed-off-by: irbekrm <irbekrm@gmail.com>
2023-01-05 18:15:19 +00:00
irbekrm
eaf814cffa Code review feedback- better comment
Signed-off-by: irbekrm <irbekrm@gmail.com>
2023-01-05 17:42:40 +00:00
irbekrm
8ed0faf228 Fix integration tests
Signed-off-by: irbekrm <irbekrm@gmail.com>
2023-01-05 12:07:25 +00:00
irbekrm
036b013942 Ensures that only one secrets cache is created for cert-manager controller
Signed-off-by: irbekrm <irbekrm@gmail.com>
2023-01-05 10:11:48 +00:00
jetstack-bot
094b4c763e
Merge pull request #5662 from lucacome/bump-controller-tools
Bump sigs.k8s.io deps
2023-01-04 14:02:00 +00:00
Ashley Davis
0225cc9234
avoid logging confusing error messages for external issuers
See https://github.com/cert-manager/cert-manager/issues/5601

When referring to external issuers whose kind is not "Issuer" or
"ClusterIssuer" we log an error message thanks to a new check added in
a previous PR[1] which should only trigger for SelfSigned issuers.

The error previously looked like:

```text
"error"="invalid value \"x\" for issuerRef.kind. Must
be empty, \"Issuer\" or \"ClusterIssuer\""
```

After this PR, any CR with an issuer whose group or kind doesn't
match what's expected for a built-in issuer will be skipped

https://github.com/cert-manager/cert-manager/pull/5336

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>

WIP: test other issuer kinds

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2023-01-04 12:10:34 +00:00
jetstack-bot
d8a6ec0dcb
Merge pull request #5663 from weisdd/fix/azure-workload-identity-early-reconcilation
fix(AzureDNS): prevent early reconciliations for misconfigured Workload Identity
2023-01-03 18:00:10 +00:00
Igor Beliakov
1c01973813 fix(AzureDNS): suppress original message in adal.TokenRefreshError to prevent early CR reconciliations due to unique data (timestamp, Trace ID) that lands to CR status
Signed-off-by: Igor Beliakov <demtis.register@gmail.com>
2022-12-22 11:59:37 +01:00
Luca Comellini
dbd6dc9b16
Bump sigs.k8s.io deps
Signed-off-by: Luca Comellini <luca.com@gmail.com>
2022-12-21 09:47:41 -08:00
Ashley Davis
c5924f54a1
add + use CABundle field for ACME servers in issuers
Previously it wasn't possible to set a custom CA bundle for an ACME
server, leading users to either patch the cert-manager system CA bundle
manually or else use SkipTLSVerify which is a security issue.

This adds CABundle for ACME, similar to what we have for Vault and
Venafi TPP issuers.

Longer term we'd like to have a more fully featured approach. It would
for example make sense to support loading CA bundles from ConfigMaps or
Secrets (similar to what we do for Vault issuers today), but for now this
change is the simplest change.

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-12-15 16:21:07 +00:00
Ashley Davis
f68693bb6a
change wording on descriptions for Vault and TPP 'CABundle' fields
Clarifies language a little; makes it clearer that the bundle
should be base64 encoded. Previously it was slightly confusing
in that PEM certificates are themselves base64 encoded.

Also makes it clearer what our CABundle validation does and does not do
by adding a standalone validation function and tweaking the error
message for an invalid CA bundle.

Also updates validation to not print CA bundle for Vault issuer when the
bundle is invalid, since it won't help with debugging anything.
Currently the bundle is printed as byte values ("0x32, 0x58, 0x43...")
and in any case printing the whole bundle could be noisy if it's large

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-12-15 16:21:02 +00:00
Luca Comellini
c99c147059
Bump k8s.io deps to v0.26.0
Signed-off-by: Luca Comellini <luca.com@gmail.com>
2022-12-14 21:53:42 -08:00
Sathyanarayanan Saravanamuthu
f719247d2b Addressing review comments
Signed-off-by: Sathyanarayanan Saravanamuthu <sathyanarays@vmware.com>
2022-12-06 18:54:46 +05:30
Sathyanarayanan Saravanamuthu
94fa9eeee6 Addressing review comments
Signed-off-by: Sathyanarayanan Saravanamuthu <sathyanarays@vmware.com>
2022-12-06 18:54:46 +05:30
Sathyanarayanan Saravanamuthu
42ae76ae30 Refreshing secrets when the keystore fields change
Signed-off-by: Sathyanarayanan Saravanamuthu <sathyanarays@vmware.com>
2022-12-06 18:54:46 +05:30
irbekrm
486c72f122 Update reference to HTTPRoute docs
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-12-05 15:04:18 +00:00
jetstack-bot
6ec8da3366
Merge pull request #5583 from lvyanru8200/uodateGwVerison
feature: update gateway api to v1beta1
2022-12-05 14:52:48 +00:00
lv
a13c76d312 feature: update gateway api to v1beta1
Signed-off-by: lvyanru <yanru.lv@daocloud.io>

feature: update gateway api to v1beta1

Signed-off-by: lvyanru <1113706590@qq.com>
2022-12-05 14:03:21 +00:00
Martín Montes
f884dac555 Return error when Gateway has a cross-namespace secret ref
Signed-off-by: Martín Montes <martin11lrx@gmail.com>
2022-12-01 12:46:33 +01:00
jetstack-bot
77c410f5cb
Merge pull request #5570 from weisdd/feature/azure-workload-identity
feat(AzureDNS): Add support for Workload Identity
2022-11-30 18:00:32 +00:00
Igor Beliakov
df20fcd3e4 chore(AzureDNS): added more comments as requested by @wallrj
Signed-off-by: Igor Beliakov <demtis.register@gmail.com>
2022-11-24 22:42:18 +01:00
Houssem El Fekih
8af2d64f3b Gofmt files
Signed-off-by: Houssem El Fekih <houssem.elfekih@jetstack.io>
2022-11-18 10:55:56 +00:00
Houssem El Fekih
f41cf33efe Add support for required LDAP (rfc4514) RDNs in LiteralSubject
* Add OID translation for mandatory DC component
* Used extensively in LDAP certificates, also required by rfc5280
* Add support for UID, mentioned in LDAP RFC
* solves https://github.com/cert-manager/cert-manager/issues/5582

Signed-off-by: SpectralHiss <houssem.elfekih@jetstack.io>
2022-11-18 10:22:39 +00:00
Igor Beliakov
964f4bbd8d feat(AzureDNS): add a test for federated SPT
Signed-off-by: Igor Beliakov <demtis.register@gmail.com>
2022-11-17 17:42:05 +01:00
Corey McGalliard
7e6e0940a2 updating to match feedback and adjust the RunAsNonRoot options for http01 solver to be more descriptive
Signed-off-by: Corey McGalliard <cmcgalliard@redventures.com>
2022-11-16 11:20:36 -05:00
jetstack-bot
95dc198cd6
Merge pull request #5571 from inteon/cleanup_csr_generation
Improve gen.CSR and use it in all tests
2022-11-15 14:08:44 +00:00
jetstack-bot
4ffd6213e7
Merge pull request #5552 from sathyanarays/isCaFix
Fixing CA flag in basic constraints extension
2022-11-10 13:37:47 +00:00
Sathyanarayanan Saravanamuthu
860ba8465a Addressing review comments
Signed-off-by: Sathyanarayanan Saravanamuthu <sathyanarays@vmware.com>
2022-11-10 14:27:26 +05:30
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
Richard Wall
df42b81326 Fix typos in explanatory comment
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2022-11-09 17:50:27 +00:00
Richard Wall
1f1ed47c2a Always initialize tlsClientConfig if the default is nil
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2022-11-09 17:45:52 +00:00
Richard Wall
218cdb7e0f Use RenegotiateOnceAsClient and explain why
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2022-11-09 17:25:31 +00:00