User LDAP filter

Hello,

when I type this

ldapsearch -x -D “cn=admin,dc=cs,dc=tu-dortmund,dc=de” -y /usr/local
/share/uadmd/conf.d/pwd.conf “(memberOf=cn=group1,ou=groups,dc=cs,dc=tu-d
ortmund,dc=de)”

on the command line of my OpenLDAP server, it lists the users belonging to group group1.

But when I type

(memberOf=cn=group1,ou=groups,dc=cs,dc=tu-d
ortmund,dc=de)

in keycloak’s field “User LDAP filter” of User federation LDAP Provider, keycloak finds no users. Without a User LDAP filter, everything works fine, all LDAP users are found.

What is wrong here?

Regards
Christoph

So, I have a clause that is obviously accepted by my LDAP server as a valid filter expression, and none of the developers is able to say something about why this does not work in Keycloak? After two weeks?

Who do you mean with „the developers“?
This is a community forum, there‘s only little to no chance that the Keycloak team itself reads and comments here!

1 Like

Well, it seems that besides #keycloak-dev at slack, all help regarding the use of keycloak occurs in community forums, but as a question like mine neither has to do with keycloak development design discussions nor necessarily describes a bug, maybe it would be a good idea for the developers to have a look at the community forums now and then.

@Cistoge The Keycloak maintainers generally watch the GitHub issues Issues · keycloak/keycloak · GitHub even if it does take some time for new issues to get triaged. If you believe you’ve found a bug, the best place to start is by filing an issue there. For that, you’ll need:

  • Description of the bug
  • Keycloak version
  • Expected behavior
  • Actual behavior
  • How to reproduce

I’ve also found that trying several variations, and trying (and citing) any other references you found of similar problems is a good way to get a bug reviewed, and eventually fixed.

Regarding tone, I found your message here and on the mailing list rather amusing. I can’t imagine a world where speaking or writing to people as you have will produce the outcome you’re hoping for. Whether you’re writing to colleagues or volunteers, your best bet is to be clear, positive, and constructive. Maybe you could demonstrate that you have done some work in those two (or was it “almost four”?) weeks to try and solve the issue, and add that context to your post. Taking the tactic of harassing and trying to embarrass others is the equivalent of Veruca Salt demanding a pony from daddy.

If it is two or four weeks depends on when I posted my original question to the respective discussion forum, in the mailing list it was end of December and in Slack, Discourse and Github it was about two weeks later because after there was no answer in the mailing list, I expected that at least in one of the three other groups some competent person would recognize my message and care for the problem.

Yes, probably my tone was not useful for reaching the goal of getting a helpful answer, but in my opinion a non-reaction within four weeks is also not very friendly. In know that Keycloak is a costless project with probably many volunteer developers, but if at work a colleague or a client had asked a similar question, I would get a much harder reaction already after two days of non-responding.