Skip to content

Use short-term user access token

Jan Provaznik requested to merge jp-cs-token into master

What does this MR do and why?

Use short-term user access token

When user requests direct_access to AI GW, a valid short-term token is used.

Related to #455607 (closed)

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

  1. In rails console enable direct connections
    Feature.enable(:code_suggestions_direct_completions)
  2. Set up local AI Gateway with signing key (gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!796 (merged))
  3. Request direct access curl --header "PRIVATE-TOKEN: $TOKEN" --request POST http://192.168.1.8:3000/api/v4/code_suggestions/direct_access|jq .
Edited by Jan Provaznik

Merge request reports