ARTIFACTORY: How to differentiate between Read and Deploy/Cache permission when downloading files

AuthorFullName__c
Marwa Sharif
articleNumber
000006033
FirstPublishedDate
2024-02-19T12:20:33Z
lastModifiedDate
2025-07-28

ARTIFACTORY: How to differentiate between Read and Deploy/Cache permission when downloading files

In Artifactory, user permissions play a crucial role in controlling access to repositories and files. This article explores the impact of different permission settings on file downloads, focusing on a scenario involving the user "developer" and their ability to download files from virtual repositories.

Scenario:

Initial Permissions Setup:
  • The user "developer" was initially granted Read permissions only.
  • Attempting to download a file from the virtual repository failed due to insufficient permissions.
User-added image
 
User-added image

Granting Deploy/Cache Permission:
  • When the user "developer" was granted Deploy/Cache permission, file downloads were successful without any issues.
User-added image


To provide a comprehensive understanding of the behavior, let's delve deeper into the scenario:

When attempting to download files existing in local or remote cache repositories, users with "Read" permissions can successfully retrieve and download files. However, it's crucial to highlight that this success is contingent upon the file's availability in the local or remote cache repository.

In cases where users attempt to download new files not present in the local or remote cache repositories, the absence of "Deploy/Cache" permissions impedes the download process. As Artifactory needs to fetch these files remotely, users lacking the requisite permissions encounter errors during download attempts.

Example Scenario:
Let's explore a scenario where a file is downloaded under different user permissions:

Admin User Download:
  • Initially, the file is downloaded by an Admin user with both Read and Deploy/Cache permissions.
  • The file download is successful, demonstrating the capabilities granted by elevated permissions.
User-added image

Developer User Download:
Subsequently, the same file is downloaded by a Developer user with only Read permissions.
Despite lacking Deploy/Cache permissions, the Developer user can still download the file, showcasing the accessibility afforded by Read permissions.

User-added image

UI Representation:
In Artifactory's UI, both downloads are reflected, indicating successful retrieval of the file under different user permissions.

User-added image

However, challenges arise when attempting to download new files not present in local or remote cache repositories, such as NPM packages:

To download new files, Artifactory may need to retrieve them remotely, necessitating Deploy/Cache permissions, for example:

User-added image

Analysis of the artifactory-service.log entries highlight instances where a Developer user lacks the necessary Deploy/Cache permission, resulting in download failures for new files.
2024-01-17T10:38:45.148Z [jfrt ] [ERROR] [33d89b9f38091146] [.r.PypiRemoteIndexProvider:223] [tp-nio-8081-exec-121] - Could not retrieve remote index from https://pypi.org/simple/npm/: User developer is not permitted to deploy '.pypi/npm.html' into 'pypi-nexus-remote-cache:.pypi/npm.html'.
2024-01-17T10:38:45.159Z [jfrt ] [ERROR] [33d89b9f38091146] [.r.PypiRemoteIndexProvider:223] [tp-nio-8081-exec-121] - Could not retrieve remote index from https://pypi.org/simple/npm/: User developer is not permitted to deploy '.pypi/npm.html' into 'marwa-pypi-remote-cache:.pypi/npm.html'.

In conclusion, understanding the interplay between permissions and file downloads is essential for optimizing user experiences in Artifactory. It is imperative to ensure users are granted the appropriate permissions, including Deploy/Cache where necessary. By aligning permissions with user roles and responsibilities, organizations can foster efficient file management and streamline operations within Artifactory.