notebook icon indicating copy to clipboard operation
notebook copied to clipboard

Trusted indicator

Open jtpio opened this issue 2 years ago • 4 comments

Problem

The classic notebook shows a "Trust" indicator in the top area:

image

RetroLab currently doesn't provide such indicator.

Proposed Solution

JupyterLab shows a shied in the status bar:

image

And exposes a command to trust a notebook:

image

We can reuse the same command, and add a new button to the menu area to the right of the kernel status indicator:

https://github.com/jupyterlab/retrolab/blob/9010ff543538dd6b15d647dd38ce44626095db84/packages/notebook-extension/src/index.ts#L165

Additional context

This indicator can be added to the notebook-extension: https://github.com/jupyterlab/retrolab/blob/main/packages/notebook-extension/src/index.ts

jtpio avatar Nov 10 '21 14:11 jtpio

JupyterLab shows a shield on the statusbar (but there are some issues that we need to fix notebooks often being marked as not trusted even though those should be trusted.

krassowski avatar Nov 10 '21 17:11 krassowski

Ah thanks @krassowski :+1:

For some reason it has never been really visible to me. Probably because it's "down" in the UI and easy to miss.

I have updated the top comment to mention that.

jtpio avatar Nov 10 '21 18:11 jtpio

The Jupyter Notebook security docs suggest that JupyterLab also makes a menu option in the File menu available for trusting an untrusted notebook. Will there be a separate PR for the new menu option?

JasonWeill avatar Dec 01 '21 21:12 JasonWeill

Good point. JupyterLab has this option in the command palette but not in the menu.

While I don't see a mention of JupyterLab in that link, I see the point. I guess the problem with the docs in jupyter-notebook subdomain is that it sometimes speaks for Jupyter Notebook as a code/product and sometimes it makes broad statements which can or should be interpreted as "Jupyter as a whole", while not having a normative power itself. The current docs for jupyter-server at https://jupyter-server.readthedocs.io/en/latest/operators/security.html also contain the same mention.

krassowski avatar Dec 01 '21 22:12 krassowski