[Date Prev][Date Next] [Chronological] [Thread] [Top]

Need to authenticate non-existent users.



Hi everyone,

 

   I'm faced with an interesting problem.

 

   I'm using OpenLDAP to authenticate users.  For reasons I won't go
into much detail about, I need to make OpenLDAP return objects, that do
not exist, as if they did.

 

   For example, if I do a query with the following search filter:
(&(objectClass=person)(uid=foobar)) I need to make OpenLDAP return a
LDAP result with the attributes and values from the search filter if the
directory returns 0 matches.  If, on the other hand, the object does
exist, it would return the object from the directory.

 

Currently I'm using back-sql as the back-end.

 

My resolution was to either modify the backsql_srch_query function to
use a stored procedure, which could return the required result from the
given parameter to make it look like the user exists in the database or
use back-perl, which would enable me to intercept the request on it's
way to the SQL database.

 

I'd like to know if anyone has any good ideas to make OpenLDAP function
like I've described.

 

 

Thanks in advance,

   Sigurbjartur Helgason