如何使用LDAP配置Liberty的basicRegistry?

时间:2017-04-26 17:33:10

标签: websphere web.xml websphere-liberty server.xml

Liberty可以在从Ldap注册表中获取用户/密码对时执行Http Basic Authentication吗?

假设我已经工作ldapRegistry如何将其绑定到basicRegistry(如果我正确理解它需要做什么)basicRegistry将从LDAP获取用户\密码对。

<ldapRegistry id="LDAP" realm="SampleLdapIDSRealm"> 
      ...
</ldapRegistry>

1 个答案:

答案 0 :(得分:2)

是的,Liberty可以配置为使用LDAP注册表或基本注册表或两者。基本身份验证(或表单登录)在Web应用程序的部署描述符(web.xml)中定义。以下是您对用户注册表的选择:

1)仅配置LDAP用户注册表:这假定所有想要使用基本身份验证登录Web应用程序的用户都在配置的LDAP服务器中。 2)仅配置基本用户注册表:在这种情况下,所有用户/组都在server.xml文件中定义 3)如果您的用户分布在LDAP和Basic用户注册表之间,则可以使用注册表联合。

如果您正在寻找如何将安全角色绑定到用户(在LDAP或其他用户注册表中),这里是一个在server.xml中定义应用程序绑定的示例 :

<application type="war" id="myapp" name="myapp" location="${server.config.dir}/apps/myapp.war">
    <application-bnd>
        <security-role name="user">
            <group name="students" />
        </security-role>
        <security-role name="admin">
            <user name="gjones" />
            <group name="administrators" />
        </security-role>
        <security-role name="AllAuthenticated">
            <special-subject type="ALL_AUTHENTICATED_USERS" />
        </security-role>
    </application-bnd>
</application>

使用Liberty配置用户注册表: https://www.ibm.com/support/knowledgecenter/en/SSEQTP_8.5.5/com.ibm.websphere.wlp.doc/ae/cwlp_repository_federation.html

在Liberty中配置授权: https://www.ibm.com/support/knowledgecenter/en/SSAW57_liberty/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/twlp_sec_rolebased.html