Administrators cannot register project runners when option "Members of the project can register runners" is unchecked
Summary
Administrators cannot register project runners when the option Members of the project can register runners
is unchecked, though the section Specific runners
is visible to them in projects.
Steps to reproduce
- create a project on your GitLab instance
- go to Menu > Admin > Settings > CI/CD > Runner registration and uncheck
Members of the project can register runners
- as administrator, go to project's Settings > CI/CD > Runners > Specific Runners
- use the URL and token from there to register a Runner
What is the current bug behavior?
The Runner registration will fail with ERROR: Registering runner... forbidden (check registration token)
What is the expected correct behavior?
-
The Runner registration should be completed successfully. If we actually do not want administrators to be able to register project-specific runners,
Specific Runners
section should not available for them in projects whenMembers of the project can register runners
is unchecked. -
We might also need to clarify the docs Prevent users from registering runners. The note there says:
When the registration sections are hidden in the UI, members of the project or group that need to register runners must contact the administrators. If you plan to prevent registration, ensure users have access to the runners they need to run jobs
. However, it is not clear how contacting administrators will help as administrators also cannot register project runners.
Relevant logs and/or screenshots
n/a
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Debian 10 Proxy: no Current User: git Using RVM: no Ruby Version: 2.7.5p203 Gem Version: 3.1.6 Bundler Version:2.3.15 Rake Version: 13.0.6 Redis Version: 6.2.7 Sidekiq Version:6.4.2 Go Version: unknown GitLab information Version: 15.5.1-ee Revision: 7344dd2631a Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 12.10 URL: https://gitlabhost.tld HTTP Clone URL: https://gitlabhost.tld/some-group/some-project.git SSH Clone URL: git@gitlabhost.tld:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: GitLab Shell Version: 14.12.0 Repository storage paths: - default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell
Bug Resolution Tasks
-
Bug triage (determine severity and priority) Target completion date: 2022-11-01 -
Assign to target milestone for resolution. Target completion date: 2022-11-04 -
Start development of fix. Target completion date: TBD