I am new to nexus. I have a requirement to create a privilege/role to be added to a specific use who can only download artifacts from our nexus repository. I have 2 jars below which are both present in our maven-custom-repository. For example: I have 2 jars.
My requirement is that UserA should be able to download (jar1) and not should be able to download jar 2.
I created a content selector with
CSEL: "format == "maven2" and path =~ "^/my/company/com/integration/newcompany.*"
and when I preview the results it shows that Jar 1 is only being returned. I created a privilege and role for this Content Selector and assigned to UserA. However, in local machine maven using UserA username and password, UserA can still download both files.
User A has only the privilege / role created of the Content Selector no more added roles
What am I missing? Please help. :(
I was able to resolve the issue. There is no problem with the Content Selector path created. The issue was the anonymous user was still enabled which makes the user to download the artifact: e.g my.company.com.hello.world (above). To make sure the content selector is working as expected with correct privilege, you have to disable the anonymous user in Nexus.
For those who encountered the same problem as mine, hope this helps.