Use short-term user access token
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
- In rails console enable direct connections
Feature.enable(:code_suggestions_direct_completions)
- Set up local AI Gateway with signing key (gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!796 (merged))
- 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