change username attribute from uid?

rpeterso.mtholyoke.edu's picture
Hi, I'm setting up to use OpenLDAP as my external provider. My user objects use 'cn' rather than 'uid' as the username attribute. How can I configure this? I see there is a 'User Pattern' configuration parameter, which looks promising, but nothing I put there appears to affect the queries being logged by my ldap server. TIA
rpeterso.mtholyoke.edu's picture

LDAPUserStoreReader.java is

LDAPUserStoreReader.java is the problem. It hardcodes that accounts are objectClass=person. There are also numerous comments about complying with RFC 1274. That's all well and good if you use that particular schema, but many LDAP user databases use other schemas, so hardcoding a filter like (&(objectClass=person)(uid=" + userName + ")) will not work. Better to let the filter and username attribute be user defined.
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)