@@ -66,9 +66,42 @@ jupyterhub:
66
66
capi.stackhpc.com/node-group : core
67
67
config :
68
68
JupyterHub :
69
- authenticator_class : " github"
69
+ authenticator_class : github
70
70
GitHubOAuthenticator :
71
71
oauth_callback_url : " https://staging.js.2i2c.cloud/hub/oauth_callback"
72
+ populate_teams_in_auth_state : true
73
+ allowed_organizations :
74
+ - 2i2c-org:hub-access-for-2i2c-staff
75
+ scope :
76
+ - read:org
77
+ Authenticator :
78
+ enable_auth_state : true
79
+ manage_groups : true
80
+ services :
81
+ jupyterhub-groups-exporter : {}
82
+ loadRoles :
83
+ jupyterhub-groups-exporter :
84
+ services :
85
+ - jupyterhub-groups-exporter
86
+ scopes :
87
+ - users
88
+ - groups
89
+ extraConfig :
90
+ custom-auth-state-groups-key : |
91
+ async def custom_auth_state_groups_key(auth_state):
92
+ groups_list = []
93
+ if auth_state is None:
94
+ print("Auth state is None")
95
+ return groups_list
96
+ else:
97
+ for team in auth_state["teams"]:
98
+ if f'{team["organization"]["login"]}:{team["slug"]}' not in c.GitHubOAuthenticator.allowed_organizations:
99
+ continue
100
+ else:
101
+ groups_list.append(f'{team["organization"]["login"]}:{team["slug"]}')
102
+ return groups_list
103
+ if c.GitHubOAuthenticator:
104
+ c.GitHubOAuthenticator.auth_state_groups_key = custom_auth_state_groups_key
72
105
singleuser :
73
106
defaultUrl : /lab
74
107
nodeSelector :
@@ -147,3 +180,9 @@ jupyterhub-home-nfs:
147
180
volumeId : 694b2c04-6b08-4ebe-8cb9-74f7d42c1b1c
148
181
quotaEnforcer :
149
182
hardQuota : 1 # in GB
183
+ path : " /export/staging"
184
+ jupyterhub-groups-exporter :
185
+ enabled : true
186
+ config :
187
+ groupsExporter :
188
+ update_exporter_interval : 3600
0 commit comments