PatrickRoumanoff / nexus-crowd-plugin

Sonatype Nexus plugin for Atlassian Crowd integration
http://patrickroumanoff.github.io/nexus-crowd-plugin/
40 stars 20 forks source link

Crowd plugin 2.0.7 doesn't work for Nexus 2.6.4 #12

Closed cdossantos closed 10 years ago

cdossantos commented 10 years ago

I upgraded Nexus from version 1.7.2 to version 2.6.4 and followed the instructions here http://patrickroumanoff.github.io/nexus-crowd-plugin/ to integrate it with Crowd 2.4.2. In the documentation, the crowdServerUrl parameter (crowd-plugin.xml) should be http://[crowdhost]:crowdport]/crowd/, I tried it and none of the users from Realm Crowd would be listed in the Nexus. I changed it to "http://[crowdhost]:crowdport]/crowd/services/" and I could search for Crowd users in Nexus. But Crowd users are still not able to login, they get this error message: "Incorrect username,password or no permission to use the Nexus User Interface"

In the Nexus log file there isn't errors regarding user failed login just INFO entries like this one: 2014-04-11 13:15:03 INFO [qtp1080054364-70] org.sonatype.nexus.plugins.crowd.client.rest.RestClient - session created for 'buildServer'

In this site https://github.com/flopma/nexus-crowd-plugin they mentioned that the CROWD plugin is now using REST API. Is it necessary to change other configurations in Nexus in order to be compatible with it?

Regards,

Santos

flopma commented 10 years ago

This is likely a config issue at Crowd side. Make sure that your users are in groups which has access to Nexus. Nexus will let you login if you are in Nexus Anonymous Role. So basicaly, set your user A to be in a Crowd group B which is linked in Nexus with the role Nexus Anonymous.

See http://books.sonatype.com/nexus-book/reference/ldap-sect-external-role-mapping-config.html as helper

p.s. The Crowd Server URL in the doc is correct - no need to add 'services/' into it (ref: https://developer.atlassian.com/display/CROWDDEV/Crowd+REST+APIs)

cdossantos commented 10 years ago

No, it didn't help. The Nexus version 1.7.2 was already configured to use Crowd (crowd-plugin version 1.6.0), this means the Crowd users are already in Nexus groups.