Skip to content

Log token info for GraphQL requests

What does this MR do and why?

Fixes #439103 (closed)

Changelog: added

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.

Image of the token being rendered in the logs:

image

How to set up and validate locally

  1. Checkout the current branch
  2. Log in and create an access token on your running instance
  3. Use it in the following curl request: curl -v -k --request POST --header "Authorization: Bearer {PAT}" --header "Content-Type: application/json" --data '{"query":"query { currentUser { username name } }"}' http://127.0.0.1:3000/api/graphql
  4. Observe the token being logged in ( cat log/graphql_json.log | grep token_id (on gdk) )
Edited by Félix Veillette-Potvin

Merge request reports

Loading