java - 如何实现 EAR-wide JAAS

标签 java security jakarta-ee jaas geronimo

我想在包含多个 war 的整个 EAR 文件中实现 JAAS。

我已在每场 war 中成功设置它,但这意味着当用户在 war 之间切换时(通过超链接)他们必须为每场 war 重新登录,即使每场 war 都配置为使用相同的领域。

如何为整个 EAR 创建单点登录流程?

谢谢。

最佳答案

这通常是特定于容器的。 对于 JBoss ,您可以为此目的使用 yourapp.ear/META-INF/jboss-app.xml。在这里,您定义了一个指向相应登录策略的 security-domain 元素。 DTD 摘录:

<!-- The security-domain element specifies the JNDI name of the security manager that implements the EJBSecurityManager and RealmMapping for the domain. When specified at the jboss level it specifies the security domain for all j2ee components in the deployment unit.
One can override the global security-domain at the container
level using the security-domain element at the container-configuration level.

Used in: jboss-app -->

<!ELEMENT security-domain (#PCDATA)>

关于java - 如何实现 EAR-wide JAAS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5141637/

相关文章:

GlassFish 开源版 3.1 上部署 war 时出现 java.lang.AbstractMethodError

java - 将 SQLite 与我的 Java EE 应用程序集成的正确方法是什么?

Java - 绑定(bind)到特定子类的通用数字方法签名

java - PopupWindow 适用于 Android 2.1,但不适用于其他版本

php - 为什么 srand(time()) 是坏种子?

java - TAI 和 ACS 在 SSO 期间处理 SAML 响应后如何访问 SAML 响应

java - 此 portlet 无法访问路径/WEB-INF/jsp/newportlet/view.jsp

java - 在另一个 java web 项目中包含 WAR 文件

java - php json_encode 安卓的欧元符号

java - 如何获取微调器中所选项目的值?