When I try to call the hub/api/info end point using my user’s API token, the logs show:
[D 2022-08-15 15:29:32.822 JupyterHub scopes:301] Authenticated with token <APIToken('0RWN...', user='adpatter', client_id='jupyterhub-user-adpatter')>
[D 2022-08-15 15:29:32.823 JupyterHub scopes:491] Checking access via scope read:hub
[D 2022-08-15 15:29:32.823 JupyterHub scopes:386] No access to /hub/api/info via read:hub
[W 2022-08-15 15:29:32.824 JupyterHub scopes:499] Not authorizing access to /hub/api/info. Requires any of [read:hub], not derived from scopes [access:servers!server=adpatter/]
[W 2022-08-15 15:29:32.824 JupyterHub web:1796] 403 GET /hub/api/info (10.0.19.181): Action is not authorized with current scopes; requires any of [read:hub]
[W 2022-08-15 15:29:32.825 JupyterHub log:189] 403 GET /hub/api/info (adpatter@10.0.19.181) 13.53ms
However, I have my roles configured like this:
c.JupyterHub.load_roles = [
{
'name': SERVICE_NAME,
'groups': [SERVICE_NAME],
'services': [SERVICE_NAME],
'scopes': ['read:hub', f'access:services!service={SERVICE_NAME}']
},
{
'name': 'user_role',
'users': ['adpatter'],
'scopes': ['read:hub']
}
]
It is my understanding that the read:hub
scope should permit reading from the API endpoint.
Does anyone have any ideas for why this isn’t working?
Thank you.