Gossamer Forum
Quote Reply
Need LDAP authentication
I'm setting up a LSQL site within a corporate environment where we already have LDAP for authentication. It therefore seems pointless to ask people to sign up to my site, and specify a password, when we already have a database of usernames and passwords against which I could authenticate.

Has anyone here done any work on Links SQL and LDAP?

Rob.
Quote Reply
Re: [RobSchifreen] Need LDAP authentication In reply to
Unsure Bump
Quote Reply
Re: [Smoky] Need LDAP authentication In reply to
Sorry? Is that a yes or a no?
Quote Reply
Re: [RobSchifreen] Need LDAP authentication In reply to
It's neither - a bump is just a way to bring a conversation that has died back to life hopefully bringing it to someone's attention.

I also am interested in Links SQL using LDAP for authentication.

Thanks
Quote Reply
Re: [Smoky] Need LDAP authentication In reply to
Ah, right. It's not something we say in the UK, where I'm based!

Still no joy in finding anything here. I have some working PHP code which works on my servers to check a username/password via LDAP. But I'm not sure how I'd go about integrating it with Links SQL. I know what needs doing, but it's a lot of work and I don't really know whether it would work. Also, the code would really need converting to Perl and I don't know the language well enough.

My plan would be:

Rewrite the login screen. Instead of using the Links SQL one, use a custom one which asks for the username and password and then checks it against LDAP. If it's valid, look up the username and password in the Links SQL users table. If the username exists, log the person in. If the username doesn't exist, create the user record in the table (write a dummy password to the database rather than the real one) and then log the user in.

It would work, but really needs doing in Perl. I don't have PerlDAP on my server right now, and I don't think you can call the Perl code for creating users etc via PHP. I will investigate it at some point, though, cos it would really help my current project.

Rob
Quote Reply
Re: [RobSchifreen] Need LDAP authentication In reply to
I'm currently working on a module integrafing Ldap into LSQL.
This new module will allow user authentication and a bit more:
the goal is to keep up-to-date either ldap and Lsql database.
For example, if you change your address or your telephone number in Lsql or whatever this module will keep syncronized Lsql and ldap data. Either if a user authenticates on ldap but is not known as c4sql member, a routine will import all datas using a translation table. Other nice fuctions as ldap import/export are on the way.

Right now I'm on 50% of the job.

Now the bad thing: This module is far LSQL IN-compatible.
During last 3 years I did modify LSQL sooo much creating a custom CMS for my needs and it's almost impossible for me to create something 100% Lsql compilant. Bytheway the code is very clear and understandable: basically it's an object built around Net::LDAP

So, if someone is interesed and would like to contribute on this project I'll very happy to share the code.

cheers

lepo
Lepo
Quote Reply
Re: [Lepo75] Need LDAP authentication In reply to
Hi Lepo,

I'd be happy to take a look at your code. As I said, I'm no Perl expert but would be very interested to see what you've done so far and possibly to try making something that works with a standard Links SQL installation.

You can send it to me at r.schifreen at brighton dot ac dot uk which is where I work. The ac.uk bit is the UK's version of .edu, in case you are wondering!

Robert
Quote Reply
Re: [RobSchifreen] Need LDAP authentication In reply to
sure!
let me know if you have some questions or want to contribute
Smile

cheers

lepo
Lepo