Skip to content

Commit

Permalink
Merge pull request #3642 from yuvipanda/auth0-none-check
Browse files Browse the repository at this point in the history
Handle deployment-service-check user for auth0
  • Loading branch information
yuvipanda authored Jan 25, 2024
2 parents 5c8194c + e986799 commit 9a1433d
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions config/clusters/earthscope/common.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,15 @@ basehub:
return False
def populate_token(spawner, auth_state):
token_env = {
'AUTH0_ACCESS_TOKEN': auth_state.get("access_token", ""),
'AUTH0_ID_TOKEN': auth_state.get("id_token", ""),
'AUTH0_REFRESH_TOKEN': auth_state.get('refresh_token', '')
}
spawner.environment.update(token_env)
# For our deployment-service-check health check user, there is no auth_state.
# So these env variables need not be set.
if auth_state:
token_env = {
'AUTH0_ACCESS_TOKEN': auth_state.get("access_token", ""),
'AUTH0_ID_TOKEN': auth_state.get("id_token", ""),
'AUTH0_REFRESH_TOKEN': auth_state.get('refresh_token', '')
}
spawner.environment.update(token_env)
c.Spawner.auth_state_hook = populate_token
Expand Down

0 comments on commit 9a1433d

Please sign in to comment.