-
Notifications
You must be signed in to change notification settings - Fork 266
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
Limit dashboard visibility to a subset of namespaces #1018
Comments
Yeah this is an interesting one, agree it'd be nice to have - so can you share the pod log details please or the errors you're seeing? I wonder if in our UI we do an all namespaces lookup first and you're getting a displayed RBAC error on the page 🤔 |
Thanks for the prompt reply. here are the logs I get:
|
Any update or progress here ? |
Hey @MohamedTalhaoui, sorry for taking so long to get back to you - nobody's working on this but still think it's a good idea! Not sure if you can see it but we have a ZenHub board so I've put it up the backlog as it's an interesting piece of work anyone could pick up (and most of the active developers on the Dashboard here at IBM look at said board when looking for something new to pick up). For anyone who does pick this up, do a good analysis and explore what options we have. |
Hi, |
Hi, |
I made a step in this direction here: tektoncd/experimental#536 Pipelines don't need to be deployed in each namespace, a single instance of pipelines should be ok. It's probably not technically difficult to implement but how to make this available to the end user ? |
Hey @MohamedTalhaoui and @eddycharly, I brought this up on the working group call today - it's something we should call out as a feature to add to our roadmap I think. I agree, it'd need to be a "can have multiple installs of the Dashboard" implementation, so a good first step would probably be to have Roles and RoleBindings everywhere as a version (ideally through kustomize), or we somehow lay down those roles programatically based on an installation mode. I don't really want to see us having an increased test matrix (so, read-only * openshift or not * multiple install namespace mode or not), so design contributions would be awesome here @AlanGreene ^^ |
@a-roberts yep I heard that ;) |
I wouldn’t create the roles programmatically, it would require the backend to have permissions to create roles, I would prefer to avoid that for security reasons. |
Ah, didn't realise you were listening in! Doesn't ClusterRole require cluster-admin permissions to install? Happy to be mistaken and that would simplify things. I'm wondering as this was brought up here (definitely a related issue): and it'd be great if addressing this issue removes any cluster admin necessities. +1 on avoiding doing things programatically. |
I think it's like other resources, RBAC decides if one is allowed or not to operate ClusterRoles. Anyway i don't think the requirement here is to let users install the dashboard themself, it would probably be installed by someone in the ops team who has the necessary permissions to do so. But once installed, it should show resources from a single namespace etc... not the whole cluster. I could have misunderstood the issue though (@MohamedTalhaoui ?) |
Issue #1355 is not related, it's a breaking change in Deployment label selectors (those are immutable). I wrote it in the description of the PR (#1327)
But AFAIK this was not released yet, the user is probably trying to install master. |
I see, yeah the reason I figured it's related is that they, by the sounds of it, don't have permissions to install the Dashboard in their cluster, but they do have permissions to install things into their own namespace, and so by implementing this feature, if we went down the But indeed, everything we have is scoped to a namespace anyway, so they should be able to install into a particular namespace. Thanks for the feedback on this one and good to get the discussion going. Yeah, |
#1355 is related, there are 2 issues discussed:
|
Exactely. |
I guess we’re talking about strong isolation here, not just ui presentation, otherwise the drop down in the side nav would be enough 😄 Such a setup will probably require admin rights at some points, chances are that it will require to configure an ingress with authentication, register dns records, ssl certificates... |
Do you mean preventing them from creating resources in any namespace of the cluster ? |
Ok so install is not an issue, Ops team has admin privileges in the cluster right ? If that's correct, the only thing left is limiting the actions scope of the dashboard backend to a single namespace. |
I confirm Install is not an issue for my use case. |
There are still some details to be worked on but it should be pretty straight forward. My recommended setup would be as follows:
With this setup a specific dashboard instance would only access a specific namespace and therefore only the pipeline runs, secrets, service accounts etc of the team associated with the namespace. The ingress/authentication part is out of scope here, it will depend on your setup/provider. I have other ideas to make things more flexible and potentially cross namespaces/cross teams but we’re not quite there yet so the setup above would be more easily reachable for now. |
How would you bind a dashboard instance to a specific namespace ? |
Something along those lines Regarding your tiggers question i don't know triggers well enough, sorry. |
I began working on this, splitting RBAC for now. |
/remove-lifecycle stale |
@AlanGreene: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
We need to review the current state of this feature and determine next steps. It seems like there may be some issues: https://tektoncd.slack.com/archives/CHTHGRQBC/p1602167113007100 Waiting for more details from the user. |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
This is still something we'd like to do, freezing so it doesn't get auto-closed. |
Is it possible to have this work on multiple namespaces instead of a single one? |
The The other function of the Historically the reason for supporting a single namespace was due to some of the back end code which registered informers for resources in the specified namespace instead of registering cluster-wide. This code has since been removed and we now take a different approach so the original limitations no longer apply. Current situationIf you were to provide custom RBAC today to restrict access to a subset of namespaces one of two things would happen in the UI (this is without specifying the
FutureI think that when we revisit the 'single namespace' restriction described in this issue it would actually make sense to extend it to allow specifying multiple values, and ensure we handle this correctly in the UI. Updating the title and description accordingly. |
I tried restricting the rbac to some namespaces by switching |
/area roadmap |
PR #3042 is open to replace the existing |
This will be available in the next nightly release ~4am UTC tomorrow, and will be included in the v0.39.0 release in the next week or so. |
We have different teams and want give them different dashboard to manage their own pipelines.
Basically we are giving each team a namespace and deploy tekton pipeline and dashboard on it.
K8S RBAC provides isolation so team A cannot see team B pipelines.
The problem is that tekton dashboard needs cluster roles to list the pipelines in all namespaces.
We have tried to change the tekton-dashboard-minimal ClusterRole/ClusterRoleBinding to Role/RoleBinding, but that makes the dashboard failing to start.
Expected behavior
Tekton dashboard should work with only Role/RoleBinding and only show pipelines in its own namespace
Actual behavior
Tekton dashboard is failing because it needs Tekton ClusterRole/ClusterRoleBinding to list all pipelines in the cluster
Steps to reproduce the problem
Environment
Kubernetes Platform:
GKE v1.14.10-gke.17
Tekton Pipelines version:
v0.10.0
Tekton Triggers version:
latest
Tekton Dashboard version:
latest
The text was updated successfully, but these errors were encountered: