PatrickRoumanoff / nexus-crowd-plugin

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

Support Single sign-on (SSO) #13

Closed martinburger closed 10 years ago

martinburger commented 10 years ago

SSO would be great.

flopma commented 10 years ago

Yes indeed - I don't know if it is feasable to integrate that in this authentication plugin. Any helpful comments will be greatly welcome

martinburger commented 10 years ago

Maybe having a look at Jenkins' Crowd 2 plugin is helpful? https://wiki.jenkins-ci.org/display/JENKINS/Crowd+2+Plugin

On 23. April 2014 09:53:35 MESZ, flopma notifications@github.com wrote:

Yes indeed - I don't know if it is feasable to integrate that in this authentication plugin. Any helpful comments will be greatly welcome


Reply to this email directly or view it on GitHub: https://github.com/PatrickRoumanoff/nexus-crowd-plugin/issues/13#issuecomment-41133858

flopma commented 10 years ago

I'm not sure - it seems to be based on Acegi, while Nexus uses Shiro

On 23/04/14 20:01, Martin Burger wrote:

Maybe having a look at Jenkins' Crowd 2 plugin is helpful? https://wiki.jenkins-ci.org/display/JENKINS/Crowd+2+Plugin

flopma commented 10 years ago

Closing this issue for now as I don't know how to do this in the scope of this plugin - any helpful pointers needed.

flopma commented 10 years ago

Nexus dev has shared some pointers on where to do it. I will try but can't promise anything has I don't master Guice and Shiro. Plan to work on this one not before end of july...

CrystalMethod commented 10 years ago

Can we assist in someway? I would really appreciate SSO support.

flopma commented 10 years ago

Sure, if you can send me a example of working code where you plug into Nexus a filter which creates a user session from a cookie for example, this would greatly help me.

flopma commented 10 years ago

For those who knows Guice which Nexus uses, I've tried to inject a new filter in Nexus without editing Nexus's classes without success. So I stop working on this issue. The pointers Nexus developers gave me are below. For the Crowd SSO, you need to add code inside a filter which will check if there is an existing Crowd session or not. If yes, then creates the user session inside Nexus, otherwise, do nothing. As I couldn't even add a filter, I can't go further. Sorry

https://github.com/sonatype/nexus-oss/blob/nexus-2.8.x/components/nexus-core/src/main/java/org/sonatype/nexus/guice/NexusModules.java#L100-100

https://github.com/sonatype/nexus-oss/blob/ca608b3adaa0c8c07c90fa43c522ca1c3b1bb4a3/components/nexus-core/src/main/java/org/sonatype/nexus/web/internal/ErrorPageFilter.java

https://github.com/sonatype/nexus-oss/blob/620ba8e7669fc3a7412ef74a43474b9fbe99b351/components/nexus-core/src/main/java/org/sonatype/nexus/web/internal/CommonHeadersFilter.java

https://github.com/sonatype/nexus-oss/blob/8edb007a3b9583b405cd4f1cbfeeff0a196f4353/components/nexus-core/src/main/java/org/sonatype/nexus/web/internal/BaseUrlHolderFilter.java

https://github.com/sonatype/nexus-oss/blob/nexus-2.8.x/plugins/basic/nexus-content-plugin/src/main/java/org/sonatype/nexus/content/internal/ContentModule.java

https://github.com/sonatype/nexus-oss/blob/nexus-2.8.x/plugins/restlet1x/nexus-restlet1x-plugin/src/main/java/org/sonatype/nexus/restlet1x/internal/Restlet1xModule.java