-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Secrets-encryption rotation #4372
Conversation
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
Signed-off-by: dereknola <[email protected]>
8ca7cda
to
757b464
Compare
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Verified in k3s with master commit d71b335 and RC with single node and 3 node cluster following the steps described in the ticket and observed the expected test results 3 node cluster
Prepare stage:
After restarts on all 3 nodes
Rotate stage:
After restarts on all 3 nodes
Reencrypt stage:
After restarts on all 3 nodes
|
Proposed Changes
Introduces new feature: secrets-encryption keys rotation and enable/disable of encryption. The is all controlled via a new sub command
k3s secrets-encrypt
. Documentation can be found at https://rancher.com/docs/k3s/latest/en/security/secrets_encryption/Types of Changes
New Feature
New Integration Test (covers single node)
Verification
Formal documentation to follow:
You can run
k3s secrets-encrypt status
at any time to see the current stage/state of encryptionFor a single node cluster:
k3s server --secrets-encryption
k3s secrets-encrypt prepare
k3s secrets-encrypt status
, note, the addition of a new keyk3s secrets-encrypt rotate
k3s secrets-encrypt status
, note the keys swapk3s secrets-encrypt reencrypt
For external DB:
Start up a external DB (I used mySQL for this)
Start up 3 K3s servers joined to mySQL
k3s server --secrets-encryption --datastore-endpoint "mysql://root:mysql@tcp(192.168.1.200:3306)/k3s"
Select ONE server (S1 going forward) to perform the rotate on (doing any stage on any server is supported)
Run
k3s secrets-encrypt prepare
on S1Restart S1 with same arguments
Once S1 is back up, restart the other two servers
Call
k3s secrets-encrypt status
on S1 and S2, info should be the same on bothRun
k3s secrets-encrypt rotate
on S1Restart S1
Once S1 is back up, restart the other two servers
Call
k3s secrets-encrypt status
on S1 and S2, info should be the same on bothRun
k3s secrets-encrypt reencrypt
on S1Restart S1
Once S1 is back up, restart the other two servers
Call
k3s secrets-encrypt status
on S1 and S2, info should be the same on bothLinked Issues
#4254
#3407
User-Facing Change
Further Comments