我想使用 ApacheDS LDAP 对用户进行身份验证,然后将其与我的 worklight 服务器(自由配置文件)集成。为此,我在 http 端点元素之后使用以下代码修改了 server.xml。
<ldapRegistry id=”ldap” >
realm=”LdapRegistry”
host=”localhost”
port=”10389”
ignoreCase=”true”
baseDN=”dc=partition1,dc=com”
bindDN=”uid=admin,ou=system”
userFilter=”(&(uid=%v)(objectclass=inetOrgPerson))”
bindPassword=”secret”
ldapType="ApacheDS 2.0.0"
</ldapRegistry>
在 authenticationconfig.xml 中
"<securityTests>
<customSecurityTest name="LDAPSecurityTest">
<test isInternalUserID="true" realm="LDAPRealm"/>
</customSecurityTest>
<customSecurityTest name="LDAPSecurityTestForWLConsole">
<test isInternalUserID="true" realm="WorklightConsole"/>
</customSecurityTest>
</securityTests>
<realms>
<realm loginModule="LDAPLoginModule" name="LDAPRealm">
<className>com.worklight.UsernamePasswordJSONAuthenticator</className>
</realm>
<realm loginModule="StrongDummy" name="SampleAppRealm">
<className>com.worklight.core.auth.ext.FormBasedAuthenticator</className>
</realm>
<realm loginModule="LDAPLoginModule" name="WorklightConsole">
<className>com.worklight.core.auth.ext.FormBasedAuthenticator</className>
<onLoginUrl>/console</onLoginUrl>
</realm>
</realms>
<loginModules>
<loginModule name="LDAPLoginModule">
<className>com.worklight.LDAPLoginModule</className>
<parameter name="ldapHost" value="ldap://localhost:10389"/>
<parameter name="ldapDomain" value="localhost:10389"/>
<parameter name="searchBase" value="dc=partition1,dc=com"/>
<!--
In case credentials are successfully validated check user's memberOf property for this string.
Can be used to check whether user belongs to specific LDAP unit or group.
Leave value empty to skip this check.
-->
</loginModule>
<loginModule name="StrongDummy">
<className>com.worklight.core.auth.ext.NonValidatingLoginModule</className>
</loginModule>
<loginModule name="requireLogin">
<className>com.worklight.core.auth.ext.SingleIdentityLoginModule</className>
</loginModule>
</loginModules>
</tns:loginConfiguration>
Worklight 服务器控制台停止工作。遵循来自 ibm 站点和支持中心的 LDAP 登录模块,用于配置到自由配置文件。请帮助