kubeflow / notebooks

Kubeflow Notebooks lets you run web-based development environments on your Kubernetes cluster by running them inside Pods.
Apache License 2.0
18 stars 20 forks source link

jupyter-web-app misses RBAC rule for `namespaces` resources #79

Open orfeas-k opened 1 year ago

orfeas-k commented 1 year ago

/kind bug

JWA doesn't have an RBAC rule for namespaces resources as other web apps do (e.g. VWA). This will result in an authorization error if JWA is deployed outside of Kubeflow (without the dashboard).

What steps did you take and what happened: I observed that JWA doesn't have this rule and then I went through the code in order to figure out if it is needed and here is why it is needed:

  1. JWA, when deployed outside of Kubeflow (no CentralDashboard present) implements lib-namespace-select component in its index page with namespaces URL /api/namespaces.
  2. This component subscribes to the common backend service's getNamespaces() using the above namespaces URL.
  3. This backend service (a service which frontend uses to contact the backend part of the WA) hits the backend at this API route which would require authorisation to perform this action.

Thus JWA would not be able to list namespaces resources.

andreyvelich commented 2 weeks ago

/transfer notebooks