News for hackers. Stuff that matters.
Re:Show HN: konfd – Manage Kubernetes secrets and configmaps... by TheDong on Monday December 05, 2016 @01:33PM (#13107903)
If someone can access your etcd, they can write new pods to run into it which will then be distributed to nodes to run.

Those new pods could reference existing secrets, be in any namespace (e.g. kube-system), and are exactly the same as root on all k8s nodes.

Because of that, having access to etcd is equivalent to having admin cluster access. The secrets are no more secret if they're encrypted in etcd or not since anyone with access to etcd can launch pods that will decrypt arbitrary secrets.

This is true iwth vault as well. Once secrets are in vault, access to etcd will still result in all secrets being available to the attacker. The threat model is no better.

There are plans to encrypt them in etcd for the sake of them not appearing in backups and because people like you constantly bitch about it, but it doesn't mater and saying they shouldn't be called secrets because of this is FUD.

Re:Show HN: konfd – Manage Kubernetes secrets and configmaps... by otterley on Monday December 05, 2016 @02:04PM (#13108245)
First, I'm offended by your characterization of my argument as "bitching," as though our concerns are unjustified.

At any rate, you bring up two points: First, that etcd is insecure, which is a problem in itself that needs to be addressed. Communications between K8S and etcd and between applications and etcd need to be secured, and K8S itself needs role-based ACLs in the core.

Second, for the Vault use case, the best practice is not to place Vault tokens in etcd that grant direct access to any secrets. Instead, the best practice (as Kelsey's vault-controller project does) is to pass a "wrapper token," which is a single-use token. The application consumes the wrapper token (hopefully quickly) and exchanges it for a longer-lived token, which can then be used to access the secret data.

Once the wrapper token has been used, it is subsequently worthless to someone who has direct etcd access. And Vault's auditing capabilities can help you detect misuses of wrapper tokens.

Re:Show HN: konfd – Manage Kubernetes secrets and configmaps... by soamv on Monday December 05, 2016 @02:39PM (#13108583)
The comment you're replying to doesn't say that etcd is insecure; just that access to etcd is equivalent in power to Kubernetes API access.

It's hard to have a productive discussion in such a confrontational tone, especially when you don't really have all the facts. If you have questions about how to secure Kubernetes communication with etcd, feel free to ask!

Re:Show HN: konfd – Manage Kubernetes secrets and configmaps... by otterley on Monday December 05, 2016 @02:45PM (#13108663)
What facts do you think I don't possess? Does etcd have an ACL capability yet? Does it possess auditing capability?

AFAIK etcd only supports TLS client authentication, which is arguably a fraction of what it needs in order to be considered a secure store in any meaningful sense. Consul is miles ahead in this regard.

By all means, correct me if I'm mistaken.

Re:Show HN: konfd – Manage Kubernetes secrets and configmaps... by TheDong on Monday December 05, 2016 @04:39PM (#13109924)
What etcd does and doesn't support doesn't matter here.

Pods do not access etcd. Nothing that is not fully trusted has access. You don't need ACLs when the only users of etcd are 100% trusted (aka just kubernetes core components).

The kubernetes API provides secrets to pods and can do its own validation (and there's experimental support for that). It can provide its own auditing. That's where it actually matters, not etcd.

Re:Show HN: konfd – Manage Kubernetes secrets and configmaps... by otterley on Monday December 05, 2016 @05:12PM (#13110217)
The fact that you don't allow anything to connect to etcd besides the K8S components doesn't really make etcd itself inherently secure. It also implies that access to etcd is an all-or-nothing proposition, which doesn't work well in complex environments. People will need to get into etcd in order to perform debugging, maintenance, etc., and at big organizations, they will need differing levels of access depending on their respective roles.

And your assumption that only K8S will access etcd isn't necessarily shared by others. In the model implementation, perhaps that is so; but in the real world, implementors may desire to share etcd with other applications. This too necessitates additional security options for etcd itself.

Re:Show HN: konfd – Manage Kubernetes secrets and configmaps... by mugsie on Monday December 05, 2016 @07:09PM (#13111121)
If someone was actually interested in security, they would not allow tenant (or user / etc) defined components access the base infrastructure's etcd, even if it had ACLs.

Basic separation of concerns would call for a separate instance of etcd.

In a complex environment, spinning up a new etcd should not be a big deal.

Now, having ACLs, is not a bad thing, but they should only be used to lock down the base infrastructure access even more, and still have a separate instance for other applications.

Re:Show HN: konfd – Manage Kubernetes secrets and configmaps... by robszumski on Monday December 05, 2016 @07:43PM (#13111298)
Re:Show HN: konfd – Manage Kubernetes secrets and configmaps... by otterley on Monday December 05, 2016 @08:47PM (#13111612)
First, I apologize for my ignorance re: etcd ACL functionality. I did try to research it, but...

Can you please ensure it's in the Security section of the documentation? It's not mentioned there at all! https://coreos.com/etcd/docs/latest/op-guide/security.html

Also, "authentication" is not identical to "authorization" or "access control" -- and it's not obvious to the reader that discussion of one includes the other. The words "ACL" and/or "access control" really need to be specifically used in the title and body of the pertinent documentation to be easily locatable by the researcher.

Finally, it doesn't appear that the K8S API server can authenticate to etcd yet. (That's not etcd's fault, but it does contribute to my impression of the integration's overall security posture.) Again, please correct me if I'm mistaken.

Re:Show HN: konfd – Manage Kubernetes secrets and configmaps... by mugsie on Tuesday December 06, 2016 @07:37AM (#13114134)
The great thing about open source is that you can make changes when you see some thing that is wrong :)

https://github.com/coreos/etcd/blob/master/Documentation/v2/... and https://github.com/coreos/etcd/blob/master/Documentation/op-... are the two pages.

Re:Show HN: konfd – Manage Kubernetes secrets and configmaps... by otterley on Wednesday December 07, 2016 @11:39AM (#13123817)
Open-source doesn't mean free labor. CoreOS is a for-profit enterprise; it's in their own best interest to hire people to produce great documentation.
Re:Show HN: konfd – Manage Kubernetes secrets and configmaps... by mugsie on Thursday December 08, 2016 @09:25AM (#13130415)
Open Source also does not mean free products and support.

As a case in point, you were giving out about 2 different pieces of open source software in this thread.

Neither of which you have to pay for. Both of which are complex system that have taken many many people hours to build. As a return, is suggesting that you may submit a PR (or even a bug, with suggestions so that the people CoreOS hires to write docs know there is an issue)

Re:Show HN: konfd – Manage Kubernetes secrets and configmaps... by iamskeptic on Wednesday December 07, 2016 @09:43AM (#13122824)
Maybe you don't realize it but you're coming across as bossy and confrontational:

"I (and others) would kindly appreciate it if you'd stop"

"If you'd like to find a place to help, I'd suggest"

"engineering teams need to do a better job of integrating community PRs "

"Finally, I'd like to see deadlines and decision-makers appointed"

"What facts do you think I don't possess?"

Re:Show HN: konfd – Manage Kubernetes secrets and configmaps... by otterley on Wednesday December 07, 2016 @10:43AM (#13123318)
I have no doubt. After spending 1 year with K8S, I've become extremely frustrated with it and its components. I honestly expected more (and better) out of Google and its partners and contributors.

They don't owe me anything in particular, but I do wish more people would let their fruit ripen on the vine instead of in the grocery store (or worse, at the purchaser's house).

And judging by the comment scores, I'm not the only one who feels this way.

Conversely, you may note that I do get very excited and happy about products that are well-designed, well-documented, and aren't dumped onto an unsuspecting public before they are mature.

Re:Show HN: konfd – Manage Kubernetes secrets and configmaps... by iamskeptic on Wednesday December 07, 2016 @01:48PM (#13125041)
Immature software is sure a stressing place thing to get involved with. Thanks for explaining your point of view.

I think this article is pertinent: https://medium.com/@thejameskyle/dear-javascript-7e14ffcae36...

Re:Show HN: konfd – Manage Kubernetes secrets and configmaps... by otterley on Wednesday December 07, 2016 @02:38PM (#13125496)
Thanks. I've no doubt that the teams involved are well intentioned, and I don't want to discourage them from doing quality work. And I know it can be frustrating to receive negative feedback.

So if anyone's feelings have been hurt, please know that was not my intent.