Hi Tomek,

It looks like your restClient does not use preemptive authentication,
meaning, your restClient sends the request as unauthenticated and only after
receiving 401 challenge, the restClient request will be sent again with the
credentials.
When Artifactory anonymous access is not allowed and your request sent as
anonymous (not an preemptive authentication request), Artifactory will
respond with 401 challenge. Your restClient expect to get 401, and it will
re-send the request with the user credentials.
As you said, this is the case that worked for you.

The other scenario is if you disabled anonymous access in Artifactory and
your request sent as anonymous request, Artifactory will respond with 403 -
not allowed. Your restClient excpect to get 401, and for that reason it will
not work.


You can use preemptive authentication in your restClient and your request
will be sent authenticated with the credentials.

See example:
http://stackoverflow.com/questions/6588256/using-groovy-http-builder-in-preemptive-mode


About the get method, my assumption is that you removed the read permission
of the anonymous user.

Hope this helps,
Shay.



--
View this message in context: 
http://forums.jfrog.org/REST-API-delete-item-issue-anonymous-user-tp7578368p7578655.html
Sent from the Artifactory - Users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users

Reply via email to