API: Add endpoint to reset runner token with old token
What does this MR do and why?
By providing the old token, as long as it is not expired, the user proves that they have the rights to the runner, and can reset the runner token. This allows them to reset the token without a PAT.
Issue: #30942 (closed)
Issue: #345427
This depends on !71607 (closed).
How to set up and validate locally
-
Create a runner
-
Run the following to reset the runner's authentication token:
$ curl --form 'token=<old token>' http://gitlab.example.com/api/v4/runners/reset_authentication_token
-
See the new token in the JSON response
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Kyle Edwards