You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f1beab4
Browse filesBrowse the repository at this point in the historyBrowse files
The `id` and `activate` fields are required and the other fields may be omitted. For more information about how to use the `requires`, `optional`, or `provides` fields, see {ref}`services`.
113
113
114
-
-`id` is a required unique string. The convention is to use the NPM extension package name, a colon, then a string identifying the plugin inside the extension.
114
+
(plugin-id-convention)=
115
+
116
+
-`id` is a required unique string. The convention is to use the NPM
117
+
extension package name, a colon, then a string identifying the plugin inside
118
+
the extension, for example `my-extension:plugin`. JupyterLab treats the part
119
+
before the first colon as the extension name when applying extension-level
120
+
configuration such as enabling, disabling, deferring, or locking all plugins
can enforce the related `<package>:<TokenSymbol>` convention for token IDs
125
+
used with `new Token(...)`.
115
126
-`description` is an optional string. It allows to document the purpose of a plugin.
116
127
-`autostart` indicates whether your plugin should be activated at application startup. Typically this should be `true`. If it is `false` or omitted, your plugin will be activated when any other plugin requests the token your plugin is providing.
117
128
-`requires` and `optional` are lists of {ref}`tokens <tokens>` corresponding to services other plugins provide. These services will be given as arguments to the `activate` function when the plugin is activated. If a `requires` service is not registered with JupyterLab, an error will be thrown and the plugin will not be activated.
Copy file name to clipboardExpand all lines: docs/source/user/extensions.md
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -228,6 +228,19 @@ search result and the user is free to install any source extension. This is the
228
228
To bring more security, you or your administrator can enable `blocklists` or `allowlists`
229
229
mode. JupyterLab will check the extensions against the defined listings.
230
230
231
+
:::{note}
232
+
In security-sensitive multi-user deployments, extension manager listings are not
233
+
a substitute for isolating the JupyterLab server environment from user-controlled
234
+
kernels. If users can import JupyterLab server internals such as
235
+
`jupyterlab.extensions.pypi.PyPIExtensionManager` from a kernel, the kernel and
236
+
server are sharing an environment that users may be able to modify outside the
237
+
Extension Manager. Administrators should run the server in an environment users
238
+
cannot modify, and may run kernels in separate user-writable environments. With
239
+
that separation, installing packages in a kernel environment does not install
240
+
extension code into the server environment. See JupyterHub's guidance on
241
+
[isolating packages in a read-only environment](https://jupyterhub.readthedocs.io/en/latest/explanation/websecurity.html#isolate-packages-in-a-read-only-environment).
242
+
:::
243
+
231
244
:::{warning}
232
245
Only one mode at a time is allowed. If you or your server administrator configures
233
246
both block and allow listings, the allow listing takes precedence.
@@ -390,12 +403,35 @@ Administrators may lock specific plugins with:
390
403
jupyter labextension lock my-extension:plugin
391
404
```
392
405
406
+
They may also add an extension-level lock by using the extension name without
407
+
a plugin suffix:
408
+
409
+
```bash
410
+
jupyter labextension lock my-extension
411
+
```
412
+
413
+
JupyterLab identifies the extension for a plugin from the plugin ID prefix
414
+
before the first colon. For example, `my-extension:plugin` is treated as a
415
+
plugin in the `my-extension` extension. Extension-level locks therefore apply
416
+
only to plugins whose IDs use the same prefix up to the colon, such as
417
+
`my-extension:plugin` and `my-extension:other-plugin`. Extension authors should
418
+
use the NPM extension package name, a colon, then a string identifying the
419
+
plugin inside the extension, as described in the
420
+
{ref}`plugin ID convention <plugin-id-convention>`, so
421
+
administrators can lock or unlock all plugins in an extension consistently.
422
+
393
423
To unlock a locked plugin:
394
424
395
425
```bash
396
426
jupyter labextension unlock my-extension:plugin
397
427
```
398
428
429
+
To remove an extension-level lock:
430
+
431
+
```bash
432
+
jupyter labextension unlock my-extension
433
+
```
434
+
399
435
The locked plugins appear on the plugin list with a lock icon and cannot be enabled/disabled from the user interface:
0 commit comments