Alfresco的LDAP配置

本文档详细记录了在Linux环境下部署Alfresco后,如何配置与Windows Active Directory (AD) 的LDAP集成,解决配置过程中遇到的问题及最终成功的方法。通过官方文档,调整`alfresco-global.properties`文件中的`authentication.chain`、`ntlm.authentication.sso.enabled`等属性,禁用NTLM SSO并正确设置LDAP相关参数,实现AD用户登录Alfresco。

之前按照网上的教程在Windows上安装了alfresco,没有任何问题,一步一步都很成功,安装完之后,因为要给AD用户使用,所以LDAP的对接是必不可少的,可是那该死的配置文件整整虐了我两天,愣是没有配对。想想自己配过LDAP的系统,至少也有七八个吧,为什么单单就这个这么奇葩,偏偏alfresco的官网打开太慢,于是就到网上不停的搜索,直到搜到一篇相对来说比较“权威”的,《Alfresco部署+配置ldap验证》然后就又安装linux系统,再次开始部署alfresco,过程也都一样,部署的也都是最新版本的alfresco 5.0,可是部署成功之后,LDAP按照文档上面写的配置了,重新N次Tomcat,都没有用,一度崩溃。

最后,多次试验无果后,就想回到原点,重新看一下文档,这次是到官网文档库中找,找了一个小时,最后才找到关于LDAP的配置,由于我使用的是微软的Windows活动目录,所以需要找关于AD的配置,参照以下网页:http://docs.alfresco.com/community/tasks/auth-example-oneldap-ad.html

关于AD的配置案例如下(其他一些说明就省略了,可以点击上面的网址查看):

This example uses an Active Directory server and configures an instance of the ldap-ad subsystem.

  1. This example uses the second option to append an instance of ldap-ad to the authentication chain. This instance name is ldap1 and is declared by changing the authentication.chain property in the alfresco-global.properties file. In addition to the authentication.chain property, you need to add the ntlm.authentication.sso.enabled property to the alfresco-global.properties file.
  2. Undo any previous modifications to alfinst and disable NTLM-based SSO.

    This is done because the ldap-ad and ldap subsystem types cannot participate in the NTLM handshake, so leaving SSO enabled would prevent any of the Active Directory users from logging in.

  3. Disable SSO by opening the alfresco-global.properties file in a text editor and editing the ntlm.authentication.sso. enabled property as follows:
    authentication.chain=alfinst:alfrescoNtlm,ldap1:ldap-ad
    
    ntlm.authentication.sso.enabled=false
    
    ldap.authentication.allowGuestLogin=false
    ldap.authentication.userNameFormat=%s@domain.com
    ldap.authentication.java.naming.provider.url=ldap://domaincontroller.domain.com:389
    ldap.authentication.defaultAdministratorUserNames=Administrator,alfresco
    ldap.synchronization.java.naming.security.principal=alfresco@domain.com
    ldap.synchronization.java.naming.security.credentials=secret
    ldap.synchronization.groupSearchBase=ou=Security Groups,ou=Alfresco\
    ,dc=domain,dc=com
    
    ldap.synchronization.userSearchBase=ou=User Accounts,ou=Alfresco,dc=domain,dc=com

    然后就找到相关配置文件,按照上面这个例子进行修改,简单的修改几处,完成后重启alfresco服务,打开web界面,使用AD账户登录,竟然就成功了,都不知道自己是喜剧还是悲剧了。唉,果然真正权威的还是官网,还有一点儿就是国内的这方面的文档还是不够多,不然也不可能没有最新版本的配置方法,不说了,留作记录吧。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值