Skip to content

API: Add endpoint to reset runner registration token

What does this MR do?

This MR adds a new API endpoint to reset the runners registration token, similar to the GraphQL RunnersRegistrationTokenReset mutation.

Issue: #30942 (closed)

How to setup and validate locally (strongly suggested)

  1. Run curl on the REST API:

    $ curl --header 'PRIVATE-TOKEN: xxxxx' http://localhost:3000/api/v4/runners/reset_registration_token
    $ curl --header 'PRIVATE-TOKEN: xxxxx' http://localhost:3000/api/v4/groups/12345/runners/reset_registration_token
    $ curl --header 'PRIVATE-TOKEN: xxxxx' http://localhost:3000/api/v4/projects/54321/runners/reset_registration_token
    

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

This MR includes tests that exercise the new endpoint in various ways.

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Kyle Edwards

Merge request reports