You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feat add flag for registry initialization key order priority
A flag has been added to be able to choose which key will be fetched for encrypting secret
Test add key order priority param to initKeyRegistry function
Signed-off-by: Sybernatus <jerome.je.garcia@gmail.com>
Copy file name to clipboardExpand all lines: README.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -620,6 +620,18 @@ It doesn't help that this feature has been historically called "key rotation", w
620
620
Sealed secrets are not automatically rotated and old keys are not deleted
621
621
when new keys are generated. Old `SealedSecret` resources can be still decrypted (that's because old sealing keys are not deleted).
622
622
623
+
### Key registry init priority order
624
+
625
+
When the controller starts, it will initialize the key registry. The most recent key is used to seal secrets. By default, this certificate is chosen based on the NotBefore attribute of the certificate. If you want to change the priority order of the keys in the registry, you can use the `--key-order-priority` flag.
626
+
627
+
The `--key-order-priority` flag accepts the following values:
628
+
- `CertNotBefore`: (default) The key registry will be ordered based on the NotBefore attribute of the key certificate.
629
+
- `SecretCreationTimestamp`: The key registry will be ordered based on the creation timestamp of the secret.
630
+
631
+
This flag influences the public key used to encrypt secrets and the certificate retrieved by `kubeseal --fetch-cert`.
632
+
633
+
634
+
623
635
### User secret rotation
624
636
625
637
The *sealing key* renewal and SealedSecret rotation are **not a substitute** for rotating your actual secrets.
fs.StringVar(&f.MyCN, "my-cn", "", "Common name to be used as issuer/subject DN in generated certificate.")
37
38
38
39
fs.DurationVar(&f.KeyRenewPeriod, "key-renew-period", defaultKeyRenewPeriod, "New key generation period (automatic rotation deactivated if 0)")
40
+
fs.StringVar(&f.KeyOrderPriority, "key-order-priority", defaultKeyOrderPriority, "Ordering of keys based on NotBefore certificate attribute or secret creation timestamp.")
39
41
fs.BoolVar(&f.AcceptV1Data, "accept-deprecated-v1-data", true, "Accept deprecated V1 data field.")
40
42
fs.StringVar(&f.KeyCutoffTime, "key-cutoff-time", "", "Create a new key if latest one is older than this cutoff time. RFC1123 format with numeric timezone expected.")
41
43
fs.BoolVar(&f.NamespaceAll, "all-namespaces", true, "Scan all namespaces or only the current namespace (default=true).")
0 commit comments