-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add support for secretbox encryption provider with the k3s secrets-encrypt command
#12021
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
673ae7d to
9977593
Compare
brandond
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're allowing users to select the provider, not the key type. Lets use the same language as the upstream docs to avoid confusion.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12021 +/- ##
==========================================
- Coverage 45.89% 44.72% -1.18%
==========================================
Files 188 188
Lines 19068 19190 +122
==========================================
- Hits 8752 8582 -170
- Misses 9032 9361 +329
+ Partials 1284 1247 -37
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9977593 to
875d606
Compare
- Add testlet for new provider switch - Handle migration between providers - Add exception for criticalcontrolargs Signed-off-by: Derek Nola <derek.nola@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
875d606 to
2003460
Compare
| return err | ||
| } | ||
| if control.EncryptProvider == secretsencrypt.SecretBoxProvider { | ||
| return fmt.Errorf("rotate does not support secretbox key type, use rotate-keys instead") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this something we need to cover in the docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this will be mentioned when this gets added to docs.
Proposed Changes
secrets-encryption-providerwith valuse ofaescbc(default and original) andsecretbox.k3s secrets-encrypt rotate-keyscommand. Not supported on the older (eventually will be deprecated)preparerotateandreencryptsubcommands.Types of Changes
New Feature
Verification
Manually tested through various configurations:
NEW CLUSTER:
secrets-encryption: trueandsecrets-encryption-provider: secretboxto the config.yamlk3s secrets-encrypt statusyou will see a newXSalsa20-POLY1305type as the active keyMIGRATING CLUSTER
secrets-encryption-provider: secretboxto the config.yaml.secrets-encryptionshould already be therek3s secrets-encrypt rotate-keyson a single serverXSalsa20-POLY1305type as the active keyTesting
Covered by new testlet in docker tests
Linked Issues
#12222
User-Facing Change
Further Comments