Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# This file provides configuration specific to the 'terminal-server'
# deployment mode. In this mode authentication for JupyterHub is done
# against the OpenShift cluster using OAuth.
from tornado import web
# Enable the OpenShift authenticator. Environments variables have
# already been set from the terminal-server.sh script file.
c.JupyterHub.authenticator_class = "openshift"
from oauthenticator.openshift import OpenShiftOAuthenticator
OpenShiftOAuthenticator.scope = ['user:full']
client_id = '%s-console' % application_name
client_secret = os.environ['OAUTH_CLIENT_SECRET']
c.OpenShiftOAuthenticator.client_id = client_id
c.OpenShiftOAuthenticator.client_secret = client_secret
c.Authenticator.enable_auth_state = True
c.CryptKeeper.keys = [ client_secret.encode('utf-8') ]
c.OpenShiftOAuthenticator.oauth_callback_url = (
'%s://%s/hub/oauth_callback' % (public_protocol, public_hostname))
c.Authenticator.auto_login = True
# Enable admin access to designated users of the OpenShift cluster.
# This file provides configuration specific to the 'terminal-server'
# deployment mode. In this mode authentication for JupyterHub is done
# against the OpenShift cluster using OAuth.
from tornado import web
# Enable the OpenShift authenticator. Environments variables have
# already been set from the terminal-server.sh script file.
c.JupyterHub.authenticator_class = "openshift"
from oauthenticator.openshift import OpenShiftOAuthenticator
OpenShiftOAuthenticator.scope = ['user:full']
client_id = '%s-console' % workshop_name
client_secret = os.environ['OAUTH_CLIENT_SECRET']
c.OpenShiftOAuthenticator.client_id = client_id
c.OpenShiftOAuthenticator.client_secret = client_secret
c.Authenticator.enable_auth_state = True
c.CryptKeeper.keys = [ client_secret.encode('utf-8') ]
c.OpenShiftOAuthenticator.oauth_callback_url = (
'https://%s/hub/oauth_callback' % public_hostname)
c.Authenticator.auto_login = True
# Enable admin access to designated users of the OpenShift cluster.
# This file provides configuration specific to the 'hosted-workshop'
# deployment mode. In this mode authentication for JupyterHub is done
# against the OpenShift cluster using OAuth.
from tornado import web
# Enable the OpenShift authenticator. Environments variables have
# already been set from the hosted-workshop.sh script file.
c.JupyterHub.authenticator_class = "openshift"
from oauthenticator.openshift import OpenShiftOAuthenticator
OpenShiftOAuthenticator.scope = ['user:full']
client_id = '%s-console' % workshop_name
client_secret = os.environ['OAUTH_CLIENT_SECRET']
c.OpenShiftOAuthenticator.client_id = client_id
c.OpenShiftOAuthenticator.client_secret = client_secret
c.Authenticator.enable_auth_state = True
c.CryptKeeper.keys = [ client_secret.encode('utf-8') ]
c.OpenShiftOAuthenticator.oauth_callback_url = (
'https://%s/hub/oauth_callback' % public_hostname)
c.Authenticator.auto_login = True
# Enable admin access to designated users of the OpenShift cluster.
# Authenticate users against OpenShift OAuth provider.
c.JupyterHub.authenticator_class = "openshift"
from oauthenticator.openshift import OpenShiftOAuthenticator
OpenShiftOAuthenticator.scope = ['user:full']
client_id = '%s-%s-users' % (application_name, namespace)
client_secret = os.environ['OAUTH_CLIENT_SECRET']
c.OpenShiftOAuthenticator.client_id = client_id
c.OpenShiftOAuthenticator.client_secret = client_secret
c.Authenticator.enable_auth_state = True
c.CryptKeeper.keys = [ client_secret.encode('utf-8') ]
c.OpenShiftOAuthenticator.oauth_callback_url = (
'https://%s/hub/oauth_callback' % public_hostname)
# Add any additional JupyterHub configuration settings.
c.KubeSpawner.extra_labels = {
# This file provides configuration specific to the 'hosted-workshop'
# deployment mode. In this mode authentication for JupyterHub is done
# against the OpenShift cluster using OAuth.
from tornado import web
# Enable the OpenShift authenticator. Environments variables have
# already been set from the hosted-workshop.sh script file.
c.JupyterHub.authenticator_class = "openshift"
from oauthenticator.openshift import OpenShiftOAuthenticator
OpenShiftOAuthenticator.scope = ['user:full']
client_id = '%s-%s-console' % (application_name, namespace)
client_secret = os.environ['OAUTH_CLIENT_SECRET']
c.OpenShiftOAuthenticator.client_id = client_id
c.OpenShiftOAuthenticator.client_secret = client_secret
c.Authenticator.enable_auth_state = True
c.CryptKeeper.keys = [ client_secret.encode('utf-8') ]
c.OpenShiftOAuthenticator.oauth_callback_url = (
'https://%s/hub/oauth_callback' % public_hostname)
c.Authenticator.auto_login = True
# Enable admin access to designated users of the OpenShift cluster.