-
Notifications
You must be signed in to change notification settings - Fork 39.6k
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
Policies on Labels and Selectors #2211
Comments
Once we have identities, should ident be an automatic label? Select pods On Thu, Nov 6, 2014 at 12:56 PM, Eric Tune notifications@github.com wrote:
|
I don't think so. |
Hmm, I sort of assumed that eventually we would have a "principal ident" Because your example is dead on, it should be possible for ME to craft a On Thu, Nov 6, 2014 at 1:16 PM, Eric Tune notifications@github.com wrote:
|
@thockin
GCE does not appear to be that way. It has these properties, as far as I can see:
I see Kubernetes being more like GCE. It already has namespaces which are not container identity. |
To answer your second thing, I think we could have policies that say: |
So nothing will be tagged with originating and/or acting identity? I'm Setting policy on who can create certain labels feels inverted to me - How do we get to a place where containers don't run as root, but as some On Fri, Nov 7, 2014 at 3:36 PM, Eric Tune notifications@github.com wrote:
|
Certainly the audit log (#2203) will show the user-string who created each Note that this matches how I understand GCE to work
I filed this bug after talking about it with @bgrant0607 who can maybe give Containers should use user namespaces once docker supports it. On Fri, Nov 7, 2014 at 8:52 PM, Tim Hockin notifications@github.com wrote:
|
We don't want it to be possible for others to pollute the meaning of labels -- doing so will break lots of assumptions made by users and automated components. For instance, what if users applied labels used by the system? Without enforcement, namespacing of labels only prevents completely accidental collisions, not pollution or subversion caused by misguided or malicious acts. This is an important issue especially in the case that labels are used to attach flexible security to objects, but there are lots of scenarios, such as creating pods that are targeted by another's services or replication controllers, or creating labels that will match selectors for filtering monitoring or logging data. Without a solution to this problem, in my experience all types of selectors/filters just get more and more complex as people try to defend against all of these scenarios. Object namespaces solve some of the problem by making objects in other namespaces invisible, but it doesn't solve the whole problem, such as abuse of system/tool labels. |
/cc @deads2k |
This thread languished (sorry), but to Eric's last comment: I think #2 "GCE experience could be improved" is true (my opinion). Secondly, regarding root-in-namespace, I think we should steer people away On Thu, Jan 8, 2015 at 6:41 AM, Jordan Liggitt notifications@github.com
|
In the second paragraph of your last comment, I think you were asking: how are the monitoring pods of the monitoring service, in the monitoring-service namespace, allowed to read the resources and select by labels in a monitoring-client namespace. That is a good question which I certainly had not thought through. Off the top of my head, I'd say that the client needs to grant the monitoring service some kind of read permission on its resources, including the ability to select labels, or at least those labels which are relevant to monitoring. Giving the monitoring service the ability to read labels off your pods and select them seems pretty safe. Were you envisioning that the monitoring service would need to set labels too? If so, elaborate. For your third paragraph, I read the man page for user_namespaces but I'm still having trouble understanding what special abilities a root-in-namespace user has. Explanations or pointers welcome. |
I guess I can buy the "you need to grant the monitoring team access to your root in namespace can do things like write to all files in the container On Tue, Jan 13, 2015 at 9:34 AM, Eric Tune notifications@github.com wrote:
|
One of the main cases for this is that services should only use backends they trust. If service load balancer used TLS to talk to service backends, then it would also be able to detect a rogue backend. This seems like a good way to do things. If the other use cases for label/selector policy are more nuisances, then maybe we don't bother to implement this. |
Related: #15390 |
Note that labels are scoped by namespace. |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
/remove-lifecycle rotten |
Suppose there is one namespace with two users.
Tammy makes a service that selects pods with "type=prod".
Now, say Fred starts some buggy code in pods. He meant to apply label "type=dev", but by accident he applies "type=prod". Now user requests are hitting his buggy servers.
We should have a way to control who can apply and select a certain label-key-value. ABAC policy could certainly support this.
This is relatively low priority, since people could use namespaces to separate Fred and Tammy's pods. But, in the long run, I think we want to encourage people to put more things in a single namespace.
The text was updated successfully, but these errors were encountered: