Skip to content

Hide Confidential Environment Variables from Notebooks in JupyterHub.

License

Notifications You must be signed in to change notification settings

dtaniwaki/jupyter-env-whitelist

Repository files navigation

jupyter-env-whitelist

Latest PyPI version TravisCI build status Test coverage of code

Filter environment variables by a whitelist to hide internal values from a notebook. It's useful when you provide notebooks on JupyterHub w/ KubeSpawner because it puts many internal values in environment variables such as the Kubernetes API endpoint. This extension can be used in Enterprise Gateway as well.

Installation

$ pip install jupyter-env-whitelist

Usage

Notebook Server Extension

You can enabled the server extension by the following command.

$ jupyter serverextension enable --py jupyter-env-whitelist

Alternatively, you can enable it by adding the following setting in your jupyter_notebook_config.py.

c.NotebookApp.nbserver_extensions = {
    'jupyter_env_whitelist': True,
}

IPython Extension

You can enable it by adding the following setting in your ipython_kernel_config.py.

c.InteractiveShellApp.extensions = [
    'jupyter_env_whitelist',
]

About

Hide Confidential Environment Variables from Notebooks in JupyterHub.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages