From 54b69219125658ccdf08e19c3b895f526b35c78a Mon Sep 17 00:00:00 2001 From: garciagenrique Date: Tue, 12 Nov 2024 15:48:48 +0100 Subject: [PATCH] debug token exchange 5 --- infrastructure/cluster/flux/jhub/jhub-release.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/infrastructure/cluster/flux/jhub/jhub-release.yaml b/infrastructure/cluster/flux/jhub/jhub-release.yaml index c17e199..24253a9 100644 --- a/infrastructure/cluster/flux/jhub/jhub-release.yaml +++ b/infrastructure/cluster/flux/jhub/jhub-release.yaml @@ -93,8 +93,10 @@ spec: 'audience': 'rucio' } response = requests.post(self.token_url, data=params) + print("EXCHANGE TOKEN") print(response.json()) rucio_token = response.json()['access_token'] + return rucio_token async def pre_spawn_start(self, user, spawner): @@ -108,6 +110,8 @@ spec: # define token environment variable from auth_state spawner.environment['RUCIO_ACCESS_TOKEN'] = auth_state['access_token'] #self.exchange_token(auth_state['access_token']) spawner.environment['EOS_ACCESS_TOKEN'] = auth_state['access_token'] + + spawner.environment.update({'RUCIO_ACCESS_TOKEN': self.exchange_token(auth_state['access_token'])}) # set the above authenticator as the default c.JupyterHub.authenticator_class = RucioAuthenticator