Mapping LDAP attributes to fields

Created on 10 August 2023, over 1 year ago

Problem/Motivation

This might be a noob question. When I create a feed type using the LDAP Query fetcher and select my query. None of the LDAP attributes are listed as a source when I'm trying to map to my node fields. Only Feed entity items appear in the source list eg. Feed: Authored by

I added a feed type.
Fetcher: LDAP Query Fetcher.
Parser LDAP Entry
Processor: Node
Content Type: (Custom Content type with fields)

When I test the LDAP query from /admin/config/people/ldap/query/my_ad_sync/test I can see results and attribute columns. I'm unsure how to get them to appear in the feed type mappings.

Any pointers would be appreciated.

💬 Support request
Status

Active

Version

4.0

Component

Miscellaneous

Created by

🇦🇺Australia neubreed

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @neubreed
  • 🇦🇺Australia neubreed

    In addition to the above, I set up and import feed. When I run that I get this error: "The feed became locked before the import could begin." There's nothing in the logs with a better explanation and I have all logging / debugging turned on where I could find the option to.

  • 🇨🇦Canada dylan donkersgoed London, Ontario

    This might be a noob question. When I create a feed type using the LDAP Query fetcher and select my query. None of the LDAP attributes are listed as a source when I'm trying to map to my node fields. Only Feed entity items appear in the source list eg. Feed: Authored by

    The fetcher doesn't automatically discover LDAP attributes, you need to manually enter the LDAP attribute name. In the same dropdown with "Feed: Authored by" there should be an option for a custom source. I don't recall off the top of my head exactly what it's called but I believe it's separated from the others toward the bottom of the dropdown.

    As for why your feed is locking up it's hard to say without more details. I might be able to take a look if you can attach some configuration (the LDAP server, query, and feeds configuration or just an entire test database) that replicates the issue. You can use a public test LDAP server like the one from https://www.forumsys.com/2022/05/10/online-ldap-test-server/.

  • 🇦🇺Australia neubreed

    Thanks Dylan.

    I appreciate you getting back to me so quickly.

    By custom source do you mean New Blank source...? See the below pic of available options when selecting a source

    https://i.imgur.com/PI2XcMJ.png

    I've tried adding blank sources with matching attribute names (lowercase) But the feed returns the same error "The feed became locked before the import could begin." No entries in watchdog. Ultimate Cron has no errors etc

    The query is working when I test it via /admin/config/people/ldap/query/my_ad_sync/test

    The query settings

    https://i.imgur.com/AaD7Bco.png

    Server settings (? replaces sensitive info):

    uuid: ??
    langcode: en
    status: true
    dependencies: {  }
    id: ad_profile_sync
    label: 'Ad profiles sync'
    type: default
    address: ?.?.?.?
    port: ???
    timeout: 30
    encryption: ssl
    weight: null
    bind_method: service_account
    binddn: 'CN=???,OU=Service Accounts,OU=Tier2,OU=Admin,DC=??,DC=????'
    bindpw: '*******'
    based:
      - 'DC=??,DC=??'
    user_attr: mail
    account_name_attr: ''
    mail_attr: ''
    mail_template: mail
    picture_attr: ''
    unique_persistent_attr: cn
    unique_persistent_attr_binary: false
    user_dn_expression: 'dc=??,dc=????'
    testing_drupal_username: srv_gce_ad_drupal_p
    testing_drupal_user_dn: 'CN=??????,OU=Service Accounts,OU=Tier2,OU=Admin,DC=??,DC=??'
    grp_unused: false
    grp_object_cat: ''
    grp_nested: false
    grp_user_memb_attr_exists: false
    grp_user_memb_attr: ''
    grp_memb_attr: ''
    grp_memb_attr_match_user_attr: ''
    grp_derive_from_dn: true
    grp_derive_from_dn_attr: dc
    grp_test_grp_dn: ''
    grp_test_grp_dn_writeable: ''
    
  • 🇦🇺Australia neubreed

    Hi Dylan Okay .. I finally discovered a PHP error that could possibly (most likely) be stopping the import:

    PHP Fatal error:  Class Drupal\feeds_ldap\Feeds\Result\QueryFetcherResult contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Drupal\feeds\Result\FetcherResultInterface::cleanUp) in /home/my-sharing/public_html/web/modules/contrib/feeds_ldap/src/Feeds/Result/QueryFetcherResult.php on line 10
    

    I'm using PHP 8.1

  • 🇩🇪Germany fox_01

    Got the same error as described in #5

  • Status changed to RTBC about 2 months ago
Production build 0.71.5 2024