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

Use JupyterHub sharing when available #64

Open
minrk opened this issue Jan 23, 2024 · 2 comments
Open

Use JupyterHub sharing when available #64

minrk opened this issue Jan 23, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@minrk
Copy link
Contributor

minrk commented Jan 23, 2024

Is your feature request related to a problem? Please describe.

JupyterHub 5.0 will introduce the concept of sharing, so users can grant each other access to their server.

That PR includes an example javascript notebook and server configuration to grant JupyterLab permissions to make the necessary API requests.

Up to now, there have been two ways to share links to a shared server in jupyterhub:

  • share link with token, which always works, but spoofs authentication, bypassing all JupyterHub control (not good)
  • share link without credentials, which preserves jupyterhub authentication (good), but assumes the shared-with user already has access (annoying)

With the new sharing permission, (expiring) links can be generated that grant permission without leaking credentials or bypassing anything.

A link-to-this-doc URL will look like:

/hub/accept-share?code=...&next=encoded(/user/name/lab/tree/...)

i.e. the default share link encoded in the next parameter of the accept URL.

Describe the solution you'd like

Use the jupyterhub share-codes API to generate sharing links that grant access to the server when called from within JupyterHub.

Additional context

sharing links with a token shouldn't ever be done in a JupyterHub context, so this should be able to replace the 'with credentials' links to one that preserves proper JupyterHub authentication, when available.

There are also options to specify the scopes to be shared, expiration, etc. if they should be different from the default. UI for that gets hairy.

@minrk minrk added the enhancement New feature or request label Jan 23, 2024
@minrk minrk changed the title Using JupyterHub sharing Us JupyterHub sharing when available Jan 23, 2024
@krassowski krassowski changed the title Us JupyterHub sharing when available Use JupyterHub sharing when available Jan 23, 2024
@krassowski
Copy link

Part of the code for link sharing has been moved to https://github.com/jupyterlab/jupyter-collaboration (see jupyterlab/jupyter-collaboration#150, #59 (comment)). This extension was not ported to lab 4.0 (#59). We will need to decide whether to archive it and implement your suggestion in jupyter-collaboration, or keep it alive and implement it here. Any thoughts?

@minrk
Copy link
Contributor Author

minrk commented Jan 23, 2024

Implementing in collaboration makes sense.

I think #60 discussed some points that would be needed to archive this in favor of collaboration. But the lack of maintenance capacity makes sense to push forward on collaboration first, at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants