jupyterhub / kubespawner

Kubernetes spawner for JupyterHub
https://jupyterhub-kubespawner.readthedocs.io
BSD 3-Clause "New" or "Revised" License
531 stars 299 forks source link

kubespawner prints out the pods environment variables for a specific error #639

Open michael-robbins opened 1 year ago

michael-robbins commented 1 year ago

Bug description

Logging in kubespawner prints out all environment variables on error. This includes sensitive values like the singleuser's API token and any other secrets being passed into the users pod.

https://github.com/jupyterhub/kubespawner/blob/main/kubespawner/spawner.py#L2745

Expected behaviour

Environment variables are not printed out/included in the logs.

Actual behaviour

Environment variables are printed out including anything sensitive.

How to reproduce

Have kubespawner fail to create a pod and enter a timeout exception, this will cause the logging line to fire.

Your personal set up

N/A

welcome[bot] commented 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. welcome 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: