2014-06-30 44 views
0

有沒有一種方法可以使用與ManagementRealm相同的用戶和角色配置來保護Web應用程序?如何使用JBoss EAP 6.2中的ManagementRealm來保護Web應用程序?

我知道有一個委託給ApplicationRealm的安全域「java:/ jaas/other」。如何創建委託給ManagementRealm的類似安全域?

換句話說 - 我想讓一個Web應用程序可以被可以訪問JBoss'管理控制檯的相同用戶訪問。

我正在運行域模式。

//編輯:

我能夠建立,通過使用登錄模塊RealmDirect和設置範圍= ManagementRealm 認證工作正常是指管理領域的安全域,但它不挑用戶角色。 ApplicationRealm的完全相同的配置工作正常。

回答

0

我有同樣的挑戰。在定義了引用「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> 
相關問題