Encryption at rest of manager keys and raft data#27967
Conversation
de2d3bc to
012bc3f
Compare
012bc3f to
4d5c70b
Compare
|
needs a rebase @aaronlehmann |
|
Gah! It's not ready to merge. Super annoying how CI forces a merge against master and then falls over with compilation errors when there are conflicts. |
|
ping @dnephin @thaJeztah @aluzzardi - it would be great to get some early design review |
a787543 to
99b647e
Compare
api/server/router/swarm/cluster.go
Outdated
There was a problem hiding this comment.
Is this route supposed to return the unlock key or to rotate it?
There was a problem hiding this comment.
Is this route supposed to return the unlock key or to rotate it?
Return the unlock key
hack/vendor.sh
Outdated
|
What's the overall workflow UX-wise? What happens while the swarm in locked? |
Then on restart You can retrieve the current key with
The swarm components do not operate until you run |
99b647e to
148d217
Compare
There was a problem hiding this comment.
this is left here on purpose ?
f93d83a to
d9916ee
Compare
|
This needs help reviewing, specifically the UX workflow (see @aaronlehmann comment above). Some comments:
|
|
Tested and reviewed this and design LGTM. Previous version had a way to specify lock key and never returned it from remote api. I think it was changed for ease of use and I don't really have a preference about which is better. Current behavior is consistent with join-tokens. The behavior of the down nodes after rotation/autolock change needs to be clearly documented as it isn't obvious. @aaronlehmann Maybe in follow-up we could run all swarm tests with encryption enabled. Even if it requires an env switch it would give much more coverage. |
|
@icecrime @thaJeztah @vieux @tiborvass @diogomonica: Any thoughts regarding the comments above? This is getting merged today, feedback much appreciated. |
d9916ee to
5f5cf7b
Compare
|
@aluzzardi @aaronlehmann could you add API and CLI reference doc ? |
Signed-off-by: Aaron Lehmann <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
- Neither swarm init or swarm update should take an unlock key - Add an autolock flag to turn on autolock - Make the necessary docker api changes - Add SwarmGetUnlockKey API call and use it when turning on autolock - Add swarm unlock-key subcommand Signed-off-by: Aaron Lehmann <[email protected]>
Signed-off-by: Aaron Lehmann <[email protected]>
Signed-off-by: Aaron Lehmann <[email protected]>
67ed7ef to
498cd47
Compare
There was a problem hiding this comment.
for a follow up; remove the trailing comma, and add a comma after "CAConfig": {}
Signed-off-by: Aaron Lehmann <[email protected]>
498cd47 to
824db2c
Compare
There was a problem hiding this comment.
for follow-up: add bool here
edit: realized that Cobra won't output booleans, so we probably need to include it in the description)
There was a problem hiding this comment.
@thaJeztah: bool doesn't appear in the --help output. Should I add it anyway.
There was a problem hiding this comment.
Just realized that, hm probably in the comment I guess
There was a problem hiding this comment.
also needs to mention the default if omitted (actually, if default is "disabled", we can change this description to just "Enable manager auto locking ..."
There was a problem hiding this comment.
@thaJeztah: Can you suggest a phrasing for this? --autolock or --autolock=true will enable it, and --autolock=false will disable it (in cases where it was previously enabled).
There was a problem hiding this comment.
This one is for init, so it can only "enable" it, so this can be simply;
Enable manager autolocking (requiring an unlock key to start a stopped manager)
The flag is shared between init and update right now. Do you think the phrasing of the description should be different for these connands? |
|
Saw this failure in CI running on an unrelated PR: I'll investigate this and provide a fix. |
This implements the Docker side of moby/swarmkit#1598. Builds on earlier work by @tonistiigi.
It's feature-complete but needs docs and some more testing.
cc @cyli @diogomonica @NathanMcCauley