This is actually a subject a couple of user wanted to come up with, but at the 
end I think all discarded the idea…
If still wanna do this, then you also have to think about scheduled jobs, these 
are triggered by no user interaction, which JAAS subject would you use in these 
cases?
/Domi


On 27 May 2015, at 16:48, Guillaume Delory <[email protected]> wrote:

> Actually after thinking a bit more about that. I guess that the user is 
> authenticated only when he start the job and add it to the queue. Then the 
> executor wil take care of it but user has nothing to do with it. So it makes 
> sense there is no Subject associated to it.
> 
> If I'm right, the only option would be to intercept the build creation and 
> somehow store the Subject somewhere if it's available, to make it available 
> for the actual build one by the Jenkins user. I have no idea if it's possible.
> 
> Any thoughts?
> 
> Thank you :)
> 
> Le mardi 26 mai 2015 14:24:19 UTC+2, Guillaume Delory a écrit :
> Hi everyone,
> 
> I'm running Jenkins in WebSphere 8.5 to manage authentication. It works fine 
> and I can get the JAAS Subject in the Script Console by doing:
> println com.ibm.websphere.security.auth.WSSubject.getCallerSubject()
> 
> I also wrote a plugin that adds a simple custom step (extending the Builder 
> class). I would like to use this plugin to contact some application also 
> running in WAS. To do this I need to get the caller Subject as I did in the 
> console. However, the code above in the perform method returns null. I guess 
> Jenkins runs the step in a different thread without pushing the JAAS Subject.
> 
> Is there any way (by configuration or programmatically) to force Jenkins to 
> push the Subject to the build step so I can use it? Or maybe a different way 
> to get the caller Subject from the plugin?
> 
> Thank you very much for your help.
> 
> -- 
> 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].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-dev/fb1f9ab7-f118-42e6-9314-35f9aa509c9b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/A9328AD6-B3C4-47B8-8CFC-A91E65A4FC79%40fortysix.ch.
For more options, visit https://groups.google.com/d/optout.

Reply via email to