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 43,824
    • Issues 43,824
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,410
    • Merge requests 1,410
  • 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.org
  • GitLabGitLab
  • Issues
  • #331601
Closed
Open
Created May 21, 2021 by Alessandro Chitolina@alekitto

Restrict access to composer package dist file of private projects

When publishing a package on a private project using composer API only the providers json files requires authentication, while the dist-files (zip) are available unrestricted for download without authentication, only requiring the commit hash as query parameter.

For example, when I publish a package from a branch of a private project I can access to the published package zip file at

https://gitlab.com/api/v4/projects/$PROJECT_ID/packages/composer/archives/$GROUP_NAME/$PROJECT_NAME.zip?sha=$LAST_COMMIT_SHA

No authentication (token or user/pass) is required. All the required parameters are not really sensitive as it is common to find it published/exposed on the public internet to help debugging and/or error tracking tools.

Proposal

Add authorization checks requiring the read-api scope and the allowance to read the specified project packages before serving the dist-file containing the private package source code.

Assignee
Assign to
Time tracking