Skip to content

Commit

Permalink
Get JupyterHub groups from Keycloak, support oauthenticator 16.3+ (
Browse files Browse the repository at this point in the history
…#2361)

Co-authored-by: Amit Kumar <[email protected]>
  • Loading branch information
krassowski and aktech authored Apr 4, 2024
1 parent 8094913 commit 6a83ada
Showing 1 changed file with 19 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,18 +150,25 @@ resource "helm_release" "jupyterhub" {
enable_auth_state = true
}
GenericOAuthenticator = {
client_id = module.jupyterhub-openid-client.config.client_id
client_secret = module.jupyterhub-openid-client.config.client_secret
oauth_callback_url = "https://${var.external-url}/hub/oauth_callback"
authorize_url = module.jupyterhub-openid-client.config.authentication_url
token_url = module.jupyterhub-openid-client.config.token_url
userdata_url = module.jupyterhub-openid-client.config.userinfo_url
login_service = "Keycloak"
username_key = "preferred_username"
claim_groups_key = "roles"
allowed_groups = ["jupyterhub_admin", "jupyterhub_developer"]
admin_groups = ["jupyterhub_admin"]
tls_verify = false
client_id = module.jupyterhub-openid-client.config.client_id
client_secret = module.jupyterhub-openid-client.config.client_secret
oauth_callback_url = "https://${var.external-url}/hub/oauth_callback"
authorize_url = module.jupyterhub-openid-client.config.authentication_url
token_url = module.jupyterhub-openid-client.config.token_url
userdata_url = module.jupyterhub-openid-client.config.userinfo_url
login_service = "Keycloak"
username_claim = "preferred_username"
claim_groups_key = "groups"
allowed_groups = ["/analyst", "/developer", "/admin"]
admin_groups = ["/admin"]
manage_groups = true
refresh_pre_spawn = true
validate_server_cert = false

# deprecated, to be removed (replaced by validate_server_cert)
tls_verify = false
# deprecated, to be removed (replaced by username_claim)
username_key = "preferred_username"
}
}
}
Expand Down

0 comments on commit 6a83ada

Please sign in to comment.