Forum Stats

  • 3,814,234 Users
  • 2,258,847 Discussions
  • 7,892,630 Comments

Discussions

Multiple JAAS Identities from Single Client?

843811
843811 Member Posts: 49,851
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

Comments

  • 843811
    843811 Member Posts: 49,851
    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.
This discussion has been closed.