jellyfin-plugin-ldapauth icon indicating copy to clipboard operation
jellyfin-plugin-ldapauth copied to clipboard

[Enhancement] Redundant servers / SRV record lookup

Open nroach44 opened this issue 3 years ago • 2 comments

Along the same vein as #20 - I've tried supplying a secondary server in the form as "server1.domain server2.domain", but that fails with:

LdapException: Unable to connect to server server1.domain server2.domain:636 (91) Connect Error System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (00000005, 0xFFFDFFFF): Name or service not known

Could support for SRV lookups be added? This would mean that jellyfin does the following:

  • Look up _ldap.tcp.$DOMAIN SRV
  • Query one of the servers returned, if that fails, try the next one.

The SRV records are automatically handled by FreeIPA and Windows AD DS to be an up-to-date list of domain controllers in the closest subnet as the requester, and should return data like this:

_ldap._tcp.$DOMAIN. 86400 IN CNAME _ldap._tcp.$SITE._locations.$DOMAIN. _ldap._tcp.$SITE._locations.$DOMAIN. 86400 IN SRV 0 100 389 $SERVER1.$DOMAIN. _ldap._tcp.$SITE._locations.$DOMAIN. 86400 IN SRV 0 100 389 $SERVER2.$DOMAIN.

For more info on it from the Windows AD DS side: https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/how-domain-controllers-are-located

nroach44 avatar Jun 27 '21 08:06 nroach44