Open Closed

Use standard login when LDAP connection fails. #7930


0
SASIMEXICO created

We've recently enabled LDAP for our application, the current scenario is as follows:

  1. Multi Tenant.
  2. Some tenants use ldap (some don't)

Everything seems to work fine, so far, but when a tenant has it's ldap server down (for whatever reason) every login fails for the obvious reason (log extract below):

System.DirectoryServices.AccountManagement.PrincipalServerDownException: The server could not be contacted. ---> System.DirectoryServices.Protocols.LdapException: The LDAP server is unavailable.

It makes sense, hoewever, we'd like the users to be able to login, or at least the admin account (wich is not from LDAP). But currently they all fail.

Is there a solution for this? We could check the server status before stablishing a connection and work according to that, but we're wondering if there's an intended way of doing this


2 Answer(s)
  • 0
    SASIMEXICO created

    Solved by hardcoding a failover measure on a custom implementation of LdapAuthenticationSource::CreatePrincipalContext

  • 0
    fguo created

    We encounter the same situation. Can you show me how you hardcoded to solve it?

    Thanks!