使用Liferay门户的LDAP配置不起作用 [英] LDAP configuration with Liferay portal not working
问题描述
我需要使用组织LDAP配置Liferay.
I need to configure Liferay with organization LDAP.
我的要求是按需(登录时)将用户导入Liferay数据库.
My requirement is to import users on demand( on login) to Liferay database.
当我尝试使用映射到LDAP中的 sAMAccountNumber 的屏幕名称登录时,我得到
When I try to login by using screen name which is mapped to sAMAccountNumber in LDAP, I get
身份验证失败错误
authentication failure error
我也看不到db中导入的任何用户.
I do not see any users imported in db too.
经过大量调试后,看来LDAP连接已成功完成.但是LDAP不会返回任何结果.
After a lot of debugging it looks life LDAP connection is done successfully. But no results are returned from LDAP.
我在日志中看到这样的内容.
I am seeing something like this in the logs .
转换前搜索过滤器 (sAMAccountName = @screen_name‌@@)
之后的搜索过滤器 转换(sAMAccountName = @screen_name‌@@)
Search filter before transformation (sAMAccountName=@screen_name‌​@)
Search filter after transformation (sAMAccountName=@screen_name‌​@)
我不确定为什么在末尾添加垃圾字符.
I am not sure why its appending junk characters at the end .
应该只是
"sAMAccountName = @ screen_name @"
"sAMAccountName=@screen_name@ "
任何快速指针都将真正有帮助.
Any quick pointers would really help.
谢谢!
推荐答案
经过大量调试和服务器重新启动后,我终于知道了这个问题.希望对其他人有帮助.
After lot of debugging and server restarts finally I got to know the issue. Hope it helps somebody else.
如我的问题所示,在身份验证搜索过滤器中添加了一些垃圾字符,这就是为什么它没有用我在登录屏幕上输入的实际值替换SAMAccountNamr的原因.
As shown in my question there were some junk characters getting appended to authentication search filter ,this was the reason it was not replacing the SAMAccountNamr with actual value I entered on login screen.
此垃圾字符在我使用的文本编辑器中不可见,因此人眼不可见.
This Junk characters were not visible in the text editor I was using and hence not visible to the human eye.
只有当我将文本编辑器编码更改为ANSI时,我才能够看到这些垃圾字符.我真的不知道字符编码是如何工作的,我只是想着文本编辑器是否隐藏了东西而尝试了它.我已经从一个教程(即网页)中复制了此字符串,这可能是附加了这些垃圾字符的原因.
It was only when I changed my text editor encoding to ANSI ,I was able to see these junk characters . I really have no knowledge on how character encoding work ,I tried it just thinking whether text editor is hiding something. I had copied this string from one of the tutorial i.e. web page and might be a reason these junk characters got appended.
删除它们后一切都很好.感谢Pavel在调试过程中提出的建议.
After removing them everything was all fine.Thanks Pavel for your suggestions in the debugging process.
这篇关于使用Liferay门户的LDAP配置不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!