Skip to main content
Skip table of contents

LDAP Connector

The LDAP connector, known by the type name ldap, exposes an LDAP directory tree relationally with pushdown support for filtering via criteria. This is typically coupled with the LDAP resource adapter.

Connector Configuration

Metadata

Before issuing queries to LDAP, configure a connection using the SYSADMIN.createConnection() procedure:

SQL
CALL SYSADMIN.createConnection( name => 'ldapalias', jbossCLITemplateName => 'ldap', connectionOrResourceAdapterProperties => 'host=<host>,port=<port>,user-dn="cn\=<cn>,ou\=<ou>,dc\=<dc>",password=<password>,timeout=-1' ) ;;
CALL SYSADMIN.createDatasource( name => 'ldapalias', translator => 'ldap', modelProperties => 'importer.userFullSchemaName=false', translatorProperties => 'SupportsNativeQueries=TRUE' ) ;;

Execution Properties

Property name

Description

Default value

SearchDefaultBaseDN

Default base DN for LDAP searches

null

SearchDefaultScope

Default scope for LDAP searches. Can have one of the following values: SUBTREE_SCOPE, OBJECT_SCOPE, ONELEVEL_SCOPE

ONELEVEL_SCOPE

RestrictToObjectClass

Restricts searches to objectClass named in the Name field for a table

FALSE

UsePagination

Uses PagedResultsControl to page through large results. This is not supported by all directory servers

FALSE

ExceptionOnSizeLimitExceeded

If set to TRUE, throws an exception when a SizeLimitExceededException is received and a LIMIT is not properly enforced

FALSE

There are no import settings for the LDAP connector; it also does not provide metadata.

Metadata Directives

String columns with a default value of multivalued-concat will concatenate all attribute values together in alphabetical order using a ? delimiter. If a multivalued attribute does not have a default value of multivalued-concat, then any value may be returned.

Using <ldap_connector>.native Procedure

Here is an example showing the usage of the <ldap_connector>.native procedure:

SQL
SELECT x.*
FROM 
 (
  CALL "ldap_src.native"
      ( 
    "request" => 
        'search;
        context-name=OU=dvroles,DC=mydomain,DC=local;
        filter=(objectClass=*);
        count-limit=100;
        timeout=6;
        search-scope=ONELEVEL_SCOPE;
        attributes=uid,cn' 
      )
  ) r
  , ARRAYTABLE(r.tuple COLUMNS col1 string, col2 string) x
;;
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.