Skip to content

Add RunnersRegistrationToken::Reset mutation

What does this MR do?

This MR adds the RunnersRegistrationTokenReset mutation and matching :reset_runners_registration_token ability to the following scopes: global, group, and project.

Testing

Query:

mutation runnersRegistrationTokenReset($input: RunnersRegistrationTokenResetInput!) {
  runnersRegistrationTokenReset(input: $input) {
    token
    errors
  }
}
Resetting instance runner registration token

Variables:

{
  "input": {}
}

Result:

{
  "data": {
    "runnersRegistrationTokenReset": {
      "token": "ruY_v6iivzzHgqJsTfEM",
      "errors": []
    }
  }
}
Resetting group runner registration token

Variables:

{
  "input": {
    "fullPath": "gid://gitlab/Group/22"
  }
}

Result:

{
  "data": {
    "runnersRegistrationTokenReset": {
      "token": "GXpux-e76-Lp7xs_WDyZ",
      "errors": []
    }
  }
}
Resetting project runner registration token

Variables:

{
  "input": {
    "fullPath": "gid://gitlab/Project/1"
  }
}

Result:

{
  "data": {
    "runnersRegistrationTokenReset": {
      "token": "q1Fnv5PJKA5VQm_tYpxt",
      "errors": []
    }
  }
}

Screenshots (strongly suggested)

image

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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

Closes #330526 (closed)

Edited by Pedro Pombeiro

Merge request reports

Loading