Skip to content

Commit 25bf8a0

Browse files
committed
extraFiles: avoid duplicated load of potentially seeded secrets
1 parent 4517d02 commit 25bf8a0

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

jupyterhub/files/hub/jupyterhub_config.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,14 +372,19 @@ def camelCaseify(s):
372372
c.Spawner.debug = True
373373

374374

375-
# load seeded secrets
375+
# load potentially seeded secrets
376376
c.JupyterHub.proxy_auth_token = get_secret_value("JupyterHub.proxy_auth_token")
377377
c.JupyterHub.cookie_secret = a2b_hex(get_secret_value("JupyterHub.cookie_secret"))
378378
c.CryptKeeper.keys = get_secret_value("CryptKeeper.keys").split(";")
379379

380-
# load hub.config values
380+
# load hub.config values, except potentially seeded secrets
381381
for section, sub_cfg in get_config("hub.config", {}).items():
382-
c[section].update(sub_cfg)
382+
if section == "JupyterHub" and sub_cfg in ["proxy_auth_token", "cookie_secret"]:
383+
pass
384+
elif section == "CryptKeeper" and sub_cfg in ["keys"]:
385+
pass
386+
else:
387+
c[section].update(sub_cfg)
383388

384389
# execute hub.extraConfig string
385390
extra_config = get_config("hub.extraConfig", {})

0 commit comments

Comments
 (0)