留言板

LDAP Authentication not working

thumbnail
Bruno Galvao,修改在12 年前。

LDAP Authentication not working

Junior Member 帖子: 58 加入日期: 11-8-26 最近的帖子
LDAP Authentication has been enabled.
Test LDAP Connection returns successful.
Test LDAP Users returns with a list of users.
Test LDAP Groups is successful as well.

I sign out of Test@Liferay.com and try logging in as on of the users returned from "Test LDAP Users."
Authentication fails.

Liferay throws authentication fails very quickly as if it did not even check against Active Directory.

Any suggestions? Thanks!
thumbnail
David H Nebinger,修改在12 年前。

RE: LDAP Authentication not working

Liferay Legend 帖子: 14915 加入日期: 06-9-2 最近的帖子
I would try restarting the app container, then reindex all search indices. When you go to the Users control panel page, you should see all of the imported users...
thumbnail
Bruno Galvao,修改在12 年前。

RE: LDAP Authentication not working

Junior Member 帖子: 58 加入日期: 11-8-26 最近的帖子
David H Nebinger:
I would try restarting the app container, then reindex all search indices. When you go to the Users control panel page, you should see all of the imported users...



Thanks, but I don't want to import the users. I just want to authenticate them against Active Directory when they enter their email address / password on the login page.
thumbnail
Ronak Patel,修改在12 年前。

RE: LDAP Authentication not working

New Member 帖子: 19 加入日期: 10-1-20 最近的帖子
Did you check your authentication filter syntex?

Is it correct?

-
Ronak
thumbnail
David H Nebinger,修改在12 年前。

RE: LDAP Authentication not working

Liferay Legend 帖子: 14915 加入日期: 06-9-2 最近的帖子
Bruno Galvao:
Thanks, but I don't want to import the users. I just want to authenticate them against Active Directory when they enter their email address / password on the login page.


Okay, maybe no one has made this clear. All Liferay users must be in the Liferay database. When the user record is created, it gets the unique primary key value that is then used as a foreign key on other tables.

When you do AD/LDAP integration, you must import the users into the Liferay database. After the users are imported, when signing in AD/LDAP will be used to ensure the credentials are valid, but they must still be defined in the Liferay database...
thumbnail
Kenneth Dong,修改在12 年前。

RE: LDAP Authentication not working

New Member 帖子: 6 加入日期: 10-8-31 最近的帖子
David H Nebinger:
Bruno Galvao:
Thanks, but I don't want to import the users. I just want to authenticate them against Active Directory when they enter their email address / password on the login page.


Okay, maybe no one has made this clear. All Liferay users must be in the Liferay database. When the user record is created, it gets the unique primary key value that is then used as a foreign key on other tables.

When you do AD/LDAP integration, you must import the users into the Liferay database. After the users are imported, when signing in AD/LDAP will be used to ensure the credentials are valid, but they must still be defined in the Liferay database...



I'm pretty sure you can import on demand. You don't need to import the whole ldap database on startup. If you import on demand, when a user goes to sign into Liferay, Liferay will check it's database first, and if that user does not exist, it will go through and pull it from the Ldap database.

You can set this through the control panel as well as in your portal-ext.properties. Of course you can only set it in one or the other as the control panel overwrites the portal-ext.properties.
David Keith,修改在12 年前。

RE: LDAP Authentication not working

New Member 帖子: 13 加入日期: 11-1-6 最近的帖子
Hmmm, I'm not sure about this.
The import seems to be an all or nothing thing.
I have not been able to get import on demand to work.

Also, if I first import the full LDAP active directory, then disable LDAP import, I am unable to login using existing (in LP Demoticon account info.
This last issue sounds like a bug in LP 6.0 EE SP2.

Here's a specific example:
I setup LDAP to import (set import interval to 8 hours in portal-ext.properties via ldap.import.interval=480)
I confirm that all active directory data has been properly imported by checking User_ and Group_ tables in liferay DB or by checking Users in control panel.
I login as davidkeith@lathamint.com (signon set to use email address) and my LDAP password.
I disable LDAP import and log out.
I try to login as Davidkeith@lathamint.com using my LDAP password.
Authentication fails and I am unable to login
I re-enable LDAP import and I am once again able to login using davidkeith@lathamint.com and LDAP password.

If the account info is already imported in liferay's User_ table, why should I still need LDAP import enabled?
Has the behavior change in the SP2 update.

Can someone confirm this behavior for me please?
I will log an issue in JIRA if this is indeed a bug.

Thanks in advance for any help anyone can provide.
thumbnail
David H Nebinger,修改在12 年前。

RE: LDAP Authentication not working

Liferay Legend 帖子: 14915 加入日期: 06-9-2 最近的帖子
If the account info is already imported in liferay's User_ table, why should I still need LDAP import enabled?


It will rebind to ldap using the credentials to ensure the account is still valid...

I don't think this is a bug; we want to do ldap authentication and part of that authentication includes ensuring the credentials are correct.

Otherwise LR imports you today but you are disabled in LDAP tonight; when you hit the box tomorrow w/o the LDAP bind, it would let you log in even though you should not be able to...
David Keith,修改在12 年前。

RE: LDAP Authentication not working

New Member 帖子: 13 加入日期: 11-1-6 最近的帖子
Thanks David,

I'm thinking that if I wanted to use the imported LDAP data without validating against LDAP, I'd have to disable the import and uncheck the enabled and required options as well.
In my original case I did not uncheck these options, only disabled the import.

I will try this tomorrow in my development environment before any of my developers begin using the site.

In general I do not plan on ever disabling the LDAP import, except for maybe in temporary cases like an LDAP server upgrade or maintenance window.
For this particular case, it was temporarily disabled in a non production Liferay instance for some development reasons and I just happened to notice that I could no longer login as anyone but omniuser.

-David
thumbnail
David H Nebinger,修改在12 年前。

RE: LDAP Authentication not working

Liferay Legend 帖子: 14915 加入日期: 06-9-2 最近的帖子
David Keith:
For this particular case, it was temporarily disabled in a non production Liferay instance for some development reasons and I just happened to notice that I could no longer login as anyone but omniuser.


Omniusers do not have to pass LDAP auth, even when enabled. Keep that in mind for the future...
thumbnail
Bruno Galvao,修改在12 年前。

RE: LDAP Authentication not working

Junior Member 帖子: 58 加入日期: 11-8-26 最近的帖子
LDAP is not working for me.
Below is my portal-ext.properties, please let me know if you see something I should add/remove/modify:


ldap.import.enabled=true
ldap.import.on.startup=true
ldap.import.method=user
ldap.base.provider.url=ldap://yyy.aaa.zzz:389
ldap.security.principal=yyy\bruno galvao 
ldap.security.credentials=myPass
ldap.users.dn=OU=ITS,OU=XXX,OU=YYY Users,DC=yyy,DC=aaa,DC=zzz
ldap.user.mappings=screenName=employeeID\npassword=userPassword\nemailAddress=mail\nfullName=cn\nfirstName=givenName\nlastName=sn\njobTitle=title\ngroup=memberOf
ldap.auth.search.filter=(mail=@email_address@)
ldap.import.user.search.filter=(objectClass=User)
David Keith,修改在12 年前。

RE: LDAP Authentication not working

New Member 帖子: 13 加入日期: 11-1-6 最近的帖子
Hi Bruno,

Can you verify if the import has been performed successfully?

Login to your LP database and use your Liferay schema.
do a select * or a select count(*) from the User_ table.

If you don't see all of your LDAP users there, this is your problem.

Remember, LDAP users MUST be in the local Liferay database as well as being present in your LDAP repository.

Hope this helps,

-David
thumbnail
Bhupesh Nagda,修改在12 年前。

RE: LDAP Authentication not working

New Member 帖子: 4 加入日期: 12-3-16 最近的帖子
Hi,
I have a unique issue while authenticating the AD users in Liferay, they would be able to login for any password(text or number or special character) including their original password.
I am using Liferay 6.0.6 CE with MySQL database...Also the users are being imported in the User_ table which I cross checked.
I have added the patch provided by jonus => 'lps9000-ldap-ce6010-portal-impl-jdk5.jar' and it worked well with HSQL database, users were authenticating with their original password only.
I dont know where exactly is the issue,is it with MySQL?? emoticon can anyone please help??

==> portal-ext.properties


# MySQL
#jdbc.default.jndi.name=jdbc/LiferayPool
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost:3306/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=YES
schema.run.enabled=true
schema.run.minimal=true
plugin.repositories.trusted=http://plugins.liferay.com/official
users.reminder.queries.enabled=false
users.reminder.queries.custom.question.enabled=false
ldap.import.user.password.enabled=true
thumbnail
Bhupesh Nagda,修改在12 年前。

RE: LDAP Authentication not working

New Member 帖子: 4 加入日期: 12-3-16 最近的帖子
Can anyone here please help me??
Oliver Dudas,修改在11 年前。

RE: LDAP Authentication not working

New Member 发布: 1 加入日期: 12-3-29 最近的帖子
Hi, same problem here.

Liferay 6.0.5 CE
Oracle DB
Same patch

I'm able to login for any password emoticon
thumbnail
Jonas Yuan,修改在11 年前。

RE: LDAP Authentication not working

Liferay Master 帖子: 993 加入日期: 07-4-27 最近的帖子
@Bhupesh @Oliver,

Let me verify the same patch in MySQL and Oracle DB.

Thanks to report the issue.

Jonas Yuan
thumbnail
Jonas Yuan,修改在11 年前。

RE: LDAP Authentication not working

Liferay Master 帖子: 993 加入日期: 07-4-27 最近的帖子
The fix patch for 6.1 GA2 CE is ready.

Please drop an email to jonasliferay@gmail.com for the fix.

Thanks

Jonas Yuan
thumbnail
Jonas Yuan,修改在11 年前。

RE: LDAP Authentication not working

Liferay Master 帖子: 993 加入日期: 07-4-27 最近的帖子
Hi Oliver,

You may use 6.1 GA2 and the fix patch (see following post).

Thanks

Jonas
Dhiraj Minocha,修改在11 年前。

RE: LDAP Authentication not working

New Member 帖子: 2 加入日期: 12-11-16 最近的帖子
Hi Bruno,

I am also experiencing the same problem with my Ldap configuration.
In control panel the two checkboxes "import enabled" and "import on startup enabled" are ticked.
I have even checked the data base table User_ and I dont find my ldap users imported there.

Please help me with this.

Thanks
Dhiraj
thumbnail
Bruno Galvao,修改在11 年前。

RE: LDAP Authentication not working

Junior Member 帖子: 58 加入日期: 11-8-26 最近的帖子
Dhiraj Minocha:
Hi Bruno,

I am also experiencing the same problem with my Ldap configuration.
In control panel the two checkboxes "import enabled" and "import on startup enabled" are ticked.
I have even checked the data base table User_ and I dont find my ldap users imported there.

Please help me with this.

Thanks
Dhiraj


Hi Dhiraj,

I ended up having to write an SQL Job to pull in the users into a temporary Liferay table and from there I wrote a .NET program to call the API and add/remove/update users.

I published part of the .NET program on my blog: http://brunopgalvao.wordpress.com/

Best
Bruno
Dhiraj Minocha,修改在11 年前。

RE: LDAP Authentication not working

New Member 帖子: 2 加入日期: 12-11-16 最近的帖子
Thanks for the quick reply Bruno.
I figured out the problem, actually it was with Base DN setting.
Now my ldap users are getting imported to Liferay database, and can successfully login.

Best Regards,
Dhiraj
srujana k,修改在9 年前。

RE: LDAP Authentication not working

New Member 帖子: 3 加入日期: 14-5-7 最近的帖子
David H Nebinger:
If the account info is already imported in liferay's User_ table, why should I still need LDAP import enabled?


It will rebind to ldap using the credentials to ensure the account is still valid...

I don't think this is a bug; we want to do ldap authentication and part of that authentication includes ensuring the credentials are correct.

Otherwise LR imports you today but you are disabled in LDAP tonight; when you hit the box tomorrow w/o the LDAP bind, it would let you log in even though you should not be able to...


Hi David,

I'm using Liferay 6.2 CE GA2. I'm facing the same issue on my server.Few users are not able to log in. I tried debugging and found that the api is returning 'DNE' for the users who are not able to login. I've enabled the import, yet facing the same issue. I've restarted the server instance and checked, but nothing much happening.

Any suggestions?


Thank you.
thumbnail
Kenneth Dong,修改在12 年前。

RE: LDAP Authentication not working

New Member 帖子: 6 加入日期: 10-8-31 最近的帖子
Bruno Galvao:
LDAP Authentication has been enabled.
Test LDAP Connection returns successful.
Test LDAP Users returns with a list of users.
Test LDAP Groups is successful as well.

I sign out of Test@Liferay.com and try logging in as on of the users returned from "Test LDAP Users."
Authentication fails.

Liferay throws authentication fails very quickly as if it did not even check against Active Directory.

Any suggestions? Thanks!



Are you logging in via email or by screen name? Try setting it up to login by screen name.
David Keith,修改在12 年前。

RE: LDAP Authentication not working

New Member 帖子: 13 加入日期: 11-1-6 最近的帖子
Make sure you have LDAP Import on startup toggled on. (Control Panel settings Authentication LDAP)
Check the Users_ table in you DB schema for the presence of imported LDAP content.
This allows you to determine what's been imported without logging into liferay.
Alternatively, you can check the Users portlet in the Control Panel (logged in as an admin).

Liferay does not actually check against Active directory, it imports the data to a Liferay DB table (actually, several of them)
User_, Group_ being the most important.
thumbnail
Brij Mohan Kataria,修改在10 年前。

RE: LDAP Authentication not working

New Member 帖子: 10 加入日期: 13-5-20 最近的帖子
Dear All,

I have just Create my LDAP connection when i test connection the message is Liferay has successfully connected to the LDAP server. but when i Test LDAP Users the message is No users were found.

I also create user in LDAP server i attach my setting page and LDAP user image please help me.

Thanks in Advance !
thumbnail
Brij Mohan Kataria,修改在10 年前。

RE: LDAP Authentication not working

New Member 帖子: 10 加入日期: 13-5-20 最近的帖子
LDAP USER DETAILS ::::::::

ObjectClass : inetOrgPerson (structural)
ObjectClass : organizationalPerson (structural)
ObjectClass : person (structural)
ObjectClass : top (abstract)
cn : test
sn : test
uid : test
userPassword : test

Liferay LDAP Setting Page :::

Authentication Search Filter : (&objectCategory=Person)(mail=@email_address@)
Import Search Filter : (objectClass=InetOrgPerson)
Screen Name : test
Password :userPassword
Email Address : mail
Full Name :
First Name : test
Last Name : test
Job Title : title
Portrait :
Group :
UUID:
thumbnail
Brij Mohan Kataria,修改在10 年前。

RE: LDAP Authentication not working

New Member 帖子: 10 加入日期: 13-5-20 最近的帖子
Password :test