Skip to content

Commit 5192b98

Browse files
committed
Merge branches 'env_dict_to_commands' and 'spawner_detail' into dev
3 parents c91dc0b + b9f71ab + d4e21f4 commit 5192b98

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ Unless otherwise stated for a specific spawner, assume that spawners
9090
*do* evaluate shell environment for users and thus the [security
9191
requriemnts of JupyterHub security for untrusted
9292
users](https://jupyterhub.readthedocs.io/en/stable/reference/websecurity.html)
93-
are not fulfilled. This is something which we are working on.
93+
are not fulfilled because some (most?) spawners *do* start a user
94+
shell which will execute arbitrary user environment configuration
95+
(``.profile``, ``.bashrc`` and the like) unless users do not have
96+
access to their own cluster user account. This is something which we
97+
are working on.
9498

9599

96100
## Provide different configurations of BatchSpawner

SPAWNERS.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,13 @@ Maintainers:
4242

4343
# Checklist for making spawners
4444

45+
Please document each of these things under the spawner list above, -
46+
even if it is "OK", we need to track status of all spawners. If it is
47+
a bug, users really need to know.
48+
4549
- Does your spawner read shell environment before starting? (See
46-
[Jupyterhub Security](https://jupyterhub.readthedocs.io/en/stable/reference/websecurity.html).
50+
[Jupyterhub
51+
Security](https://jupyterhub.readthedocs.io/en/stable/reference/websecurity.html).
4752

4853
- Does your spawner send SIGTERM to the jupyterhub-singleuser process
4954
before SIGKILL? It should, so that the process can terminate

batchspawner/batchspawner.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -517,11 +517,12 @@ def user_env(self, env):
517517
return env
518518

519519
def get_env(self):
520-
"""Add user environment variables.
520+
"""Get user environment variables to be passed to the user's job
521521
522-
Everything here should be passed to the user's job. If it is
523-
used to authenticate to the batch system commands as an admin,
524-
beware that the user will get them too.
522+
Everything here should be passed to the user's job as
523+
environment. Caution: If these variables are used for
524+
authentication to the batch system commands as an admin, be
525+
aware that the user will receive access to these as well.
525526
"""
526527
env = super().get_env()
527528
env = self.user_env(env)

0 commit comments

Comments
 (0)