File tree 1 file changed +28
-1
lines changed
config/clusters/jupyter-health
1 file changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -9,5 +9,32 @@ jupyterhub:
9
9
secretName : https-auto-tls
10
10
hub :
11
11
config :
12
- GitHubOAuthenticator :
12
+ JupyterHub :
13
+ # Uses CHCS auth provider
14
+ # Note: 2i2c engineers can not log in via this, so they can not provide support that
15
+ # requires logging into this hub. But since Jupyter Health team members have access to this
16
+ # repo, this is acceptable
17
+ authenticator_class : generic-oauth
18
+ GenericOAuthenticator :
19
+ client_id : Ima7rx8D6eko0PzlU1jK28WBUT2ZweZj7mqVG2wm
13
20
oauth_callback_url : https://staging.jupyter-health.2i2c.cloud/hub/oauth_callback
21
+ authorize_url : https://chcs.fly.dev/o/authorize/
22
+ token_url : https://chcs.fly.dev/o/token/
23
+ userdata_url : https://chcs.fly.dev/api/v1/users/profile
24
+ username_claim : email
25
+ login_service : CHCS
26
+ scope :
27
+ - openid
28
+ enable_auth_state : true
29
+ extraConfig :
30
+ # add access tokens via auth state
31
+ auth_state_env.py : |
32
+ def auth_state_env(spawner, auth_state):
33
+ if not auth_state:
34
+ spawner.log.warning(f"Missing auth state for user {spawner.user.name}")
35
+ return
36
+ spawner.environment["CHCS_TOKEN"] = auth_state["access_token"]
37
+ spawner.environment["CHCS_REFRESH_TOKEN"] = auth_state["refresh_token"]
38
+ spawner.environment["CHCS_CLIENT_ID"] = "Ima7rx8D6eko0PzlU1jK28WBUT2ZweZj7mqVG2wm"
39
+
40
+ c.Spawner.auth_state_hook = auth_state_env
You can’t perform that action at this time.
0 commit comments