zot icon indicating copy to clipboard operation
zot copied to clipboard

graphql: Apply authorization on /_search endpoint

Open eusebiu-constantin-petu-dbk opened this issue 2 years ago • 1 comments

Describe the bug Apply authorization for _search endpoint (graphql)

Currently authorization is applied only for dist-spec routes and not for graphql.

On a request context we store the repositories on which a user has read access, and later used them when the user GETs the catalog for example, to filter out the repos on which he doesn't have access.

Do the same for _search endpoint.

See: https://gqlgen.com/recipes/authentication/

andaaron avatar Aug 02 '22 15:08 andaaron