Commit Graph

39 Commits

Author SHA1 Message Date
cert-manager-prow[bot]
50abeda40d
Merge pull request #6987 from cbroglie/renew-before-pct
feat: Add renewBeforePercentage alternative to renewBefore
2024-07-01 09:45:23 +00:00
Christopher Broglie
0f74d7536e Add renewBeforePercentage alternative to renewBefore
Since the actual duration is unknown until a cert has been issued,
providing an absolute duration for renewBefore can result in accidental
renewal loops. The new renewBeforePercentage field computes the
effective renewBefore using the actual duration, allowing users to
better express intent while maintaining backwards compatibility.

Fixes #4423, resolves #5821

Signed-off-by: Christopher Broglie <cbroglie@cloudflare.com>
2024-06-29 21:18:15 -07:00
cert-manager-prow[bot]
837c6a1e06
Merge pull request #7036 from fidelity-contributions/feature/5514-venafi-issuer-ca-ref-support
Feature/5514 - Add SecretRef support for venafi TPP issuer CA Bundle
2024-06-24 14:18:20 +00:00
Tim Ramlot
363a63ac96
Add client certificate authentication for Vault issuers
Co-authored-by: Maël Valais <mael@vls.dev>
Signed-off-by: Joshua Mühlfort <muehlfort@gonicus.de>
2024-06-17 09:16:26 +02:00
Sankalp Yengaldas
adc7cd0f06 add testcases and generate deepcopy methods
Signed-off-by: Sankalp Yengaldas <sankalp.yb@fmr.com>
2024-04-24 10:14:31 -04:00
Bill Waldrep
d4911ebfaa
Add optional flag to specify jks keystore alias.
Previously the JKS keystore alias was hardcoded to "certificate".
This change adds an optional configuration point to allow users
to specify a custom keystore alias. If the flag is omitted we
will default to the previous behavior.

Signed-off-by: Bill Waldrep <bwaldrep@palantir.com>
2024-03-04 13:23:09 -05:00
jetstack-bot
7f92e38988
Merge pull request #6614 from rodrigorfk/feat-vault-mtls
feat: Add the ability to communicate with Vault via mTLS
2024-02-16 18:11:26 +00:00
cloudwiz
75d1449903
move audiences under the SA ref
Signed-off-by: cloudwiz <andrey.dubnik@maersk.com>
2024-02-08 14:07:03 +00:00
cloudwiz
9cf9cb7ea5
Vault extra audiences (#3)
---------

Signed-off-by: cloudwiz <andrey.dubnik@maersk.com>
2024-02-06 10:06:17 +00:00
Rodrigo Fior Kuntzer
199c98689f
feat: supporting Vault server mTLS
Signed-off-by: Rodrigo Fior Kuntzer <rodrigo@miro.com>
2024-01-15 09:25:30 -03:00
jetstack-bot
cc8925ae9f
Merge pull request #6404 from SpectralHiss/hef/otherNameSANs
Other name sans support in Certificates
2024-01-03 14:16:23 +00:00
Tim Ramlot
8223df9e91
rename Algorithms to Profile
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2024-01-03 13:45:02 +01:00
Norwin Schnyder
ebf58b9967 apply PR feedback
Signed-off-by: Norwin Schnyder <norwin.schnyder+github@gmail.com>
2023-12-15 10:52:57 +01:00
SpectralHiss
4bdee5f010 Rename otherNameSANs to otherNames
* Improve the CRD godoc comments

Signed-off-by: SpectralHiss <houssem.elfekih@jetstack.io>
2023-12-13 16:21:56 +00:00
Tim Ramlot
721f71ed60 Refactor the solution
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2023-12-13 09:37:21 +00:00
Tim Ramlot
bfd9a65160 Add OtherNameSANs field to Certificates
* Added an otherName SAN extension mechanism
* Can take any otherName OID with String (UTF-8) like value
* cf [RFC 5280](https://datatracker.ietf.org/doc/html/rfc5280) p 37 for
  more info
* otherName is only a subset of GeneralName, our specific need for for
  UserPrincipalName used in Microsoft AD/ LDAP
* We treat UPN special but we might remove this in a later commit

Signed-off-by: SpectralHiss <houssem.elfekih@jetstack.io>
2023-12-13 09:12:23 +00:00
Norwin Schnyder
9185ca3195 update internal api for the conversion logic
Signed-off-by: Norwin Schnyder <norwin.schnyder+github@gmail.com>
2023-12-12 19:48:46 +01:00
tanujd11
d1b3e5ca83 Move critical from NameConstraintItem to NameConstraint and remove validateNameConstraints
Signed-off-by: tanujd11 <dwiveditanuj41@gmail.com>
2023-12-07 22:30:29 +05:30
tanujd11
589030dec1 feature: added name constraints
Signed-off-by: tanujd11 <dwiveditanuj41@gmail.com>
2023-12-07 22:27:31 +05:30
Tim Ramlot
25eec9514a
rename internal API fields to match the fieldnames in the public API
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2023-12-06 13:59:59 +01:00
Jeremy Campbell
dc876fef16
Add x509 v3 CA Issuers Extension
Signed-off-by: Jeremy Campbell <jeremy.campbell@okta.com>
2023-11-16 12:45:16 -06:00
Maël Valais
aed8a2ec85 serviceAccountRef: auto-generate "aud" and hardcode "exp"
Signed-off-by: Maël Valais <mael@vls.dev>
2023-02-06 18:28:49 +01:00
Maël Valais
bfce543640 serviceAccountRef: remove aud and exp, secretRef now a pointer
Changing SecretRef to be a pointer will break people using the package as
a library.

I disabled the ability to set the audience and expiry time for security
reasons:

We decided to generate the audience dynamically instead of letting the
user configure it, and we also decided to encode the namespace and
issuer name into the audience to remediate the risk of hijacking an
existing issuer and service account with a malicious issuer.

Regarding the expiration duration of the JWT, it doesn't make sense to
let the user configure it since cert-manager will authenticate using the
JWT and immediately discard it. We thought that 1 minute would be
acceptable, although the Kubernetes API server may return a totally
different duration.

Signed-off-by: Maël Valais <mael@vls.dev>
2023-02-06 18:28:49 +01:00
Maël Valais
76eef68730 serviceAccountRef: the vault issuer can now use bound SA tokens
Previously, the Vault issuer was only able to use a Secret in order to
use the "Kubernetes authentication" method. The downside to this service
account Secret token is that it has the default JWT iss
"kubernetes/serviceaccount" (along with the fact that the token is not
bound to a particular pod and has no expiry).

With the new serviceAccountRef, cert-manager now requests the token on
behalf of the pod in order to authenticate with Vault.

Signed-off-by: Maël Valais <mael@vls.dev>
2023-02-06 18:28:49 +01:00
Nils Mueller
2f6fa9dddf fixup! Add option to load Vault CA bundle from Kubernetes Secret
Signed-off-by: Nils Mueller <nm@impactful.it>
2022-08-16 02:57:43 +03:00
Nils Mueller
00a20097b6 Add option to load Vault CA bundle from Kubernetes Secret
Vault distributions like "Bank Vaults" automatically configure
and provision Vault and provide the CA bundle via a Kubernetes
Secret. Having to hard-code the bundle in the Issuer instead
of dynamically referencing it through the Secret requires
a manual second step when using a GitOps workflow.

Signed-off-by: Nils Mueller <nm@impactful.it>
2022-08-15 03:10:51 +03: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
Alessandro Vermeulen
1da01211ee Feature gated support for using literal subjects in Certificates
Signed-off-by: Alessandro Vermeulen <alessandro.vermeulen@ing.com>
2022-06-08 20:50:00 +02:00
irbekrm
dbad3d98f3 Rename issuanceAttempts -> failedIssuanceAttempts
In an attempt to convey the meaning of the field better

Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-03-21 07:33:51 +00:00
irbekrm
affb5e86ef Adds IssuanceAttempts field to Certificate's status
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-03-21 07:33:51 +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
685dd79c0c Makes some minor API naming changes, and clears up some docs around the
Certifcate's additional output formats.

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-01-14 20:00:26 +00:00
Thierry
81f308221b Add certifcate additionalOutputFormats parameter
DER Format to create key.der binary format of the private key.

CombinedPEM Format to create tls-combined.pem containing tls.key + tls.crt.

Added Unit and e2e tests for secret with Additional output format.

Feature flag AdditionalCertificateOutputFormats to enable feature.

Signed-off-by: Thierry Sallé <seuf76@gmail.com>
2022-01-14 11:10:32 +01:00
James Munnelly
8f1fb874ed Run update-codegen in module mode
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2021-12-17 18:13:44 +00:00
James Munnelly
4e6c56c9a8 Regenerate files
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2021-10-21 15:43:50 +01:00
James Munnelly
d5ed59a8b8 Fix defaulter-gen input paths
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2021-10-21 12:52:22 +01:00
James Munnelly
8ee719c135 Update bazel visibility rules
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2021-10-21 12:30:21 +01:00
James Munnelly
e7dea9f2a2 Replace all references to pkg/internal with internal
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2021-10-21 12:27:04 +01:00
James Munnelly
f81703d9ab Move pkg/internal/ to internal/
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2021-10-21 12:24:28 +01:00