--
You received this message because you are subscribed to the Google Groups "kubernetes-sig-architecture" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-arch...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CAO_RewZVcKZV8L%2B9hRO3X_QHBCy7AxLe7v%2Bxh3%2BYAQAXreuPVg%40mail.gmail.com.
Do you allow namespace owners to label their own Namespaces?
Do you impose restrictions on those labels (e.g. only unprefixed
labels or anything but "mycompany.com/*")?
How do you implement those restrictions (e.g. custom admission
control, Gatekeeper, ...)?
Do you provide a way for namespace owners to "request" labels and then
handle the application of those (either manually or through a portal
or controller)?
NetworkPolicy NamespaceSelectors are problematic if you _don't_ let users label their own Namespaces too, since in that case there may not be any label that selects the Namespace you want, and no way to add it.It seems to me like the problem is that LabelSelectors are a good API for selecting your own objects (ie, when the person writing the LabelSelector also controls the labels) or for selecting objects where the owner of the objects is explicitly labeling them with the intention of other users consuming those labels, and the users only care about the distinctions that the owner makes (eg NodeSelector on Pod). But they don't work well if you have to select against labels created by a user or users you don't trust (the "users can label their own namespaces" NetworkPolicy problem) or if you have to select against labels created by a user who doesn't care about your use case (the "only cluster-admins can label namespaces" NetworkPolicy problem).This is why everyone keeps asking about extending NetworkPolicy to allow selecting Namespaces by name, but no one ever suggests we need to extend it to allow selecting Pods by name; LabelSelectors work fine for the latter case, just not for the former.Answering your specific questions for OpenShift:On Friday, September 18, 2020 at 7:15:31 PM UTC-4 tho...@google.com wrote:Do you allow namespace owners to label their own Namespaces?noDo you impose restrictions on those labels (e.g. only unprefixed
labels or anything but "mycompany.com/*")?N/A
How do you implement those restrictions (e.g. custom admission
control, Gatekeeper, ...)?N/ADo you provide a way for namespace owners to "request" labels and then
handle the application of those (either manually or through a portal
or controller)?no-- Dan
--
You received this message because you are subscribed to the Google Groups "kubernetes-sig-architecture" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-arch...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/dbbf6bce-e58a-4bde-8773-c5c64a0b32e4n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CAH16Sh%2Bs1ie256Uc8sMFyThntnHvR3osLrX%2BQybrDA_XJToj3A%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "kubernetes-sig-architecture" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-arch...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CAO_RewaXFYdnQWAaLcuV%2B%3DmOegByc06csmRF9iFjXjR%2BV0fYtg%40mail.gmail.com.
I think much of the difficulty is not breaking existing users of labels.The implementation is also challenging because it's basically a security feature, we have to be sure we've got every possible mutation point.I think there's a debate to be had re: a) RBAC-checking (potentially many) individual labels during the course of editing an object, vs b) extracting "labels" to a separate object.a) is authz fan-out, and we don't do much of that currently, I'm pretty sure nothing in the system has a non-bounded number of RBAC checks right now.b) involves a join on reads if we want to present the externally-stored labels as part of the objects. This is read-time fan-out that we don't ever do right now, and would make our already-bad O(N) lists even worse-- O(N*M). But would we need to do this join? Not pretending to be the existing labels at all means we can't break existing users, and maybe it's OK if new users adjust what they do.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CAB_J3bZyGb_ZRJLKYYnh6QHi4gtuJ5cL%2BnXFJxFqWJsZntQaeA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CAPgfqyUFz4jvftrok96nUXJ%2BfzN2xr4XfKvqOgR8ieh-9Ms-TQ%40mail.gmail.com.
My concern is that there are more such monsters under the bed, and
over-training on labels may be wrong. Having RBAC apply to a
sub-scope of fields also feels awkward and kind of wrong (and I have
argued against it in other API proposals).
--
You received this message because you are subscribed to the Google Groups "kubernetes-sig-architecture" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-arch...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CAO_RewZpLESwn-FfRoxgUyLcYkTNuRn%3D4aqdQVr-GNzWXqk12w%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CAFjGRXXYabwFZiURu%3DcHKuccKvtJ%2BxDPPxYKoRmm-kx%3DH5npOg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/BY5PR21MB1444D312DA3057498767D0F1DB390%40BY5PR21MB1444.namprd21.prod.outlook.com.
I'm definitely ok with a new type of metadata. I'd vote for "system-tags" rather than just "tags" since I think that it helps users understand that the usage of those tags are restricted by some outside system vs labels.
(I understand that in many cases these won't be used by the actual "core" system, but rather by operators, etc, but I think those things are "system enough" that it will help clarify things.)
The situation with labels spans more than just namespaces. For example nanny style pods (running with higher privileges) running in some user namespaces. Every time access (or a scarce resource) is given because a selector matches it puts us in a situation where "a malicious or unknowing user can set label name and its corresponding value". I have seen this in every situation where labels are used for that. Controlling Access to specific properties looks a lot like ABAC (sidebar: it is ABAC at least on target side). It is a faux pas for most. I share equal dread. But if we decided to go that route then I expect every bigCo out there to have requirements around extending it to other properties. With valid use cases (monsters under the bed?). For example: setting FQDN/public IPs usually locked to some personal.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/ba2ab59e-f9b4-4653-8d2c-810ba8be5872n%40googlegroups.com.
Even now, people would probably like to be able to restrict which users can attach a specific persistent volume or a secret to a Pod, which Ingress objects can use a particular Secret, etc.
Tags could be inherited using the hierarchical namespace controller:
...
In the meantime, in the case of NetworkPolicy, allowing specification of Namespace names, or even Namespace name prefixes, would be a pragmatic incremental fix for multi-tenant clusters. Creating Namespaces is generally a privileged operation, since otherwise Namespace-scoped policies could be circumvented by creating a new Namespace.
This sounds a lot like nested namespaces ;)
On Mon, Sep 21, 2020, 5:33 PM Tim Allclair <timal...@gmail.com> wrote:Setting implementation aside, and thinking about the use cases:Generally, what we're talking about is some authority wants to designate a group or set of things, e.g:- "security team has designated a set of exceptional workloads as privileged", (and as a developer, I want to request a policy exception)
As a strawperson, what about something like this:- a "resource set" object, with both a namespaced & cluster scoped version (namespaced version can only contain objects in the same namespace)- resource sets can be nested (this enables the self-service piece)- resource sets can apply "hierarchically", meaning I should be able to add a deployment to the set, and in doing so include all the replica sets and pods indirectly owned by the deployment- where a label selector is used, a resource set list may also be supplied
> To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-architecture+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/7c23364c-7b18-4d48-837e-c91318e8faf1o%40googlegroups.com.