Loading
Implement Openbao unseal rotation
Why this MR ?
- Implements gitlab-org/gitlab#603143
- Self-managed had no clean way to rotate the OpenBao unseal key - the chart mounted a single static key with no slot for the previous key
- Rotating the static key and switching the
awskmskey were both undocumented
What does this MR do ?
- Add an optional previous key mount for static unseal so the old key runs alongside the new one during rotation, rendered only when
config.unseal.static.previousKeyIdis set - Make the unseal secret field names value driven with
global.openbao.unseal.currentKeyFieldandpreviousKeyField, so rotation adds the new key under a new field instead of overwriting the current one - Gate the static unseal secret and mount on
config.unseal.static.enabledso enablingawskmsno longer leaves an orphaned static secret and mount - Add a
gitlab.checkConfig.openbao.unsealcheck so a missing field name fails at render time instead of leaving a pod that cannot start - Document the static unseal key rotation procedure, a separate Geo procedure, and the AWS KMS rotation and key switch notes in the OpenBao chart docs
- Storing a recovery key is now called out as a prerequisite for rotation - without one OpenBao skips the rewrap
- No change for existing installs - default rendering is unchanged
References
- Issue - gitlab-org/gitlab#603143
- OpenBao chart MR that makes
previousKeyIdandpreviousKeyfail unless both are set - gitlab-org/cloud-native/charts/openbao!74 (merged)
Author checklist
For general guidance, please follow our Contributing guide.
Required
For anything in this list which will not be completed, please provide a reason in the MR discussion.
- Merge Request Title and Description are up to date, accurate, and descriptive.
- MR targeting the appropriate branch.
- MR has a green pipeline.
- Documentation created/updated.
- Tests added/updated.
- Have you validated that your change works end-to-end on a real cluster deployment?
- Describe how you did it in a comment.
- Equivalent MR/issue for omnibus-gitlab opened.
Reviewers checklist
- MR has a green pipeline on https://gitlab.com/gitlab-org/charts/gitlab.
- Consider downstream impact to the Operator, as per evaluating impact from changes to GitLab chart.
Edited by Jayakrishnan Mallissery