【问题标题】:WebSphere Liberty How to Set up Authenticated Users in server.xml?WebSphere Liberty 如何在 server.xml 中设置经过身份验证的用户?
【发布时间】:2020-05-18 16:22:49
【问题描述】:

如何在 WebSphere Liberty 中设置经过身份验证的用户?我已按照此处列出的说明进行操作:https://www.ibm.com/support/knowledgecenter/SS7K4U_liberty/com.ibm.websphere.wlp.zseries.doc/ae/twlp_sec_rolebased.html 和此处:https://www.ibm.com/support/knowledgecenter/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/twlp_sec_basic_registry.html

但我仍然错过了一些难题。

这是我的 ibm-application-bnd.xml 的样子:

    <application-bnd>
        <security-role name="AllAuthenticated">
            <special-subject type="ALL_AUTHENTICATED_USERS" />
        </security-role>
    </application-bnd>

这里是 server.xml:

<basicRegistry id="basic" realm="WebRealm">
    <user name="wasadmin" password="wasadmin" />
    <user name="user1" password="test" />
    <user name="user2" password="test" />
    <group name="admin">
      <member name="wasadmin" />
   </group>

   <group name="users">
      <member name="wasadmin" />
      <member name="user1" />
      <member name="user2" />
   </group>
</basicRegistry>    

<administrator-role>
    <user>wasadmin</user>
</administrator-role>

这是错误信息

CWWKS9104A: Authorization failed for user wasadmin:defaultRealm while invoking MyApplication on /myapplication-mainPage. The user is not granted access to any of the required roles: [ROLE_AUTHENTICATED_USER].

我需要定义一个 AllAuthenticated 角色吗?它的名字是 AllAuthenticated-role 吗?我如何让它不寻找 DefaultRealm

【问题讨论】:

    标签: authentication websphere websphere-liberty


    【解决方案1】:

    这是帮助我找出问题的页面:https://www.ibm.com/support/knowledgecenter/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/twlp_sec_quickstart.html

    这是我添加到 server.xml 中的:

    <enterpriseApplication location="MyApplication.ear">
    <application-bnd> 
      <security-role name="ROLE_AUTHENTICATED_USER">
        <group name="admin" />
      </security-role>
    </application-bnd>
    </enterpriseApplication>
    

    【讨论】:

    • 此配置允许访问所有组。我们如何才能仅授予管理员组访问权限?
    猜你喜欢
    • 2011-06-07
    • 2017-09-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-15
    • 2016-01-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多