docker / hub-feedback

Feedback and bug reports for the Docker Hub
https://hub.docker.com
233 stars 48 forks source link

"insufficient scope" for advanced image management API #2224

Closed tbekolay closed 2 years ago

tbekolay commented 2 years ago

Problem description

I'm trying to make some v2 API calls using a Docker pro account. It has admin privileges for the namespace I'm trying to interact with. Using Python's requests, I can hit most endpoints without issue:

>>> requests.get(
    "https://hub.docker.com/v2/access-tokens",
    headers={"Authorization": f"Bearer {token}"},
).json()

{'count': 1,
 'next': None,
 'previous': None,
 'active_count': 1,
 'results': [{'uuid': 'xxx',
   'client_id': 'HUB',
...
   'scopes': ['repo:admin']}]}

But the advanced image API endpoints give me an 'insufficient scope' error:

>>> requests.get(
    "https://hub.docker.com/v2/namespaces/<redacted>/repositories/<redacted>/images-summary",
    headers={"Authorization": f"Bearer {token}"},
).json()

{'errinfo': {}, 'message': 'insufficient scope'}

There's no information in the response so I don't really know where to start debugging this. These endpoints used to work as of a few weeks ago.

Task List

milosgajdos commented 2 years ago

Hi, thanks for reporting. We believe we have now addressed these issues now. Apologies for the inconvenience 😅 Feel free to reopen if you believe the issues still persist.

tbekolay commented 2 years ago

I can confirm that this is working for me now, thanks!