Multiple JAAS Identities from Single Client?

Hi all

Specifically I am trying to talk from one jboss app server to another with different JAAS security identities in each, but I am having difficulties. In the simple case though I wonder if anyone has managed to perform 2 JAAS logins with diferent subjects to a server and use them independently?

I have tried creating 2 LoginContexts and executing login() on each and then calling the methods I require, but only ever the last login() subject is used.

Has anyone else tried this, is it possible to have different identities in different threads? How are the LoginContexts associated with the subsequent method calls? Is it a static (hence ClassLoader) scope or a thread scope?

Any ideas appreciated!

Thanks

Luke

[766 byte] By [lstudley] at [2007-9-26 8:35:39]
# 1

perhaps try creating one LoginContext, execute the methods associated with it, then create the second LoginContext, login, and then execute the methods associated with it. If you perform 2 logins before you execute the methods, it may just associate the calls with the last login executed.

Also, check your auth.conf file for the ClientLoginModule. If this is present as one of the login modules then subsequent requests in that app server will be associated with the subject just authenticated.

eglerk at 2007-7-1 19:19:21 > top of Java-index,Security,Other Security APIs, Tools, and Issues...