[集成] lifearay4.3和active directory的整合问题

Eric_liu 2007-08-17
目前有没有朋友配置liferay4.3和ad认证成功的?
下面是我的配置文件,不知道是什么地方出错了,一直与ad之间建立不了认证关系:
先贴一个ad和cas之间整合的xml配置文件(成功的):
<?xml version="1.0" encoding="GB2312"?>
<!DOCTYPE beans PUBLIC  "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="authenticationManager"
class="org.jasig.cas.authentication.AuthenticationManagerImpl">
<property name="credentialsToPrincipalResolvers">
<list>
<bean class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver" />   
</list>
</property>
<property name="authenticationHandlers">
<list>
<bean class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler">
<property name="filter" value="sAMAccountName=%u" />
<property name="searchBase" value="OU=724台用户,DC=abrs724,DC=gov,DC=cn" />
<property name="contextSource" ref="contextSource" />
</bean>
</list>
</property>
</bean>
<bean id="contextSource"
class="org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource">
<property name="authenticatedReadOnly" value="true" />
<property name="password" value="gaodu123!" />
<property name="pooled" value="true" />
<property name="urls">
<list>
<value>ldap://10.2.57.32/</value>
</list>
</property>
<property name="userName"
value="CN=testadmin,ou=ceshi,ou=portaltest,dc=abrs724,dc=gov,dc=cn" />
<property name="baseEnvironmentProperties">
<map>
<entry>
<key>
<value>
java.naming.security.authentication
</value>
</key>
<value>simple</value>
</entry>
</map>
</property>
</bean>
</beans>
下面是ad在portal.properties中的配置:

    ldap.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
    ldap.base.provider.url=ldap://192.168.57.32:389
    ldap.base.dn=CN=testadmin,ou=ceshi,dc=abrs724,dc=gov,dc=cn
    ldap.security.principal=portaltest
    ldap.security.credentials=gaodu!123

    ldap.auth.search.filter=(sAMAccountName=@screenName@)
    ldap.auth.password.encryption.algorithm=
    ldap.auth.password.encryption.algorithm.types=MD5,SHA

    ldap.users.dn=OU=station724,DC=abrs724,DC=gov,DC=cn
    ldap.user.mappings=screenName=sAMAccountName\nemailAddress=mail\nfirstName=givenName\nlastName=sn\njobTitle=title\nuserPrincipalName=userPrincipalName
    ldap.user.impl=com.liferay.portal.security.ldap.LDAPUser
    ldap.user.default.object.classes=top,person,inetOrgPerson,organizationalPerson

    ldap.groups.dn=OU=station724,DC=abrs724,DC=gov,DC=cn
    ldap.group.mappings=groupName=cn\ndescription=description

在liferay4.3中配置ad成功的朋友帮我看下,是什么地方出错了。谢了!
Eric_liu 2007-08-20
liferay portal + ad认证问题已经搞定~附录:
portal-ext.properties:
该附件是liferay4.3官方论坛上的:
portal.release=enterprise

portal.ctx=/

auto.deploy.dest.dir=../webapps

ldap.factory.initial=com.sun.jndi.ldap.LdapCtxFactory

ldap.base.provider.url=ldap://HostName:389
ldap.base.dn=ou=xyz,dc=domain,dc=locale//一定要是用户目录,而不是ad的"用户名/密码"中用户名的目录

ldap.security.principal=principal@domain.local
ldap.security.credentials=secret

ldap.auth.enabled=true
ldap.auth.required=false

ldap.auth.method=bind

ldap.auth.search.filter=(&(objectCategory=person)(userPrincipalName=@email_address@))

ldap.auth.password.encryption.algorithm=
ldap.auth.password.encryption.algorithm.types=MD5,SHA

ldap.users.dn=ou=user,ou=xyz,dc=domain,dc=locale

ldap.user.mappings=fullName=cn\nscreenName=sAMAccountName\nemailAddress=userPrincipalName\n
ldap.user.impl=com.liferay.portal.security.ldap.LDAPUser
ldap.user.default.object.classes=top,person,inetOrgPerson,organizationalPerson

ldap.groups.dn=OU=user,ou=xyz,dc=domain,dc=locale

ldap.import.enabled=true
ldap.import.on.startup=true
ldap.import.interval=10
ldap.import.search.filter=(objectClass=person)
ldap.import.user.search.filter=(objectClass=person)
ldap.import.group.search.filter=(objectClass=group)

ldap.import.method=user

ldap.export.enabled=false

ldap.password.policy.enabled=false
ldap.error.password.age=age
ldap.error.password.expired=expired
ldap.error.password.history=history
ldap.error.password.not.changeable=not allowed to change
ldap.error.password.syntax=syntax
ldap.error.password.trivial=trivial
ldap.error.user.lockout=retry limit
Global site tag (gtag.js) - Google Analytics