Class LDAPServerDescriptor


  • public class LDAPServerDescriptor
    extends Object
    • Field Detail

      • log

        public static final Log log
      • ldapUrls

        public String ldapUrls
      • bindDn

        public String bindDn
      • connectionTimeout

        public int connectionTimeout
      • poolingEnabled

        public boolean poolingEnabled
      • verifyServerCert

        public boolean verifyServerCert
      • retries

        public int retries
        Since:
        5.7
      • poolingTimeout

        protected int poolingTimeout
        Since:
        10.2
      • isDynamicServerList

        protected boolean isDynamicServerList
      • useSsl

        protected boolean useSsl
      • bindPassword

        public String bindPassword
    • Constructor Detail

      • LDAPServerDescriptor

        public LDAPServerDescriptor()
    • Method Detail

      • isDynamicServerList

        public boolean isDynamicServerList()
      • getName

        public String getName()
      • setBindDn

        public void setBindDn​(String bindDn)
      • getBindDn

        public String getBindDn()
      • setBindPassword

        public void setBindPassword​(String bindPassword)
      • getBindPassword

        public String getBindPassword()
      • getLdapUrls

        public String getLdapUrls()
      • useSsl

        public boolean useSsl()
        Whether this server descriptor defines a secure ldap connection
      • discoverLdapServers

        protected List<String> discoverLdapServers​(String domain,
                                                   boolean useSsl,
                                                   String srvPrefix)
                                            throws NamingException
        Retrieve server URLs from DNS SRV record
        Parameters:
        domain - The domain to query
        useSsl - Whether the connection to this domain should be secure
        Returns:
        List of servers or empty list
        Throws:
        NamingException - if DNS lookup fails
      • convertDNtoFQDN

        protected String convertDNtoFQDN​(String dn)
        Convert domain from the ldap form dc=nuxeo,dc=org to the DNS domain name form nuxeo.org
        Parameters:
        dn - base DN of the domain
        Returns:
        the FQDN or null is DN is not matching the expected structure
      • isPoolingEnabled

        public boolean isPoolingEnabled()
      • isVerifyServerCert

        public boolean isVerifyServerCert()
      • getConnectionTimeout

        public int getConnectionTimeout()
      • getPoolingTimeout

        public int getPoolingTimeout()
        Since:
        10.2
      • setConnectionTimeout

        public void setConnectionTimeout​(int connectionTimeout)
      • getRetries

        public int getRetries()
        Since:
        5.7