-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Secure etcd by default #9475
Comments
@gyuho is this a 4.0 proposal or 3.4+ Although I think it is a great step forward for security it will create a storm of breakage for insecure tests, deployments etc. |
@hexfusion Probably, we need research more! |
+1
The hard part about this is that users are still required to supply client-auth flags. So they're still going to either generate TLS certs and add new flags or just supply If we're punting this to 4.0, I think it'd be better to make it impossible to start an etcd server that allowed unauthenticated requests |
You got a good timing: https://arstechnica.com/information-technology/2018/03/thousands-of-servers-found-leaking-750-mb-worth-of-passwords-and-keys/ I hope TLS here refers to some TLS-auth with client certs, as otherwise it is of course no authentication. |
Can someone research what other databases do? I am skeptical we want to turn authentication mechanisms on by default as it increases friction to the dev/test use case and then the natural question is what is the "default" authentication. For example do you generate a random password, generate a TLS cert, etc and force that to happen on first run? And then where do you put that? In a log file, put it on disk, etc? @ericchiang This isn't about insecure HTTP but instead about mTLS or some other authentication method. |
This will get the list started. MySQL 5.7.x:
ref: Percona MongoDB 3.6.x
ref: MongoDB CockroachDB 1.1.x
ref: CockroachDB |
|
I guess it is a fair point that there is not much technically different between
as they are both actions taken by the admin to change defaults in a possibly insecure manner. But IMO there is a difference between requiring full chain TLS by default and listening to localhost. The message and intention to promote secure usage is much more obvious and clear. We can not control the users but we can define our vision of what should be the best practice as a default. Setting |
This issue made it to the news: |
@yudai shared a problem related to this issue with me. He's caring about the case of failed initialization scripts. Having such a script (e.g. configuring users, roles and permission then enable auth) for initializing an etcd cluster is usual. If the script fails before enabling auth because of some reasons e.g. bugs or resource shortages, the cluster will be running without auth. In such a case, malicious users can create keys. In his case managing TLS certs is too costly. So adding an option which enables auth at startup time to etcd would be valuable (the option won't change the default behaviour). |
Maybe allowing a symmetric secret for authenticated encryption could simplify secret mgmt for the base case of simple deployments and testing? Two strings of secret state, one secret for peer-to-peer, one secret for client-auth, both can be passed via flags or env. Simply using aes-gcm seems OK for this mode, many other options possible. |
@pbx0 if you can place a symmetric key you can place TLS assets. I think the overhead of supporting a form of transport security other than TLS is going to be way more than just providing scripts to generate TLS assets. |
I think having two strings to deal with just makes the base case so much more simple to deal with compared to : https://coreos.com/etcd/docs/latest/op-guide/security.html The technical overhead may not worth supporting and thats fair, but I think it may be worth evaluating. Entering two easily copy-pasted flags vs a collection of files, secrets and flags just seems radically more understandable and easier for simple first-time setups. Edit: also worth making it clear that one could no longer simply curl keys which could be a big deal if someone didn't realize that this mode limited your client options (maybe there is a way to do symmetric tls that curl understands?) |
@pbx0 the problem with symmetric keys is they can't be rotated. This option has been discussed and rejected a lot of times and initially during the design phase of etcd. I also agree with @ericchiang |
Aside: I wish TLS PSK was merged into Go |
@raoofm I'm not sure all use cases require rotation which can also be complicated. I'm only suggesting that maybe there is room in the design space for a more limited, less flexible mode of security that is far easier to use and get up and running, the standard TLS setup would remain available. @philips Agreed, it'd certainly make this crazy idea a lot more tolerable from a implementation and maintenance point of view. |
Maybe this is obvious / won't work, but a unique initial symmetric key / root password could be derived from the initial cluster configuration (cluster id, hash of members, etc). An offline utility would get the key by processing data from the member dir / boltdb. |
So if you know the configuration, you know the key? That does not sound secure to me at all. |
/cc @philips @ericchiang
The text was updated successfully, but these errors were encountered: