Runner controller management API (Part 2) Runner controller Token APIs

Proposal

Implement runner controller token APIs:

  • List all: GET /runner_controllers/:id/tokens
  • Get detail: GET /runner_controllers/:id/tokens/:token_id
  • Register new token: POST /runner_controllers/:id/tokens

Revoke endpoint will be added as a follow-up: #582812, and rotate in #578798.

Notes:

  • Runner controllers and tokens do not need names.
  • Runner controllers and tokens need a free-form optional text description field. Make sure to set a size limit.
  • Tokens must be routable so that they are compatible with Cells. See how agentk/agentw tokens are constructed.
  • Tokens must use a new prefix so that we can tell what kind of token that is. Document the new prefix here https://docs.gitlab.com/security/tokens/#token-prefixes.
Edited by Taka Nishida