Adding a new Real in Nexus 3.2

306 views
Skip to first unread message

Andrea Castello

unread,
Jun 29, 2017, 4:11:52 AM6/29/17
to Nexus Users
Hi all,

   in my old Nexus OSS 2.11 I could add a new Realm in my repository security settings by editing the file sonatype-work/nexus/conf/security-configuration.xml and adding a tag

   <realm>MyRealm</realm>

This seems not possible anymore in Nexus 3, where the entire conf directory seems to be gone. And the file security-configuration.xml seems gone too.

So, how can I do it in the new nexus server version?

Thanks,

Andrea

Andrea Castello

unread,
Jun 29, 2017, 4:12:22 AM6/29/17
to Nexus Users
I meant Realm, sorry

Wandenberg Peixoto

unread,
Jun 29, 2017, 4:42:25 AM6/29/17
to Andrea Castello, Nexus Users
Hi Andrea,

you probably will need to use the REST API running a groovy code for doing this.
If your server is managed using puppet you can try to use this module to do the Nexus3 configuration.

Kind Regards,
Wandenberg

--
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+unsubscribe@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/3de0007b-7055-4294-99ee-6ce5f71d6a4e%40glists.sonatype.com.

Andrea Castello

unread,
Jun 29, 2017, 8:23:23 AM6/29/17
to Nexus Users, and...@scientiamobile.com
Hi Wanderberg,

  thanks for your answer. Unless puppet is a default option for configuring nexus, I'm not using it.
  I would like, if it's possible, to use the most standard ways available to configure the Realm (and 2.x version compatible) 

Andrea


On Thursday, June 29, 2017 at 10:42:25 AM UTC+2, Wandenberg Peixoto wrote:
Hi Andrea,

you probably will need to use the REST API running a groovy code for doing this.
If your server is managed using puppet you can try to use this module to do the Nexus3 configuration.

Kind Regards,
Wandenberg
On Thu, Jun 29, 2017 at 10:12 AM, Andrea Castello <and...@scientiamobile.com> wrote:
I meant Realm, sorry

On Thursday, June 29, 2017 at 10:11:52 AM UTC+2, Andrea Castello wrote:
Hi all,

   in my old Nexus OSS 2.11 I could add a new Realm in my repository security settings by editing the file sonatype-work/nexus/conf/security-configuration.xml and adding a tag

   <realm>MyRealm</realm>

This seems not possible anymore in Nexus 3, where the entire conf directory seems to be gone. And the file security-configuration.xml seems gone too.

So, how can I do it in the new nexus server version?

Thanks,

Andrea

--
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.

Wandenberg Peixoto

unread,
Jun 29, 2017, 8:27:18 AM6/29/17
to Andrea Castello, Nexus Users
I don't think that is possible to do it in the same way as you described, just editing a file.
Nexus 3 stores the configurations in a kind of database. not in xml or plain text.
So you either have to use the web interface or the groovy code I mentioned, and call the REST API (this is what the puppet module does in its internals)

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.

Nicholas Blair

unread,
Jun 29, 2017, 9:18:33 AM6/29/17
to Andrea Castello, Nexus Users
Hello Andrea,
What type of realm are you looking to enable? 

Some examples in the nexus documentation, LDAP:

Remote User Token:

Atlassian Crowd:

Available realms:

If you have a different use case not covered here by the administration user interface, let us know the specifics and we'll try to help!



--
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.

Andrea Castello

unread,
Jun 29, 2017, 9:33:40 AM6/29/17
to Nexus Users, and...@scientiamobile.com
Hi Nicholas,


   I'll try to explain my use case.
   In my Nexus 2.x server I have a plugin which basically makes a REST (HTTP) request to a server in order to have the authorization to download an artifact from Nexus.
   In other words, this is what happens

  1. User authenticates to Nexus
  2. When user requests an artifact the plugin makes a REST request to another server to check whether user can download from nexus.

In order to do this, we defined a custom realm in Nexus 2.11 which was done by editing the file mentioned in my first post.

Now, I'm struggling a little to make the plugin work in Nexus 3 platform, since many things have changed, but while I was going to test a solution, I found out that there were no more config files where I could create a realm :D

So, any other help on this will be very appreciated.

Andrea
Reply all
Reply to author
Forward
0 new messages