How to implement JAAS

I would like to implement JAAS across an entire EAR file containing several wars.

I have successfully installed it in every war, but this means that when a user switches between wars (via hyperlinks between them), they must log in again for everyone, even if every war is set to use the same sphere.

How can I create a single registration process for the entire EAR?

Thanks.

+4
source share
2 answers

I found the answer! - a single sign for all applications in the same servlet context and for the same security area. Its available with tomcat. I just updated the config.xml file as below, and now it only asks to log in once.

http://publib.boulder.ibm.com/wasce/V2.1.0/en/valves.html#Valves-AddingtheSingleSignonValvetotheinitialvalvechain

+2
source

It usually depends on the container. For JBoss, you can use yourapp.ear/META-INF/jboss-app.xml for this purpose. Here you define a security-domain element that points to the corresponding login policy. Excerpt from DTD:

<! - The security domain element specifies the security JNDI name that implements EJBSecurityManager and RealmMapping for the domain. When indicated at the jboss level, the security domain is specified for all j2ee components in the deployment unit.
Can override global security domain in container
level using the security domain element in the container level configuration.

Used in: jboss-app β†’

<! ELEMENT security-domain (#PCDATA)>

+2
source

Source: https://habr.com/ru/post/1341634/


All Articles