Skip to content
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

Lock down jupyter pods #101

Closed
jlewi opened this issue Jan 7, 2018 · 6 comments
Closed

Lock down jupyter pods #101

jlewi opened this issue Jan 7, 2018 · 6 comments
Labels
area/enterprise_readiness Issues to support deployments connect better with existing enterprise infrastructure area/jupyter Issues related to Jupyter help wanted lifecycle/stale priority/p2

Comments

@jlewi
Copy link
Contributor

jlewi commented Jan 7, 2018

What would it take to lock down individual Jupyter pods so that only the owner has access?

I think the use case would be you have multiple data scientists sharing a cluster. Each data scientist has access to slightly different datasets. So they want to use their own credentials (and not a shared service account). So we'd like the pods to be sufficiently locked down that they feel comfortable putting their credentials in the pod (e.g. gcloud auth login) and that except for a cluster admin, no one will be able to access the pod and grab their credentials.

I think this might look like the following

  • Use a sidecar in the Jupyter pod to check the identity of the request (e.g. by looking at the JWT) and only accept requests from the owner of that server
  • Use RBAC to lock down the pod.

Background on running jupyter notebook containers as root vs. non root

@yuvipanda
Copy link
Contributor

yuvipanda commented Jan 8, 2018 via email

@jlewi
Copy link
Contributor Author

jlewi commented Jan 8, 2018

I think we will definitely need access to the K8s API because we want to allow users to create other K8s resources (e.g. TfJobs) from their notebooks. Although arguably they should be using user credentials for this and not a service account.

@yuvipanda
Copy link
Contributor

jupyterhub/kubespawner#110 is partially for dealing with directly mounting OAuth credentials and what not from your login provider into the pod as a secret, which might help (if you are using google auth to log in too)

We don't mount any service accounts by default, but you can certainly enable mounting :)

We'll probably also add NetworkPolicy support to the helm chart at some point, locking down traffic to only be along the paths necessary by default. Specifically, only allow traffic between hub/proxy and pods, and disallow it between

@jlewi
Copy link
Contributor Author

jlewi commented Feb 28, 2018

jupyterhub/kubespawner#115 would allow us to spawn notebooks in their own namespace which should be a big step forward with providing a good/multi-user security model with K8s/Kubeflow.

We might want to consider contributing to that to solve our problems.

@jlewi jlewi added area/jupyter Issues related to Jupyter priority/p2 help wanted labels Feb 28, 2018
@inc0
Copy link

inc0 commented Feb 28, 2018

@jlewi jlewi added the area/enterprise_readiness Issues to support deployments connect better with existing enterprise infrastructure label Nov 17, 2018
@stale
Copy link

stale bot commented May 16, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot closed this as completed May 23, 2019
yanniszark pushed a commit to arrikto/kubeflow that referenced this issue Feb 15, 2021
* root: Fix description

Signed-off-by: Ce Gao <gaoce@caicloud.io>

* docs: Update

Signed-off-by: Ce Gao <gaoce@caicloud.io>
elenzio9 pushed a commit to arrikto/kubeflow that referenced this issue Oct 31, 2022
* Adding myself to the CI team

* Adding myself to the google team members

* sorting lexically

* sorting lexically
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/enterprise_readiness Issues to support deployments connect better with existing enterprise infrastructure area/jupyter Issues related to Jupyter help wanted lifecycle/stale priority/p2
Projects
None yet
Development

No branches or pull requests

3 participants