Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the minimal set of privileges required to deploy artifacts to Nexus 3?

I'm using Nexus Repository Manager 3.1.0-04, and I want to create a user to just have deployment permissions. What are the minimal set of privileges required for that?

Right now I created a role nx-deploy with the following privileges:

  • nx-repository-admin---read
  • nx-repository-admin---browse
  • nx-repository-admin---delete
  • nx-repository-admin---edit
  • nx-repository-admin---add

Then I created a user deployment with the role nx-deploy. I can deploy artifacts now, however, I believe I am giving too much privileges? The admin part is not what I want the deployment user to be, so that part has me a bit nervous.

Needless to say, there are just too many privileges to choose from under the security section.

like image 375
Jane Wayne Avatar asked Dec 05 '16 03:12

Jane Wayne


People also ask

How we can upload artifacts into Nexus repository manager?

Go to "http://localhost:8081/nexus" Login as user: "admin" password: "admin123" Click on "Browse Repositories," and you'll see a list of repositories. You will want to right click on the "3rd Party" repository and choose "Upload Artifact."

Can Nexus 2 be migrated to Nexus 3 True or false?

Can Nexus 2 and 3 be run at the same time? Yes, but will need different ports.

What is Nexus Artifact repository?

Nexus Repository OSS is an open source repository that supports many artifact formats, including Docker, Java™, and npm. With the Nexus tool integration, pipelines in your toolchain can publish and retrieve versioned apps and their dependencies by using central repositories that are accessible from other environments.


1 Answers

The general rule is nx-repository-admin privileges are for administering the repositories and their details; nx-repository-view privileges are for use of the repositories once set up. Assign the latter.

To tweak repository privileges of your Deployment user(s) you should use the nx-repository-view-*-*-* as the assigned privilege, instead of nx-repository-admin. So, remove all the privileges you addressed in your question, and replace the ‘Given’ field with nx-repository-view-*-*-*. Since the privilege is denoted with asterisks, your Deployment users can perform all the above actions (i.e. browse, read, edit, add, and delete).

See the screenshot for reference:

Configuring the nx-deploy Privilege for the Deployment Role

You can read more about Privileges in the Security chapter: https://help.sonatype.com/repomanager3/security/privileges

like image 88
Dulani Wallace Avatar answered Sep 28 '22 04:09

Dulani Wallace