[teiid-issues] [JBoss JIRA] (TEIID-3411) LDAP translator and multi-valued arrays

Steven Hawkins (JIRA) issues at jboss.org
Thu Jun 11 11:14:03 EDT 2015


    [ https://issues.jboss.org/browse/TEIID-3411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13077612#comment-13077612 ] 

Steven Hawkins commented on TEIID-3411:
---------------------------------------

The feature is complete on the ldap-multi-value branch.  The translator property has been removed and all behavior will be driven by extension metadata.  There are two new engine level constructs and 3 new ldap extension properties.  This work will be pulled into 8.12 as it was too late for 8.11.

Here's an example of the usage:

{code}
CREATE foreign table users (username string primary key options (nameinsource 'cn'), surname string options (nameinsource 'sn'), ...) options (nameinsource 'ou=users,dc=example,dc=com');
CREATE foreign table groups (groupname string primary key options (nameinsource 'cn'), description string, ...) options (nameinsource 'ou=groups,dc=example,dc=com');
CREATE foreign table membership (username string options (nameinsource 'cn'), groupname options (nameinsource 'memberOf', SEARCHABLE 'equality_only', "teiid_rel:partial_filter" true, "teiid_ldap:unwrap" true, "teiid_ldap:dn_prefix" 'ou=groups,dc=example,dc=com', "teiid_ldap:rdn_type" 'cn'), foreign key (username) references users (username), foreign key (groupname) references groups (groupname)) options (nameinsource 'ou=users,dc=example,dc=com');
{code}

Inner join support would be allowed between users and membership.

SEARCHABLE 'equality_only' - indicates that only equality predicates should be pushed down.  Needed for openldap and apacheds as dn attributes have search restrictions, may not be needed by others.
"teiid_rel:partial_filter" true - indicates to the engine that if a predicate is pushed down and the value is projected out that it may contain more entries than expected and the relevant predicates need re-evaluated in the engine.
"teiid_ldap:unwrap" true - indicates to the ldap translator that the multivalued attribute should be expanded into multiple rows

To us rdn values, rather than dn for keys there are also the properties:
"teiid_ldap:rdn_type" 'cn' - indicates the rdn to extract.  If the entry suffix does not match this rdn type, then no row will be produced.
"teiid_ldap:dn_prefix" 'ou=groups,dc=example,dc=com' - if rdn_type is specified, this indicates that the values should match this prefix, no row will be produced for a non-matching entry

These latter two properties may need some refinement in their implementation as we're simply using the LdapName class for the value parsing, which may be unnecessarily heavy weight.

As for backporting, I will try to squash these into a single commit for the merge to master, or you can just take the original commit 6a3de7f and the two commits on the branch.


> LDAP translator and multi-valued arrays
> ---------------------------------------
>
>                 Key: TEIID-3411
>                 URL: https://issues.jboss.org/browse/TEIID-3411
>             Project: Teiid
>          Issue Type: Feature Request
>          Components: LDAP Connector
>            Reporter: Debbie Steigner
>            Assignee: Steven Hawkins
>             Fix For: 8.12
>
>
> The problem is with how multi-valued attribute from the LDAP response is handled. They don't want to have the data mapped to an array or multivalued-concat and then transformed into another table to get the unique values. There is an issue with the translator as it should handle multivalued attribute, by simply creating multiple rows for each value of the multivalued attribute.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the teiid-issues mailing list