是否有一种方法可以使用与ManagementRealm相同的用户和角色配置来保护web应用程序?
我知道有一个安全域"java:/jaas/other“委托给ApplicationRealm。如何创建委托给ManagementRealm的类似安全域?
换句话说,我希望web应用程序能够被访问JBoss的管理控制台的相同用户访问。
我在运行域模式。
//编辑:
我能够通过使用登录模块RealmDirect和设置realm=ManagementRealm身份验证来设置引用管理领域的安全域,但是它没有选择用户角色。对于ApplicationRealm,完全相同的配置工作得很好。
发布于 2014-12-03 07:07:34
我也有过同样的挑战。在定义了引用" ManagementRealm“的安全域并在web.xml中定义角色之后,诀窍是将ManagementRealm配置为将组映射到角色:
授权map-groups-to-roles="true“
<security-realm name="ManagementRealm">
<authentication>
<local default-user="$local" skip-group-loading="true"/>
<properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>
</authentication>
<authorization map-groups-to-roles="true">
<properties path="mgmt-groups.properties" relative-to="jboss.server.config.dir"/>
</authorization>
</security-realm>
https://stackoverflow.com/questions/24488637
复制相似问题