It would be up to your login modules to support a single sign-on type of token that allowed calls with the token to be seen as valid across the two servers.
Ok, thank you. I don't know anything about interoperability between two servers so I am getting confused. I still have a question:
I use a token after having authenticated on first server, if I understand, the loginmodule on server 2 will use this token to authenticate, is that right?
But after this authentication, I want to have the subject on server2 filled with the principals created on server1, but I don't know where to look for them. How can I get them? Where they transmitted with the ejb call??
What I want is a trust relationship between two jboss servers where principals in a Subject from one server are accepted as principals in the other server.