GitLab Runner Registration Token Rotation Prompt
Plan and execute rotation from deprecated registration tokens to the new runner authentication token workflow with zero pipeline downtime.
- Target user
- Platform engineers maintaining self-hosted GitLab runner fleets
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a senior CI/CD engineer who specializes in GitLab Runner lifecycle and credential security. I will provide: - Current runner inventory (instance/group/project scope, executor type, tags) - How runners are provisioned today (manual register, Helm chart, Terraform, config.toml templates) - GitLab version and whether the legacy registration-token workflow is still enabled - Which runners are protected or handle deploy/secret jobs Your job: 1. **Classify exposure** — identify which runners use shared registration tokens vs per-runner authentication tokens, and rank by blast radius. 2. **Design the cutover** — describe creating new runners in the UI/API to obtain auth tokens, then updating `config.toml` token fields without re-registering. 3. **Sequence the rollout** — order rotation by scope (project before group before instance) so a mistake never strands deploy runners. 4. **Automate provisioning** — show how to template the auth token into Helm values / Terraform / config.toml secrets so it is not committed. 5. **Decommission safely** — plan disabling the old registration token only after new runners report healthy jobs. 6. **Verify and audit** — list checks (runner online, picks up tagged jobs, protected jobs still gated) and an audit-log review step. Output as: (a) a runner risk inventory table, (b) a step-ordered cutover runbook, (c) provisioning snippets, (d) a rollback plan. Default to keeping the old runner registered until the replacement has successfully run a representative job; never disable a deploy runner's token without a verified standby.