From 6607a70cc18d963b8fb8b7c4b29f9b84a2eb0146 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Wed, 10 Jan 2024 16:49:29 +0100 Subject: [PATCH] Revert new config --- jupyter/base/values/values.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/jupyter/base/values/values.yaml b/jupyter/base/values/values.yaml index 0a0199d..7b48010 100644 --- a/jupyter/base/values/values.yaml +++ b/jupyter/base/values/values.yaml @@ -11,16 +11,16 @@ hub: storageClassName: csi-sc-cinderplugin extraConfig: oauthCode: | - c.JupyterHub.authenticator_class = "generic-oauth" + from oauthenticator.generic import GenericOAuthenticator + c.JupyterHub.authenticator_class = GenericOAuthenticator c.GenericOAuthenticator.client_id = os.environ['NEXTCLOUD_CLIENT_ID'] c.GenericOAuthenticator.client_secret = os.environ['NEXTCLOUD_CLIENT_ID'] c.GenericOAuthenticator.login_service = 'Sunet Drive' - c.GenericOAuthenticator.username_claim = lambda r: r.get('ocs', {}).get('data', {}).get('id') - + c.GenericOAuthenticator.username_key = lambda r: r.get('ocs', {}).get('data', {}).get('id') + c.GenericOAuthenticator.userdata_url = 'https://' + os.environ['NEXTCLOUD_HOST'] + '/ocs/v2.php/cloud/user?format=json' c.GenericOAuthenticator.authorize_url = 'https://' + os.environ['NEXTCLOUD_HOST'] + '/index.php/apps/oauth2/authorize' c.GenericOAuthenticator.token_url = 'https://' + os.environ['NEXTCLOUD_HOST'] + '/index.php/apps/oauth2/api/v1/token' - c.GenericOAuthenticator.userdata_url = 'https://' + os.environ['NEXTCLOUD_HOST'] + '/ocs/v2.php/cloud/user?format=json' - # c.GenericOAuthenticator.oauth_callback_url = 'https://' + os.environ['JUPYTER_HOST'] + '/hub/oauth_callback' + c.GenericOAuthenticator.oauth_callback_url = 'https://' + os.environ['JUPYTER_HOST'] + '/hub/oauth_callback' extraEnv: NEXTCLOUD_HOST: sunet.drive.test.sunet.se @@ -35,8 +35,6 @@ hub: secretKeyRef: name: nextcloud-oauth-secrets key: client-secret - networkPolicy: - enabled: false singleuser: image: