jakarta-ee - JBoss jaas 会话超时
问题描述
我想在 JBoss EAP 7.1.0 中设置 jaas 会话超时。我定义了新的安全域:
<security-domain name="management" cache-type="infinispan">
<authentication>
<login-module code="RealmDirect" flag="required">
<module-option name="realm" value="ManagementRealm"/>
</login-module>
</authentication>
</security-domain>
我修改了 infinispan 以设置会话超时:
<cache-container name="security" default-cache="auth-cache">
<local-cache name="auth-cache">
<eviction strategy="LRU" max-entries="1000"/>
<expiration lifespan="120000" max-idle="60000"/>
</local-cache>
</cache-container>
但是,我的 jaas 会话永不过期。在我的应用程序中,我有:
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>ManagementRealm</realm-name>
</login-config>
而且我的 jboss-web.xml 定义了安全域:
<security-domain>management</security-domain>
JBoss 只要求我输入一次密码,然后它会缓存,因此不再显示登录对话框。
解决方案
您可能必须将本地缓存名称设置为安全域的名称。
<local-cache name="management">
推荐阅读
- reactjs - useState 的时间是什么时候保存的?
- vba - 从 Chrome 切换到 Microsoft Edge 浏览器
- javascript - 如何在javascript中创建动态圆角?
- java - Spring WebFlux:如果抛出此异常,如何在网页上显示来自自定义异常类的消息?
- reactjs - React 页脚中的字体真棒图标
- sql - 如何创建这个简单的视图?
- laravel - Laradock 和 OpenSSL:dh 密钥太小
- sql - CTE 被多次调用?
- python - Python mypy 注释装饰器 __call__
- mysql - mySQL 中的中位数