Skip to content

Commit 7313f7d

Browse files
authored
chore: Reduce CA default lifetime to 1 year (#403)
* chore: reduce default ca lifetime to 1 year * chore: fix comment for DEFAULT_CA_CERT_LIFETIME * chore: update helm chart * update changelog
1 parent c59f089 commit 7313f7d

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ All notable changes to this project will be documented in this file.
1111
- (Recommended) Copying the CA into the new location
1212
(`kubectl -n default get secret/secret-provisioner-tls-ca -o json | jq '.metadata.namespace = "stackable-operators"' | kubectl create -f-`)
1313
- Setting the `secretClasses.tls.caSecretNamespace` Helm flag (`--set secretClasses.tls.caSecretNamespace=default`)
14+
- Reduce CA default lifetime to one year ([#403])
1415

1516
[#397]: https://github.com/stackabletech/secret-operator/pull/397
17+
[#403]: https://github.com/stackabletech/secret-operator/pull/403
1618

1719
## [24.3.0] - 2024-03-20
1820

deploy/helm/secret-operator/crds/crds.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ spec:
4848
description: Whether the certificate authority should be managed by Secret Operator, including being generated if it does not already exist.
4949
type: boolean
5050
caCertificateLifetime:
51-
default: 730d
51+
default: 365d
5252
description: |-
5353
The lifetime of each generated certificate authority.
5454

rust/operator-binary/src/backend/tls/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ use super::{
4242
mod ca;
4343

4444
/// How long CA certificates should last for. Also used for calculating when they should be rotated.
45-
/// Must be less than half of [`DEFAULT_MAX_CERT_LIFETIME`].
46-
pub const DEFAULT_CA_CERT_LIFETIME: Duration = Duration::from_days_unchecked(365 * 2);
45+
/// [`DEFAULT_MAX_CERT_LIFETIME`] must be less than half of [`DEFAULT_CA_CERT_LIFETIME`].
46+
pub const DEFAULT_CA_CERT_LIFETIME: Duration = Duration::from_days_unchecked(365);
4747

4848
/// As the Pods will be evicted [`DEFAULT_CERT_RESTART_BUFFER`] before
4949
/// the cert actually expires, this results in a restart in approx every 2 weeks,

0 commit comments

Comments
 (0)