Amend AR ADR-020: in-process token issuance

Why is this change being made?

ADR-020 says GitLab Rails issues Artifact Registry tokens through the token-exchange endpoint. Two surfaces issue the same token in process instead, because Rails itself acts for the user and there is no client to call the endpoint:

  • Artifact Registry UI (ADR-014): the Ruby client mints the signed-in user's token through the token issuer, in process rather than over POST /api/v4/token_exchange. This shipped in gitlab-org/gitlab!252487 (merged).
  • CI job image pulls: the monolith/S16 spec (gitlab-org/ops/artifact-registry!3440 (merged)) adds a registry credential to the CI job payload, so the runner can pull Artifact Registry images in image: and services: before the job script runs. No script can exchange a credential that early.

The review of the S16 spec flagged that the ADR text doesn't cover this (gitlab-org/ops/artifact-registry!3440 (comment 4065885153)). This MR records in-process issuance as part of the decision:

  • Context and Decision: tokens are issued through the endpoint or in process where Rails itself acts for the user.
  • Token issuance (R1): a new In-process issuance item. It names the two surfaces and says the token is the endpoint's token (same issuer, keys, claims and audiences), so the Artifact Registry side doesn't change. Each surface applies the issuance rules that fit it: organization enablement and membership, and for a CI job, a lifetime capped by the job's timeout and the 12-hour maximum. The per-user rate limit doesn't apply. When issuance moves into the IAM STS, these surfaces move with it.

Token validation, the token payload and the Artifact Registry's behavior are unchanged.

Related to gitlab-org/gitlab#630573

🤖 Generated with Claude Code

Merge request reports

Loading
Loading