[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Postgres and Attributes
- To: openldap-technical@openldap.org
- Subject: Postgres and Attributes
- From: Mark Murawski <markm-lists@intellasoft.net>
- Date: Fri, 22 Nov 2019 16:55:12 -0500
- Content-language: en-US
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=intellasoft.net; s=20190502; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:To:References:Subject:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=wBGFbOcif+c/XwtZMlXCXy1o1TsQR08nvfvLzC68bjM=; b=QMco2JN12L9uqH2KDx790hyQ9J IuosvqOshNO5sqjBXozHQenzBnKtcFbkCx2Js13xK2o0IbryJdqelFmtxC59o5VGNzCVohAZSen+U zSZXqUoiB/8P79wfai9Yhpagej0+oxXMJAZIfFGgKATpEriYzm+ZCWhD9akVHxfNRObXFKIjnQik6 2cTKX9GVbdT29ZIbDNoXDgErHh7380Vsaq+hH0VovOUZQG5t+7yvUX1QZKn89EGVZb0aMw26jnO9/ jgaIMbr52yNn1pEiF6TZ6HvXfyAn1dGLWgLBkocWNdKTKqTB5h7vfreVvwv4OsJAtE4UyQxFgWGEU NBXCXsLA==;
- In-reply-to: <d4bd71dc-f840-f12a-c78b-1c2068310604@intellasoft.net>
- References: <d4bd71dc-f840-f12a-c78b-1c2068310604@intellasoft.net>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2
Hi!
Attachments:
www.kobaz.net/misc/slapd.zip
www.kobaz.net/misc/ldap.sql
www.kobaz.net/misc/attributes.png
Disclaimer: Let me first start out saying that this isn't my first run
around the block. I understand that this is experimental and I accept
the risks and issues that might come with back-sql.
I started with the backend examples located in:
servers/slapd/back-sql/rdbms_depend/pgsql
... and then started adding support for things like organizationUnit
that are not included in the test db
Attached is my ldap postgres database.
Attached is my ldap /etc/ldap/slapd
I'm aware that passwords/etc are in there, but it's not a big deal. It's
just testing stuff on an internal system.
The issue I'm having:
- Attributes are not coming back when requesting ldap information or
doing ldap search (Screenshot)
Also noted is that the sample inetOrgPerson entries do not show any
attributes like surname, despite them being stored in the postgres
database in what looks like the correct format (exactly the same as the
test db import)
-- The organizationUnit has been added like this:
1-users-ou.ldif
-----
dn: ou=users,dc=directory, dc=pbx, dc=local
ou: users
description: holds users of the directory
objectClass: organizationalUnit
-----
ldapadd -x -D "cn=admin,dc=directory, dc=pbx, dc=local" -w 'asdf' -v -f
1-users-ou.ldif
Despite having specified 'description', this has not been added to the
database as shown in the export. The organizational_unit table looks
like this:
id | ou | description
----+----+-------------
1 | |
Looking at the postgres query logs, slapd has made no attempt whatsoever
to set the description field, despite this field being mapped in the
attributes as shown in the export. Also here for quick reference:
Table: ldap_attr_mappings
-[ RECORD 16 ]+
id | 20
oc_map_id | 5
name | description
sel_expr | organizational_unit.description
sel_expr_u |
from_tbls | organizational_unit
join_where |
add_proc | UPDATE organizational_unit SET description=? WHERE id=?
delete_proc | SELECT 1 FROM organizational_unit WHERE ou = ? AND ID=?
param_order | 3
expect_return | 0
Can someone shed some light on what's wrong here?