# Too many LDAP user federation connections

**URL:** <https://forum.keycloak.org/t/too-many-ldap-user-federation-connections/16005>\
**Category:** Getting advice\
**Tags:** user-federation, ldap\
**Created:** [June 15, 2022, 7:48pm UTC](https://forum.keycloak.org/t/too-many-ldap-user-federation-connections/16005 "2022-06-15T19:48:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![karl](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@karl](https://forum.keycloak.org/u/karl)\
**Post date:** [June 15, 2022, 7:48pm UTC](https://forum.keycloak.org/t/too-many-ldap-user-federation-connections/16005/1 "2022-06-15T19:48:00Z")

</div>

Hi,

we are using user federation with an LDAP user storage provider. This has `Periodic Full sync` enabled and `Use Kerberos for Password Authentication` active.

I assumed that Keycloak would then get most data from the (database) storage and **not** go to LDAP. Not even for passwords, as we have Kerberos enabled here and active in the authentication flow for the browser.  
However, there is very frequent LDAP communication.  
Why is that? Can we get Keycloak to primarily use the database and Kerberos for password authentication and _not_ use LDAP outside of scheduled synchs?

Any hints are appreciated.

Thanks, Karl

---

<div class="post-metadata">

**Author:** ![karl](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@karl](https://forum.keycloak.org/u/karl)\
**Post date:** [July 21, 2022, 7:16am UTC](https://forum.keycloak.org/t/too-many-ldap-user-federation-connections/16005/2 "2022-07-21T07:16:18Z")

</div>

It turned out that those LDAP queries were because of a bunch of group mappers, which were set to mode=read\_only and strategy=load\_groups\_by\_member\_attribute (those are the default values, at least in keycloak 9.0.3.

---

<div class="post-metadata">

**Author:** ![karl](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@karl](https://forum.keycloak.org/u/karl)\
**Post date:** [July 21, 2022, 7:22am UTC](https://forum.keycloak.org/t/too-many-ldap-user-federation-connections/16005/3 "2022-07-21T07:22:10Z")

</div>

also, current ideas are to

1. size down to just 1 group mapper with extended filter expression
2. switch to mode=import
3. switch to strategy=_memberof_  
jfyi
