Cannot register GitLab Runner as an admin user when runner registration is disabled on an admin page.
Summary
One of our customers that is currently on GitLab 15.3.1 noticed that upon enabling the feature flag runner_registration_control
and unchecking both Members of the project can register runners
and Members of the group can register runners
, an admin won't be able to register a runner anymore.
As per our documentation, unchecking this should hide the UI for the token to the non-admin users. Admin users should still be able to register a runner using the token.
I was able to reproduce this behavior on GitLab 15.5.1 where the feature is enabled by default.
Steps to reproduce
-
Install the latest version of GitLab.
-
As an admin, get the registration token for a group.
-
Try to register a new runner using the token. It will result in this error:
ERROR: Registering runner... forbidden (check registration token) runner=<snipped> PANIC: Failed to register the runner.
What is the current bug behavior?
Unchecking both Members of the project can register runners
and Members of the group can register runners
will remove the ability of an admin to register new runners.
What is the expected correct behavior?
GitLab administration should be able to register a new runner even if these options are unchecked.
NOTE: Given that the runner registration token is deprecated, it was decided to adapt the documentation to reflect the current behavior, where even administrators cannot register new runners.