How can I allow Anonymous user access to specific repositories only?

Batel Tova
2020-06-23 11:41

When “Allow Anonymous Access” is turned off it disables all access to Artifactory unless valid user-credentials are provided. 

 

By default the anonymous user permissions look like the following:

 

 

If we would like to allow Anonymous access for specific resources/repositories, we can use Artifactory's security model to define unique permissions for Anonymous access on each repository.

 

For Artifactory version 7.x to allow fine-tuned and limited anonymous access in Artifactory follow these steps:

 

  • Enable the “Allow Anonymous Access” via the UI under Administration tab → Security settings like the following screenshot:

  • Navigate to UI Identify and Access →  Permissions

  • Edit the “Anything” and “Any Remote” permission targets, removing all permissions for the Anonymous user

  • Create new Permission Targets that will aggregate only the repositories you want to be accessed by the Anonymous user and set desired permissions for the Anonymous user on each new target like the following example:

 

For Artifactory version 6.x follow these steps:

 

  • Enable the “Allow Anonymous Access” via the UI under Admin →  Security →  Security Configuration like the following screenshot:

 

  • Navigate to UI Identify and Admin →  Security →  Permissions

  • Edit the “Anything” and “Any Remote” permission targets, removing all permissions for the Anonymous user

  • Create new Permission Targets that will aggregate only the repositories you want to be accessed by the Anonymous user and set desired permissions for the Anonymous user on each new target like the following example: