Questions about permissions/privileges and actions in nexus

2,062 views
Skip to first unread message

Dan Steffen

unread,
Jun 10, 2016, 9:59:16 AM6/10/16
to Nexus Users
Hello,

we would like to provide nexus for our project teams. But before we can start I have some question and maybe someone here can help me because I didn't find and solution in the net. Maybe I am just blind and that why I would like to excuse my question if there a too trivial. But here I am with the following question

1. Is there a complete list of the actions I can assign to a user? I already found out that there a actions for create, update, delete, read, view, browse. But which action I need to assign for a healthcheck for example?

2. How can I configure a maven repository so a user can browse it with a browser? If I open the URL of the Repository I get the message:
"This maven2 hosted repository is not directly browseable at this URL."

3. Which privilege I need so that a user can see the artefacts in a repository? At the moment the configuration allows only to see the repositories but not the components

If would be very thanksful if someone can take a little of time to answer me.
best regards
Dan

Manfred Moser

unread,
Jun 10, 2016, 2:49:15 PM6/10/16
to nexus...@glists.sonatype.com, dan.ste...@googlemail.com

Dan,

This will be a bit different depending on the version of Nexus Repository Manager you are asking about. 2.x or 3.x? 

In general though:

There is no list of privileges apart from the list you can see in the UI. That encompasses all of them. Privileges generally have a CRUD and view setup. 

Browsing a Maven repo in the browser:

In 2.x you can just do inside the UI as well as outside. In 3.x only inside the UI and it works a bit differently in terms of tree/folder hierarchy. There is no "folder" browsing in 3.x anywhere.

Finally.. the default config in 2.x as well as 3.x allows anynomuous users to see the artifacts (they are called assets in 3.x). All of this availble in the browse menu section. 

Please refer to our docs for futher pointers or send specific questions here. 

http://books.sonatype.com/nexus-book/

Manfred

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/f5c7836a-a64b-4249-8c15-a6c50a318d64%40glists.sonatype.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.

Lucas

unread,
Dec 19, 2016, 5:21:23 PM12/19/16
to Nexus Users, dan.ste...@googlemail.com
Hey Manfred,

I assume there was a good implementation reason for

There is no "folder" browsing in 3.x anywhere

But I had code that relied on this.  Specifically, I would navigate the folders with simple http GET requests to determine if a given repository (or group) contained an artifact, and if so, which versions.  Now, I am unable to do so.  Is there another path to get this information?  How does maven itself (mvn) obtain artifacts?  I tried using curl to download one of the urls printed out during an mvn package execution, but it failed with a 404.  I am really confused because i thought maven (mvn) just issued http GET requests.  Any clues to help sort me out?

Thanks
Lucas

Brian Fox

unread,
Dec 19, 2016, 5:51:20 PM12/19/16
to Lucas, Nexus Users, Dan Steffen
On Mon, Dec 19, 2016 at 5:21 PM, Lucas <lucast...@pastdev.com> wrote:
Hey Manfred,

I assume there was a good implementation reason for

There is no "folder" browsing in 3.x anywhere

But I had code that relied on this. 


The index views were meant for humans only but ended up getting used as you noted by rest types of calls. Ultimately there will be better mechanisms for this... and the UI is a better mechanism for humans.
 
Specifically, I would navigate the folders with simple http GET requests to determine if a given repository (or group) contained an artifact, and if so, which versions.  Now, I am unable to do so.  Is there another path to get this information?  How does maven itself (mvn) obtain artifacts? 

Maven constructs the exact path based on coordinates and/or reading maven-metadata.xml at known coordinates, it doesn't rely on index.html to do so.
 
I tried using curl to download one of the urls printed out during an mvn package execution, but it failed with a 404.  I am really confused because i thought maven (mvn) just issued http GET requests.  Any clues to help sort me out?

We'd need to know more about what you're trying to do.
 
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.

To post to this group, send email to nexus...@glists.sonatype.com.

Brian Fox

unread,
Dec 19, 2016, 5:56:29 PM12/19/16
to Lucas, Nexus Users, Dan Steffen
On Mon, Dec 19, 2016 at 5:21 PM, Lucas <lucast...@pastdev.com> wrote:
Hey Manfred,

I assume there was a good implementation reason for

There is no "folder" browsing in 3.x anywhere

But I had code that relied on this. 


The index views were meant for humans only but ended up getting used as you noted by rest types of calls. Ultimately there will be better mechanisms for this... and the UI is a better mechanism for humans.
 
Specifically, I would navigate the folders with simple http GET requests to determine if a given repository (or group) contained an artifact, and if so, which versions.  Now, I am unable to do so.  Is there another path to get this information?  How does maven itself (mvn) obtain artifacts? 

Maven constructs the exact path based on coordinates and/or reading maven-metadata.xml at known coordinates, it doesn't rely on index.html to do so.
 
I tried using curl to download one of the urls printed out during an mvn package execution, but it failed with a 404.  I am really confused because i thought maven (mvn) just issued http GET requests.  Any clues to help sort me out?

We'd need to know more about what you're trying to do.
 
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.

To post to this group, send email to nexus...@glists.sonatype.com.

Lucas

unread,
Dec 20, 2016, 12:38:49 PM12/20/16
to Nexus Users, lucast...@pastdev.com, dan.ste...@googlemail.com
I have a large suite of automation that abstract the retrieval of "resources".  The basic interface is 2 different methods:

resolve: turns the resource into a url from which it can be obtained
download: downloads the resource

For maven repository resources, it parses the settings (global and user) to get the configured repositories, then it parses the maven coordinate to convert it into a path that gets appended to the repository url.  Then, it issues a HEAD request to determine if the resource exists.  It also has an optional feature:

list_versions: obtains a list of versions available

This would use a GET request on the artifact dir, then parse the markup to get the available versions.

I could probably live without the list_versions, but the lack of support for HEAD requests makes the resolve painful...  Guess I could use a GET request and just interrupt the download, but that seems expensive when dealing with larger artifacts (war's containing a large number of jars...)

Anyway, my ifra people just reverted back to 2.14, so I cant do any further verification/testing at this point...  So I guess this is really just to tell you what I am trying to do...

Thanks for the quick responses, great product!
Reply all
Reply to author
Forward
0 new messages