jupyter-server / jupyter_server

The backend—i.e. core services, APIs, and REST endpoints—to Jupyter web applications.
https://jupyter-server.readthedocs.io
BSD 3-Clause "New" or "Revised" License
481 stars 293 forks source link

Allow-list for server extensions? #1445

Open krassowski opened 1 month ago

krassowski commented 1 month ago

Problem

I would like to run a simple jupyter-server with a single extension and enforce that no other extensions are picked up. This does not appear to be currently possible.

--ServerApp.jpserver_extensions allows to toggle off individual extensions if these are known, but there is no way to disable all and only enable select few.

Proposed Solution

Maybe --ServerApp.jpserver_extensions_allow_list which takes precedence over --ServerApp.jpserver_extensions?

Additional context

JupyterLab has an allow list and a block list for frontend extensions.

krassowski commented 1 month ago

I guess the closest thing to this is load_other_extensions in ExtensionApp. My problem right now is that this does not play nicely with JupyterHub which requires a ServerApp