-
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
[design doc] Secrets encryption key management subcommand #3407
Comments
Talked through this in the design call and there was general agreement on the approach. There was some concern about this relying on a fix for #3015. It was suggested that we might try to find a better way to reload just the apiserver and/or other apiserver components on-demand in a way that doesn't require restarting the supervisor. Would like to have @ibuildthecloud take a look at it as well before we start. |
Hi Thank you in advance |
Hi @brandond thank you |
@brandond @dereknola - one thing to consider that we can discuss in design call tomorrow: @galal-hussein said he can support users having their own custom encryption config file if the user puts that file in a certain place. Would we ONLY support rotation if WE generated the file or could we support rotation against custom encryption config files? |
from Bill: step 3 can cause load spikes and availability problems. it needs throttled. |
I personally would not want to support rotation against random user-provided encryption configuration files; we essentially need to manage the whole file and the order of encryption providers it specifies across all servers in the cluster so that we can get the secrets reencrypted with the new token without preventing any node from being able to read them. |
cool...that jives with how RKE1 behaves, fwiw. See: https://rancher.com/docs/rke/latest/en/config-options/secrets-encryption/#rotating-keys-with-the-rke-cli rotation only supported with "managed" config. |
From @Oats87 and @thedadams
From @brandond on the finalize step: the UX doesnt imply the implementation. For example, the actual secret rekeying could be implemented via a job. Up to the implementor. Documentation and even the CLI needs to very explicitly WARN the dangers of this command. Let's stay away from a job for the actual rewriting of secrets. Requires stable cluster. Derek needs to go off and design this step and come back with it. |
@dereknola this does need backported to 1.21, please open a backport issue |
Closing this as the main feature is now being tracked by #4254 |
Problem Statement
K3s currently has only a single command for managing secrets encryption - the
--secrets-encryption
flag. If this is turned on, a secrets encryption configuration document is generated using a randomaescbckey
key; this document is stored in the bootstrap data and shared among server nodes via the kube-apiserver--encryption-provider-config
CLI flag. There are no provisions for rotating the key, disabling encryption after enabling it, etc.Proposal
We want to expand this to allow for rotating the encryption key via a multi-step process:
k3s secrets-encryption prepare
which will do the following:k3s secrets-encryption rotate
which will do the following:k3s secrets-encryption finalize
which will do the following:Additional Considerations
k3s secrets-encryption status
to display info about the current configuration - the the hash of the encryption configuration document in the boostrap data, the hash of the active configuration document on each node, the type and order of providers currently configured, etc?k3s secrets-encryption disable
(as an alternative to steps 1-4) that would move theidentity
encryption provider into the first position in the list?Alternative Approaches
aescbckey
encryption code, but allowed for dynamic configuration reloading. This was dismissed as being excessively complicated.Related Issues
The text was updated successfully, but these errors were encountered: