Use ResetAuthenticationTokenService in Runner API
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
What does this MR do and why?
This MR is a follow-up that uses the new ResetAuthenticationTokenService
in place of the current usage of reset_token!.
References
MR acceptance checklist
MR Checklist ( @nwittstruck)
-
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the javascript style guides -
Conforms to the database guides
How to set up and validate locally
-
Create a new instance runner to get a
runner authentication tokento query.Admin > CI / CD > Runners > New instance runner. -
Reset by token:
curl --request POST --form "token=<current token>" \
"https://gitlab.example.com/api/v4/runners/reset_authentication_token"
- Reset by id:
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
"https://gitlab.example.com/api/v4/runners/1/reset_authentication_token"
Related to #514936 (closed)
Edited by Nicholas Wittstruck