FF cleanup: Only allow documented token types for GraphQL authentication
What does this MR do and why?
Only allow documented token types for GraphQL authentication. Cleans up graphql_minimal_auth_methods feature flag introduced in !150407 (merged)
Rollout issue: https://gitlab.com/gitlab-org/gitlab/-/issues/444929
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
| Before | After |
|---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Set up a project locally with git lfs
- Get an LFS token via the
sshinterface:ssh -p 2222 git@<LOCAL_HOSTNAME> git-lfs-authenticate <NAMESPACE>/<PROJECT_NAME>.git download - Copy the token from the
"header":{"Authorization":"Basic <COPY_THIS_TOKEN>section - Make a GraphQL request to
http(s)://<HOSTNAME>:<PORT>/api/graphql.gitusing the token in theAuthorization: Basic <COPIED_TOKEN>header:
curl -X "POST" "http://localhost:3000/api/graphql.git" -H 'Content-Type: application/json; charset=utf-8' -u 'USERNAME:COPIED_TOKEN' -d $'{"query": "query{currentUser{id username}}","variables": {}}' - The request should no longer be authenticated;
currentUsershould returnnulland restricted resources should not be accessible.
Edited by Andrew Evans