Open adwk67 opened 2 years ago
These points are outlined below.
See this issue for more information. If we are to offer any formal support for JupyterHub, it is essential that we can recommend images that work across this version matrix. It would not involve any new code.
A WIP can be found in this branch.
Keycloak can be set up with a jupyterhub
client/realm, much like is done in the e2e-security demo.
See also https://oauthenticator.readthedocs.io/en/latest/tutorials/provider-specific-setup/providers/generic.html.
The JuypterHub config should reference GenericOAuthenticator
:
hub:
config:
GenericOAuthenticator:
client_id: jupyterhub
client_secret: jupyterhubjupyterhub
# TODO: How to define this here before Jupyterhub has been deployed?
oauth_callback_url: http://172.19.0.3:32336/hub/oauth_callback
# TODO: template the host:port for Keycloak
authorize_url: https://172.19.0.3:31245/realms/jupyterhub/protocol/openid-connect/auth
token_url: https:///172.19.0.3:31245/realms/jupyterhub/protocol/openid-connect/token
userdata_url: https://172.19.0.3:31245/realms/jupyterhub/protocol/openid-connect/userinfo
username_claim: preferred_username
auth_state_groups_key: "oauth_user.groups"
manage_groups: True
tls_verify: False
allowed_groups:
- "Notebook Developers"
scope:
- openid
JupyterHub:
authenticator_class: generic-oauth
The docs seem to tackle both by lumping both custom Authentication and Authorization in a custom Authenticator class.
Provide a custom Authenticator and issue a callout to the OPA server in the authenticate method.
Provide a custom spawner class and issue a callout to the OPA server in the start method.
A basic Helm install will create several objects.
As a machine learning engineer, I want to test/asses the viability of using JupyterHub notebooks from within a kubernetes environment. This involves the following:
The result of this story will be: