Fix register a key using secret creationTimestamp instead of certificate validity timestamp#1681
Conversation
…ate validity timestamp Signed-off-by: Jérôme GARCIA <[email protected]>
|
hi @sybernatus First of all, thanks a lot for your PR. This PR will change the way to order the certificates for all the people with Sealed Secrets deployed. This impact is really high if we include it as default. I suggest to include it with a flag to configure what is the way that the users want to order the certificates. If we see in the future that everybody is using the flag, we can deprecated it and set it by default but I think that we need to be conservative here. For this case, we need to include a test and documentation. Thanks a lot Álvaro |
|
This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution. |
|
I will try to include this flag in this pr |
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 <[email protected]>
Signed-off-by: Jérôme GARCIA <[email protected]>
|
Up please 🙂 |
alvneiayu
left a comment
There was a problem hiding this comment.
LGTM, thanks a lot for your incredible work @sybernatus
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [bitnami-labs/sealed-secrets](https://github.com/bitnami-labs/sealed-secrets) | minor | `v0.28.0` -> `v0.29.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>bitnami-labs/sealed-secrets (bitnami-labs/sealed-secrets)</summary> ### [`v0.29.0`](https://github.com/bitnami-labs/sealed-secrets/blob/HEAD/RELEASE-NOTES.md#v0290) [Compare Source](bitnami-labs/sealed-secrets@v0.28.0...v0.29.0) - Fix register a key using secret creationTimestamp instead of certificate validity timestamp ([#​1681](bitnami-labs/sealed-secrets#1681)) - Bump to go1.23.7 ([#​1714](bitnami-labs/sealed-secrets#1714)) - Update environment k8s version on CI ([#​1688](bitnami-labs/sealed-secrets#1688)) - Update go tooling to 1.23.6 ([#​1686](bitnami-labs/sealed-secrets#1686)) - Bump github.com/onsi/gomega from 1.36.2 to 1.36.3 ([#​1712](bitnami-labs/sealed-secrets#1712)) - Bump github.com/onsi/ginkgo/v2 from 2.23.0 to 2.23.3 ([#​1711](bitnami-labs/sealed-secrets#1711)) - Bump k8s.io/code-generator from 0.32.2 to 0.32.3 ([#​1708](bitnami-labs/sealed-secrets#1708)) - Bump k8s.io/client-go from 0.32.2 to 0.32.3 ([#​1705](bitnami-labs/sealed-secrets#1705)) - Bump golang.org/x/net from 0.35.0 to 0.36.0 in the go_modules group ([#​1702](bitnami-labs/sealed-secrets#1702)) - Bump golang.org/x/crypto from 0.35.0 to 0.36.0 ([#​1699](bitnami-labs/sealed-secrets#1699)) - Bump github.com/prometheus/client_golang from 1.21.0 to 1.21.1 ([#​1699](bitnami-labs/sealed-secrets#1699)) - Bump github.com/onsi/ginkgo/v2 from 2.22.2 to 2.23.0 ([#​1701](bitnami-labs/sealed-secrets#1701)) - Bump github.com/prometheus/client_golang from 1.20.5 to 1.21.0 ([#​1695](bitnami-labs/sealed-secrets#1695)) - Bump github.com/google/go-cmp from 0.6.0 to 0.7.0 ([#​1696](bitnami-labs/sealed-secrets#1696)) - Bump golang.org/x/crypto from 0.33.0 to 0.35.0 ([#​1697](bitnami-labs/sealed-secrets#1697)) - Bump k8s.io/client-go from 0.32.1 to 0.32.2 ([#​1691](bitnami-labs/sealed-secrets#1691)) - Bump k8s.io/code-generator from 0.32.1 to 0.32.2 ([#​1693](bitnami-labs/sealed-secrets#1693)) - Bump golang.org/x/crypto from 0.32.0 to 0.33.0 ([#​1685](bitnami-labs/sealed-secrets#1685)) - Bump github.com/spf13/pflag from 1.0.5 to 1.0.6 ([#​1683](bitnami-labs/sealed-secrets#1683)) - Bump k8s.io/client-go from 0.32.0 to 0.32.1 ([#​1678](bitnami-labs/sealed-secrets#1678)) - Bump k8s.io/code-generator from 0.32.0 to 0.32.1 ([#​1677](bitnami-labs/sealed-secrets#1677)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMTguMSIsInVwZGF0ZWRJblZlciI6IjM5LjIxOC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Description of the change
Register a key and order it based on its secret creation timestamp instead of its cert starting validity (NotBefore attribute)
Benefits
In case we are bringing our own certificate, if the certificate is created before sealed secret installation but applied after the installation, still the latest certificate used will be the certificate installed by sealed secret during its initialization instead of the latest secret certificate created.
Possible drawbacks
Applicable issues
Additional information