-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emit events from the Contents Service (#954)
* emit events from the contents manager * remove unused imports * return default event_logger in contents manager * remove unused actions
- Loading branch information
Showing
6 changed files
with
124 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
"$id": https://events.jupyter.org/jupyter_server/contents_service/v1 | ||
version: 1 | ||
title: Contents Manager activities | ||
personal-data: true | ||
description: | | ||
Record actions on files via the ContentsManager. | ||
The notebook ContentsManager REST API is used by all frontends to retreive, | ||
save, list, delete and perform other actions on notebooks, directories, | ||
and other files through the UI. This is pluggable - the default acts on | ||
the file system, but can be replaced with a different ContentsManager | ||
implementation - to work on S3, Postgres, other object stores, etc. | ||
The events get recorded regardless of the ContentsManager implementation | ||
being used. | ||
Limitations: | ||
1. This does not record all filesystem access, just the ones that happen | ||
explicitly via the notebook server's REST API. Users can (and often do) | ||
trivially access the filesystem in many other ways (such as `open()` calls | ||
in their code), so this is usually never a complete record. | ||
2. As with all events recorded by the notebook server, users most likely | ||
have the ability to modify the code of the notebook server. Unless other | ||
security measures are in place, these events should be treated as user | ||
controlled and not used in high security areas. | ||
3. Events are only recorded when an action succeeds. | ||
type: object | ||
required: | ||
- action | ||
- path | ||
properties: | ||
action: | ||
enum: | ||
- get | ||
- create | ||
- save | ||
- upload | ||
- rename | ||
- copy | ||
- delete | ||
description: | | ||
Action performed by the ContentsManager API. | ||
This is a required field. | ||
Possible values: | ||
1. get | ||
Get contents of a particular file, or list contents of a directory. | ||
2. save | ||
Save a file at path with contents from the client | ||
3. rename | ||
Rename a file or directory from value in source_path to | ||
value in path. | ||
4. copy | ||
Copy a file or directory from value in source_path to | ||
value in path. | ||
5. delete | ||
Delete a file or empty directory at given path | ||
path: | ||
type: string | ||
description: | | ||
Logical path on which the operation was performed. | ||
This is a required field. | ||
source_path: | ||
type: string | ||
description: | | ||
Source path of an operation when action is 'copy' or 'rename' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters