Open ashu-soni-dsw opened 1 year ago
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
Note this was cross posted on Discourse https://discourse.jupyter.org/t/restricting-os-level-access-from-jupyter-lab/21251
I am running a Jupyter environment (Jupyter Lab) inside a Docker container on a remote server. Inside the container I want to restrict the OS level access from the jupyter lab such that the user must not be able to open or read any file from a specific directory of a folder.
Progress till now:
Approach: I have created a custom authorization class that inherits the jupyter_server.auth.Authorizer class and overrides it’s is_authorized method. The goal is that, the custom class must have a logic to restrict the access to a certain folder (for example: “D:\New folder (2)”), such that, every time a user tries to access that particular folder a HTTPError(403) error is raised, and the request must be blocked. The location of custom class is in the same directory as the jupyter_server_config.py config file i.e. “C:\Users\ashus.jupyter”.
Inside config file: c.ServerApp.authorizer_class = ‘C:\Users\ashus.jupyter\CustomAuthorization.MyCustomAuthorizer’
Error: When I run the Jupyter Lab using anaconda3 command prompt I am facing the following error:
Please comment and help me in solving this issue.