Nexus Sonatype, Anonymous Access And .Net Core Usage

Nexus Sonatype Privileges

I am writing this because i did not find any good example about Nexus privileges and it’s usage.Maybe this may help someone. While writing about Nexus, i will give file upload example with .Net Core also.

First thing first, privileges ! Nexus has predefined and custom privilege types and when you create new repo it creates new privileges for it.

Default Repository Privileges
Custom User Role With Read Privileges

In the above image we are creating user role to only give read access to specific user. The “nx-repository-view-raw-SampleRepository-read” privilege provide limited access to nexus.

Role table after role created

This table shows the roles. With enough permission user can edit or other operations from here.

Nexus User Table

For anonymous access we still need user. Here is default user list. With “default anonymous” user; anybody can access whole nexus repos without any permission.

Creating User With Custom Role

With this user and it’s role nexus provide limited access to specific repositories. So when anonymous users access to nexus url they will see still nothing because we only give access to specific repo with specific permission.

Nexus User Table After New User Created

Here is the user list after added new users.

Anonymous Access With New User Permissions

After above steps we will enter our ID to “Username” input then “Check” Allow anonymous users to access the server.

Repository File

We upload test file under sample repository.

Trying to reach without anonymous access

If we do not check “Allow anonymous users to access the server” , nexus will ask authentication.

This example shows how to upload file to nexus repository with .NetCore

Do not forget to follow me :)

Best regard.

Code and Electronic person. Fan of digital transformation and IoT