維護應用程式端點安全

您可以執行下列步驟來維護特性的應用程式端點的安全:

程序

  1. 在特性的 .mf 檔中,新增 com.ibm.wsspi.appserver.webBundleSecurity-1.0 特性到 Subsystem-Content: 標頭中。 這項新增會使任何受保護的 Servlet(如特性軟體組的 WEB-INF/web.xml 檔所指定)接受鑑別,且會啟用角色型授權。 您也可以將使用者、群組和特殊主題指派給 WEB-INF/web.xml 檔中所定義的任何角色。
    Subsystem-Content:
     my.user.feature.bundle; version="[1,1.0.100)",
     com.ibm.wsspi.appserver.webBundleSecurity-1.0; type="osgi.subsystem.feature"
  2. 如果要將角色對映至使用者、群組或特殊主題,請執行下列步驟:
    1. 新增 IBM-Authorization-Roles 標頭至 OSGi 軟體組的 MANIFEST.MF 檔中。 標頭必須指定一個名稱,這個名稱是您在 server.xml 檔中指定之角色對映的 ID。
      IBM-Authorization-Roles: my.feature.role.map
    2. server.xml 檔中,新增一個將角色名稱對映至使用者和群組的 authorization-roles 元素。 authorization-roles 元素的 id 屬性與 MANIFEST.MF 檔中 IBM-Authorization-Roles 標頭的值相同。 請針對您想要指派給使用者和群組的每一個角色來新增 <security-role> 子元素。
      <authorization-roles id="my.feature.role.map">
        <security-role name="employee">
          <special-subject type="ALL_AUTHENTICATED_USERS"/>
        </security-role>
        <security-role name="manager">
          <user name="bob"/>
          <user name="mary"/>
          <group name="managers"/>
        </security-role>
      </authorization-roles>

指示主題類型的圖示 作業主題



「時間戳記」圖示 前次更新: 2016 年 11 月 30 日
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=twlp_secure_app_endpoint
檔名:twlp_secure_app_endpoint.html