Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gateway] Fix and deprecate env whitelist handling #979

Merged

Conversation

kevin-bates
Copy link
Member

Today I learned that Lab includes the user's env in the env stanza of the kernel start request body. I also learned that we were only filtering the server's env (i.e., the env of the jupyter server process) when applying the env_whitelist configurable to determine which envs to send to the gateway, then unconditionally adding whatever was already in the start request's env stanza. Instead, we need to be filtering both the server's envs and the provided envs against the configured list. This pull request makes this change.

Also, while we're at it, we should deprecate env_whitelist in favor of allowed_envs - similar to what was done with Kernelspec filtering in jupyter_client. This pull request makes that change as well.

Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you!

@blink1073 blink1073 merged commit 7d2154a into jupyter-server:main Sep 13, 2022
@kevin-bates
Copy link
Member Author

Today I learned that Lab includes the user's env in the env stanza of the kernel start request body.

Actually, TODAY I learned that #859 added the server's env to the payload. (Just noting here for correctness.) 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants