Skip to content
GitLab Next
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,058
    • Issues 44,058
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,311
    • Merge requests 1,311
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #337781
Closed
Open
Issue created Aug 05, 2021 by Caleb Williamson@calebwDeveloper

Add predefined Dependency Proxy variables for current group

Summary

Previously, a user could be a member of a subgroup and use the dependency proxy at the top level group. With the implementation of Deploy Token support with the Dependency Proxy (#280586 (closed)), users must now be a direct member of the top level group with at least reporter access in order to pull images through the proxy.

This has specifically introduced some problems with regard to CI/CD usage of the Dependency Proxy in subgroups. If the CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX, CI_DEPENDENCY_PROXY_USER & CI_DEPENDENCY_PROXY_PASSWORD variables are being used in a pipeline, jobs that were previously passing may now begin to fail if the executing user is not a direct member in the top level group.

However, if the subgroup is referenced in the Dependency Proxy URL, the member only needs to be a member of the relevant subgroup directly in order to use the Dependency Proxy. For example, if the top level group is foo, and the subgroup foo/bar, the Dependency proxy can be referenced as gitlab.com:443/foo/bar/dependency_proxy/containers/ in order for the subgroup member to utilize the proxy.

Proposal

Add an additional CI_DEPENDENCY_PROXY prefix variables that reference the direct group a project is in. This way, users don't have to manually specify a the subgroup in the URL or override existing image prefix URLS in order to use the proxy without direct membership in the top level group.

Adds a new predefined environment variable for use with the dependency proxy.

$CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX is similar to the existing $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX, but the new variable uses the path of the direct namespace or subgroup that the project belongs to, whereas the existing variable uses the root namespace.

Documentation

https://docs.gitlab.com/ee/user/packages/dependency_proxy/#authenticate-within-cicd

Edited Sep 10, 2021 by Tim Rizzi
Assignee
Assign to
Time tracking