It can be easier to ask people to log in Magic Castle with an OAuth authenticator and automatically create the account in FreeIPA instead of using Mokey.
I was able to put together a proof of concept that works with GitHub authenticator.
Define the function add_system_user of the jupyterhub authenticator:
class LocalGitHubOAuthenticator(LocalAuthenticator, GitHubOAuthenticator):
"""A version that mixes in local system user creation"""
def add_system_user(self, user):
subprocess.run(["kinit", "-kt", "/etc/jupyterhub/jupyterhub.keytab", "-p", "jupyterhub"])
subprocess.run(["ipa_create_user.py", user.name, "--posix_group", "def-sponsor00"])
subprocess.run(["kdestroy"])
time.sleep(5)
Create a GitHub app and export the following variables before launching JupyterHub:
It can be easier to ask people to log in Magic Castle with an OAuth authenticator and automatically create the account in FreeIPA instead of using Mokey.
I was able to put together a proof of concept that works with GitHub authenticator.
Here are the steps so far:
add_system_user
of the jupyterhub authenticator:If internally jupyterhub is not running SSL, the OAUTH callback URL prefix must be
http
./etc/jupyterhub/jupyterhub_config.json
: