Filter for subsearches

Open
#756 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go, postgresql

Research direction

Reproduce the supplied ldap2pg.yml configuration and inspect the LDAP join/subsearch handling that produces the shown debug command. Compare the generated subsearch with the requested '(objectClass=User)' filter; done means the filter is applied to the subsearch and the behavior is covered by an appropriate test.

Written by the indexing model from the issue text.

Description

Hello

I want to filter only users for subsearches. But the filter is not applied.

ldap2pg.yml

  • ldap2pg.yml
  - description: "Search LDAP"
    ldapsearch:
      base: CN=pg_userdb,OU=Groups,DC=example,DC=com
      filter: '(objectClass=Group)'
      scope: sub
      joins:
        member:
          scope: base
          filter: '(objectClass=User)'
      on_unexpected_dn: fail

Expectations

In debug mode, I see subsearch

cmd="ldapsearch -H ldaps://ldap1.example.com -l 30 -Y DIGEST-MD5 -U ldapusr1 -b 'CN=Role PostgreSQL Superusers,OU=DB Team,OU=Groups,DC=example,DC=com' ' -s sub '(objectClass=*)' sAMAccountName"

Why is the filter '(objectClass=User)' not applied to the subsearch?
How can I specify a filter for a subsearch?

Dominant language
Go
Stars
236
Forks
34
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dalibo/ldap2pg

All issues in dalibo/ldap2pg

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.