我正试图让ldaps通过Apache 2.2.17(Windows Server 2008)工作。 如果我使用ldap(纯文本),我的configuration很好。
LDAPTrustedGlobalCert CA_DER C:/wamp/certs/Trusted_Root_Certificate.cer LDAPVerifyServerCert Off <Location /> AuthLDAPBindDN "CN=corpsvcatlas,OU=Service Accounts,OU=u00958,OU=00958,DC=hca,DC=corpad,DC=net" AuthLDAPBindPassword ..removed.. AuthLDAPURL "ldaps://gc-hca.corpad.net:3269/dc=hca,dc=corpad,dc=net?sAMAccountName?sub" AuthType Basic AuthName "USE YOUR WINDOWS ACCOUNT" AuthBasicProvider ldap AuthUserFile /dev/null require valid-user </Location>
我也尝试了CA_DER之外的其他encryption选项,以确保安全,没有运气。
最后,我还需要Apache Tomcat。 对于tomcat,我使用了tomcat JRE并运行了这样一行:
keytool -import -trustcacerts -keystore cacerts -storepass changeit -noprompt -alias mycert -file Trusted_Root_Certificate.cer
在做了上面的行之后,ldaps通过tomcat工作了。 这让我知道我的证书是一个好的。
更新:两个ldap模块都打开,因为使用ldap而不是ldaps工作正常。
当我运行一个混帐克隆这是错误返回:
C:\Temp>git clone http://eqb9718@localhost/git/Liferay.git Cloning into Liferay... Password: error: The requested URL returned error: 500 while accessing http://eqb9718@loca lhost/git/Liferay.git/info/refs fatal: HTTP request failed
access.log有这个:
127.0.0.1 - eqb9718 [23/Nov/2011:18:25:12 -0600] "GET /git/Liferay.git/info/refs service=git-upload-pack HTTP/1.1" 500 535 127.0.0.1 - eqb9718 [23/Nov/2011:18:25:33 -0600] "GET /git/Liferay.git/info/refs HTTP/1.1" 500 535
apache_error.log没有任何内容。 是否有更详细的日志logging,我可以打开或更好的testing做?
更新2:我可以运行apache服务器上的wireshark,我可以清楚地看到传出的连接,但我不能真正做任何东西的头或尾。 我不是wireshark大师,只是看起来像行话。
另外,我使用ldap浏览器来validationldaps在机器上运行良好。
更新3:我把Apache日志loggingdebugging,这是错误回来:
[3016] auth_ldap authenticate: user eqb9718 authentication failed; URI /git/Liferay.git/info/refs [LDAP: ldap_simple_bind_s() failed][Server Down]
现在请记住,在同一台Server 2008计算机上,我可以使用LDAP浏览器通过ldaps连接到端口3269,并且没有任何操作是“closures”的。 这个错误告诉我们什么?
更新4:这是运行openssl s_client -connect gc-hca.corpad.net的结果:3269 -showcerts: http ://pastebin.com/2yEGN4C1
我也尝试了openssl命令直接转到端口636上的域控制器,它工作,我已经在我的httpd.conf中产生相同的错误。 我不知道是否重要的是要注意,当我直接去控制器(389或636),我不得不添加一个容器,像ou = group,dc = hca等。 这使得使用GC是必须的。 必须是mod_ldap中的错误,因为我从其他许多post中find了解决scheme。
更新5:我手动启动了Apache而不是通过服务,这是打印出来的ldapdebugging:
C:\wamp\bin\apache\Apache2.2.17\bin>httpd [Thu Nov 24 19:19:08 2011] [debug] util_ldap.c(1769): LDAP: SSL verify server ce rtificate - FALSE [Thu Nov 24 19:19:08 2011] [debug] mod_authnz_ldap.c(1010): [3144] auth_ldap url parse: `ldaps://gc-hca.corpad.net:3269/dc=hca,dc=corpad,dc=net?sAMAccountName?s ub?(objectClass=*)', Host: gc-hca.corpad.net:3269, Port: 3269, DN: dc=hca,dc=cor pad,dc=net, attrib: sAMAccountName, scope: subtree, filter: (objectClass=*), con nection mode: using SSL
您的LDAPVerifyServerCert Off
呈现受信任的根configuration惰性 – 所以信任不是问题。
在OU=Service Accounts
是否有这么多的空格?
你有mod_ldap
和mod_authnz_ldap
启用?
如果这两者都不是问题,你能检查你的错误日志有用吗?