2013-07-14 51 views
0

我們有需要在websphere 6.1中部署的應用程序。在websphere中,配置LDAP認證。我們所託管的應用程序還應啓用身份驗證以啓用單一登錄。我們需要驗證特定用戶輸入了正確的用戶名/密碼。不需要檢查任何角色&組。沒有應用程序特定的角那麼我如何配置我的appplication.xml,ibm。如何在沒有用戶角色檢查的情況下配置Websphere單點登錄

ibm-application-bnd.xmi 

<authorizationTable xmi:id="AuthorizationTable_1298129835914"> 
    <authorizations xmi:id="RoleAssignment_1298129835811">  
     <users xmi:id="User_1310175154371" name="Jothi_Nadesan"/> 
     <role href="META-INF/application.xml#SecurityRole_1310175154371"/> 
     <groups xmi:id="Group_1305717519721" name="USSA.App_IP"/> 
    </authorizations> 
    </authorizationTable> 
    <application href="META-INF/application.xml#Application_ID"/> 

application.xml 
<module id="WebModule_1340958487989"> 
     <web> 
      <web-uri>CotyIPMasterDataWeb.war</web-uri> 
      <context-root>IPMasterData</context-root> 
     </web> 
    </module> 
    <security-role id="SecurityRole_1310175154371"> 
     <description>IP_AUTHENTICATION</description> 
     <role-name>IP_AUTHENTICATION</role-name> 
    </security-role>  

web.xml 
<security-constraint> 

     <web-resource-collection> 
      <web-resource-name>IPMasterData</web-resource-name> 
      <description></description> 
      <url-pattern>/</url-pattern> 
      <url-pattern>*.action</url-pattern> 
      <url-pattern>*.jsp</url-pattern> 
      <url-pattern>*.html</url-pattern> 
      <http-method>GET</http-method> 
      <http-method>PUT</http-method> 
      <http-method>POST</http-method> 
      <http-method>DELETE</http-method> 
     </web-resource-collection> 

    </security-constraint> 
    <login-config> 
     <auth-method>BASIC</auth-method> 
    </login-config> 

回答

1

對於這個工作,你必須在web.xml中定義<security-role><security-constraint>應該是指它(*表示任何存在的角色):

<security-role> 
    <role-name>IP_AUTHENTICATION</role-name> 
</security-role> 

<security-constraint> 
    <auth-constraint> 
     <role-name>*</role-name> 
    </auth-constraint> 
</security-constraint> 

然後IBM-應用bnd.xmi必須將此角色綁定到特殊主題AllAuthenticatedUsers:

<authorizations xmi:id="RoleAssignment_1298129835811"> 
    <specialSubjects xmi:type="applicationbnd:AllAuthenticatedUsers" 
name="AllAuthenticatedUsers"/> 
    <role href="META-INF/application.xml#SecurityRole_1310175154371"/> 
</authorizations> 
+0

謝謝。有效。 – Jothi

相關問題