Have a look at the source of the script-security-realm-plugin 
https://wiki.jenkins-ci.org/display/JENKINS/Script+Security+Realm
Its quite simple…
/Domi

On 07.01.2014, at 17:21, dennys <[email protected]> wrote:

> I use java -jar jenkins.war to run Jenkins, it seems I need to run Apache in
> front of Jenkins?
> 
> btw, I already write a servlet filter and put it into Jenkins, it can get my
> user credential form cookie now.
> 
> I just need to know how to put the user data into Jenkins' session, then I
> have SSO. 
> I'm not sure what's the API to put user data, I only know I can use
> org.acegisecurity.context.SecurityContextHolder to get user information.
> SecurityContextHolder.getContext().getAuthentication().getName();
> 
> Then I try to create a cookie ACEGI_SECURITY_HASHED_REMEMBER_ME_COOKIE_KEY,
> but it seems Jenkins clear it. 
> 
> Is there any suggestion for it? I'm not sure to install an Apache in front
> Jenkins is a good idea or not.
> Maybe filter is simpler, but I'm not sure how to create the user session.
> I try to see the source code of Crowd2 and openid plugin, but it's not easy.
> 
> 
> 
> --
> View this message in context: 
> http://jenkins-ci.361315.n4.nabble.com/How-to-build-a-SSO-plugin-in-Jenkins-tp4685472p4686401.html
> Sent from the Jenkins dev mailing list archive at Nabble.com.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to