Update to new api key

This commit is contained in:
Micke Nordin 2024-01-17 16:13:19 +01:00
parent 4915ea4f30
commit 1e2bedb4d7
Signed by untrusted user: Micke
GPG key ID: F53C4CC83EDAB3BE

View file

@ -147,7 +147,7 @@ hub:
'url': 'http://' + os.environ.get('HUB_SERVICE_HOST', 'hub') + ':' + os.environ.get('HUB_SERVICE_PORT_REFRESH_TOKEN', '8082'),
'display': False,
'oauth_no_confirm': True,
'api_token': os.environ['JUPYTERHUB_CRYPT_KEY'],
'api_token': os.environ['JUPYTERHUB_API_KEY'],
'command': [sys.executable, '/usr/local/etc/jupyterhub/refresh-token.py']
}
]
@ -172,12 +172,9 @@ hub:
class RefreshHandler(HubAuthenticated, RequestHandler):
def initialize(self):
self.api_token = os.environ.get('JUPYTERHUB_API_TOKEN', 'THIS IS A DUMMY THING')
app_log.info(f"DEBUG: In refresh initialize {self.api_token}")
@authenticated
def get(self):
# app_log.info(f"DEBUG: In refresh get {os.environ}")
app_log.info(f"DEBUG: In refresh get {os.environ}")
# user_model = self.get_current_user()
user_model = {'helloooooo': 'hej'}
self.set_header('content-type', 'application/json')
@ -186,7 +183,6 @@ hub:
class PingHandler(RequestHandler):
def get(self):
app_log.info(f"DEBUG: In ping get {os.environ}")
self.set_header('content-type', 'application/json')
self.write(json.dumps({'ping': 1}))
@ -223,6 +219,11 @@ hub:
NEXTCLOUD_DEBUG_OAUTH: "yes"
NEXTCLOUD_HOST: sunet.drive.test.sunet.se
JUPYTER_HOST: jupyter.drive.test.sunet.se
JUPYTERHUB_API_KEY:
valueFrom:
secretKeyRef:
name: jupyterhub-secrets
key: api-key
JUPYTERHUB_CRYPT_KEY:
valueFrom:
secretKeyRef: