ARTIFACTORY: How to check permission for anonymous user

AuthorFullName__c
DaYoun Kang
articleNumber
000006098
FirstPublishedDate
2024-05-21T11:27:20Z
lastModifiedDate
2025-05-21

ARTIFACTORY: How to check permission for anonymous user

Oftentimes, permissions are given to the “anonymous” user.

In order to check which permissions are granted to the anonymous user, we can use the Get Permission Targets Per User REST API like below:

curl -uYOURUSERNAME:PASSWORD'http://[ARTIFACTORY_URL]/artifactory/api/v2/security/permissions/users/anonymous' 


It will output related permission targets like below:

[ {
  "name" : "dayk-test-permission1",
  "repo" : {
    "actions" : [ "read", "annotate", "managedXrayMeta", "write", "delete", "manage" ],
    "repositories" : [ "dayk-docker1", "dayk-docker2" ],
    "include-patterns" : [ "**" ],
    "exclude-patterns" : [ ]
  }
}, {
  "name" : "read-permission",
  "repo" : {
    "actions" : [ "read" ],
    "repositories" : [ "dayk-generic1" ],
    "include-patterns" : [ "**" ],
    "exclude-patterns" : [ ]
  }
}, {
  "name" : "test-permission",
  "repo" : {
    "actions" : ["read", "annotate", "write", "delete" ],
    "repositories" : [ "dayk-generic2" ],
    "include-patterns" : [ "**pattern-test**/**" ],
    "exclude-patterns" : [ ]
  }
} ]


Similarly, if we would like to check any specific user’s permission, we can change the username from “anonymous” to a specific Username using the same REST API like below:

curl -uYOURUSERNAME:PASSWORD 'http://[ARTIFACTORY_URL]/artifactory/api/v2/security/permissions/users/USERNAME'