When attempting to retrieve artifacts from an Artifactory instance with Xray configured, and the "Block Download"/"Block unused artifacts" option is enabled in a Policy, the expected behavior is to block downloads as shown below:
However, when attempting to resolve the same artifacts using a Smart Remote Repository that points to the same repository in the Artifactory instance mentioned above, a "404" error message is displayed instead of the original 403 message that should be displayed:
curl -u username http://ARTIFACTORY_URL/artifactory/<repository name>/<path to file> { "errors" : [ { "status" : 403, "message" : "The request to download the artifact was rejected: <path to file> was not downloaded due to the download blocking policy configured at <ARTIFACTORY_URL>." } ] }
However, when attempting to resolve the same artifacts using a Smart Remote Repository that points to the same repository in the Artifactory instance mentioned above, a "404" error message is displayed instead of the original 403 message that should be displayed:
curl -u username http://ARTIFACTORY_URL/artifactory/<smart remote repository name>/<path to file> { "errors" : [ { "status" : 404, "message" : "Forbidden" } ] }