ARTIFACTORY: How To Resolve The Endless Loading When Editing Permission Targets

Products
JFrog_Connect
Content Type
Administration_Platform
AuthorFullName__c
Benjamin Katz
articleNumber
000006458
FirstPublishedDate
2025-05-29T06:50:19Z
lastModifiedDate
2025-05-27

ARTIFACTORY: How To Resolve The Endless Loading When Editing Permission Targets

Introduction 

In Artifactory Versions newer than 7.66.x, users may encounter an issue with endless loading when editing certain Permission Targets in the UI.

This is caused by a change made in 7.66.x version that deals with leading and trailing spaces in permission target names. 

User-added image 

This behavior will only occur if the permission target was created in Artifactory version previous to 7.66.x with a space at the start or end of the name and the instance has since been upgraded to Artifactory version 7.66. x or newer.

Resolution 

The solution is to create a new permission target that mimics the old one without any leading or trailing spaces and delete the old one. 

An example of the steps that need to be performed to resolve the behavior:

Step 1:
Find the permission target that is causing this issue. In this example, 
“ permission target with leading space"

User-added image
 
User-added image 

Step 2:
Find all the permissions using the Get Permission Targets REST API as follows
curl -u "<admin>:<password>" -X GET https://<Artifactory_URL>/artifactory/api/v2/security/permissions
Returns the following:
[ {
  "name" : "Anything",
  "uri" : "https://<Artifactory_URL>/artifactory/api/v2/security/permissions/Anything"
}, {
  "name" : "Any Remote",
  "uri" : "https://<Artifactory_URL>/artifactory/api/v2/security/permissions/Any%20Remote"
}, {
  "name" : "devs_permission",
  "uri" : "https://<Artifactory_URL>/artifactory/api/v2/security/permissions/devs_permission"
}, {
  "name" : " permission target with leading space",
  "uri" : "https://<Artifactory_URL>/artifactory/api/v2/security/permissions/%20permission%20target%20with%20leading%20space"
} ]
Step 3:
Since in this example we have identified " permission target with leading space" as the problematic target, we will copy the URL and use the Get Permission Target Details REST API to get the details of the permission target.
curl -u "<admin>:<password>" -X GET "https://<Artifactory_URL>/artifactory/api/v2/security/permissions/%20permission%20target%20with%20leading%20space"
Returns the following:
{
  "name" : " permission target with leading space",
  "repo" : {
    "actions" : {
      "groups" : {
        "developers" : [ "read", "annotate", "write", "delete" ]
      }
    },
    "repositories" : [ "example-repo-local" ],
    "include-patterns" : [ "**" ],
    "exclude-patterns" : [ ]
  }
Step 4:
Copy this result and change the ‘name’ field to not have a leading or trailing space, and save to a JSON file. In this case, to “New_target”.
echo '{"name" : "New_target", "repo" : {"actions" : {"groups" : {"developers" : [ "read", "annotate", "write", "delete" ]}}, "repositories" : [ "example-repo-local" ], "include-patterns" : [ "**" ], "exclude-patterns" : [ ]}}' > perm.json
Use the Create Permission Target REST API to create a new permission target with the previously created JSON file.
curl -u "<admin>:<password>" -X POST https://<Artifactory_URL>/artifactory/api/v2/security/permissions/New_target -T perm.json -H "Content-Type: application/json"
Step 5:
Confirm that this new permission target was created in the UI and delete the previous permission target

User-added image 

To see all the available REST APIs that are related to Permission Targets, please refer to our documentation.