Skip to content

Allow agents to authorize projects in the same user namespace

What does this MR do and why?

Allows authorising projects to use an agent within a personal user namespace.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

  1. Create two projects in a personal/user namespace, agent-project and authorised-project
  2. Register an agent in agent-project, using the following configuration:
    ci_access:
      projects:
        - id: path/to/authorised-project
  3. Run a CI pipeline in authorised-project, using the following .gitlab-ci.yml:
    stages:
      - test
    
    example-job:
      stage: test
      script:
        - cat "$KUBECONFIG"
  4. Observe an entry matching the agent registered above.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #356831 (closed)

Edited by Tiger Watson

Merge request reports