I have a Web application which needs to propagate authentication to two EJB modules which use distinct security-domains. EJB-ModA is configured with security-domain A, EJB-ModB is configured with security-domain B and the web app is configured on its jboss-web.xml with security-domain A. How can the web app automatically authenticate itself on security-domain B?
It would be something like the "security-identity" element available for EJBs. It would be necessary to have a rule for the web app like: When accdessing EJB-ModB use identity XPTO, being xpto a user with roles on realm B.
Any help would be welcome.
Thanks in advance,
It just works if the principal and credentials are compatbile between the two domains. Otherwise you need an interceptor on either the ejb proxy or ejb container that mapped the foreign security domain principal and credentials to something that is usable.