-
Notifications
You must be signed in to change notification settings - Fork 597
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
feature: change encryption keys #199
Conversation
@ryanuber Wow! This is a huge PR! Awesome work! I will try to comb through this over the weekend. With the |
@armon the My thinking was that if the commands are idempotent, you would just do a |
@ryanuber Got it. Would it be possible to add a very simple indicator to list, just something thats like [58/60] or something that indicates how many nodes have that key? This way an operator can quickly see if they need to run |
@armon definitely! I'll take a stab at that over the weekend. |
goto SEND | ||
} | ||
|
||
s.logger.Printf("[DEBUG] serf: Received install-key query") |
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.
I'd make this INFO level
@ryanuber I've made a few notes, but overall this looks super solid! Very excited to have this in for the next release. Thanks for the hard work! |
@armon Thanks for the review! I made some adjustments based on your recommendations and added a few response comments. Let me know what you think and we can adjust further from here. |
keyring file helps persist changes to the encryption keyring, allowing the | ||
agent to start and rejoin the cluster successfully later on, even if key | ||
rotations had been initiated by other members in the cluster. NOTE: this | ||
option is not compatible with the `-encrypt` option. |
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 should probably add a section below that documents the format of this file. Just so people know how to setup the keys, that the first key is the primary, etc.
@ryanuber This is looking really good. I think it's very close. I think we are also missing some tests for the RPC layer, but I can always add those after a merge if you want. |
…e mechanics are different from a tags file
… polluting the Serf API
@armon I took a swing at the RPC tests and added some command tests. If there is anything you think we are missing just let me know! |
@ryanuber Looks awesome! Thanks so much for all the hard work! |
For a week or so I've been chipping away at this feature little by little. It uses the new memberlist keyring feature to allow Serf to handle encryption key changes in a running cluster. I feel like it's feature-complete, and ready to start gathering some suggestions on the code itself.
There is more conversation around the feature in general in #194.
The bottom line on what it does can be seen with a few command examples. All of the operations are idempotent, so you can just keep running them without negative consequences if they fail.
Install a new key
Change the key used to encrypt messages:
List keys in use on the cluster:
Remove a key:
Error conditions during key operations:
I know this pull request is pretty massive, so if splitting it into smaller chunks is preferred, I can try doing that. Just let me know!