cockroachdb / cockroachdb/cockroach
jobs: define internal job owners and access
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
A user with `CONTROLJOB` cannot modify job created by admins, and there is no discoverable reason for this (see https://cockroachlabs.slack.com/archives/C02DSDS9TM1/p1675194084663479 and https://github.com/cockroachdb/cockroach/pull/51646). We may want to remove this restriction.
One reason we may want to keep this is to prevent users from disrupting internal jobs (ex. migrations). In this case, we can still change the restriction to prevent modifying jobs owned by "root" or "node". However, there are some uncertainties:
- Some internal jobs are owned by "root" and some are owned by "node". Maybe we should make all internal jobs consistently use one of these. You can login as root, but I don't think you can login as "node", so maybe "node" is a better choice
- Some internal jobs, such as schema change and schema change gc don't use "root" or "node" as the job owner. They use the user who executed the query. If a non-admin user kicks off a schema change, a `CONTROLJOB` user can still kill the job. This is undesirable if we want to prevent them from disrupting internal jobs.
Jira issue: CRDB-24122
Contributor guide
Assessment
This issue has not been assessed yet.