Hi, While exploring the OpenLDAP's backend-sql package, I found below behavior.
The ldap_oc_mappings expects the keycol to be of type integer. For example, if I change the datatype of the identifier (id) of persons table to of type varchar then I am not able to retrieve the persons record during LDAP requests. However, if the column "id" is of type Integer then I am able to view the persons record as part of LDAP search requests.
insert into ldap_oc_mappings (id,name,keytbl,keycol,create_proc,delete_proc,expect_return) values (2,'inetOrgPerson','persons','id',NULL,NULL,0);
insert into persons (id,name,surname,password) values ('a21qec','Mitya','Kovalev','mit');
Question: 1) Is my observation correct? i.e the keycol used to map the LDAP entries to SQL data expects the primary key (id) to be of type integer. 2) If #1 is correct, do we have a way to support VARCHAR datatype for the primary key? In my application, we use GUID (alpha-numeric characters) as the primary key.
Please advise.
Thanks Param
--On Sunday, December 16, 2018 12:23 AM +0000 "Thangavel, Parameswaran" Parameswaran.Thangavel@rsa.com wrote:
Question:
- Is my observation correct? i.e the keycol used to map the LDAP entries
to SQL data expects the primary key (id) to be of type integer.
- If #1 is correct, do we have a way to support VARCHAR datatype for the
primary key? In my application, we use GUID (alpha-numeric characters) as the primary key.
Hi,
back-sql, as noted in the man page, is experimental. It is also unmaintained and known to have various issues. It generally needs someone who has interest in it to start supporting it. So YMMV on what you can and cannot do. It's generally better to use a supported native backend.
--Quanah
--
Quanah Gibson-Mount Product Architect Symas Corporation Packaged, certified, and supported LDAP solutions powered by OpenLDAP: http://www.symas.com
openldap-technical@openldap.org