Open minrk opened 9 months ago
Part of the code for link sharing has been moved to https://github.com/jupyterlab/jupyter-collaboration (see https://github.com/jupyterlab/jupyter-collaboration/pull/150, https://github.com/jupyterlab-contrib/jupyterlab-link-share/issues/59#issuecomment-1569690374). This extension was not ported to lab 4.0 (https://github.com/jupyterlab-contrib/jupyterlab-link-share/issues/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?
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.
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:
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:
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.