Package org.nuxeo.ecm.directory.ldap
Class LDAPServerDescriptor
- java.lang.Object
-
- org.nuxeo.ecm.directory.ldap.LDAPServerDescriptor
-
public class LDAPServerDescriptor extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
LDAPServerDescriptor.LdapEntry
Common internal interface for Ldap entriesprotected class
LDAPServerDescriptor.LdapEntryDescriptor
Server URL implementation ofLDAPServerDescriptor.LdapEntry
protected class
LDAPServerDescriptor.LdapEntryDomain
Domain implementation ofLDAPServerDescriptor.LdapEntry
using DNS SRV record
-
Field Summary
Fields Modifier and Type Field Description String
bindDn
String
bindPassword
int
connectionTimeout
protected boolean
isDynamicServerList
protected static String
LDAP_SCHEME
protected LinkedHashSet<LDAPServerDescriptor.LdapEntry>
ldapEntries
protected static String
LDAPS_SCHEME
String
ldapUrls
static Log
log
String
name
boolean
poolingEnabled
protected int
poolingTimeout
int
retries
protected DNSServiceResolver
srvResolver
protected boolean
useSsl
boolean
verifyServerCert
-
Constructor Summary
Constructors Constructor Description LDAPServerDescriptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
convertDNtoFQDN(String dn)
Convert domain from the ldap form dc=nuxeo,dc=org to the DNS domain name form nuxeo.orgprotected List<String>
discoverLdapServers(String domain, boolean useSsl, String srvPrefix)
Retrieve server URLs from DNS SRV recordString
getBindDn()
String
getBindPassword()
int
getConnectionTimeout()
String
getLdapUrls()
String
getName()
int
getPoolingTimeout()
int
getRetries()
protected DNSServiceResolver
getSRVResolver()
boolean
isDynamicServerList()
boolean
isPoolingEnabled()
boolean
isVerifyServerCert()
void
setBindDn(String bindDn)
void
setBindPassword(String bindPassword)
void
setConnectionTimeout(int connectionTimeout)
void
setLdapUrls(LDAPUrlDescriptor[] ldapUrls)
boolean
useSsl()
Whether this server descriptor defines a secure ldap connection
-
-
-
Field Detail
-
log
public static final Log log
-
LDAPS_SCHEME
protected static final String LDAPS_SCHEME
- See Also:
- Constant Field Values
-
LDAP_SCHEME
protected static final String LDAP_SCHEME
- See Also:
- Constant Field Values
-
name
public String name
-
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
-
ldapEntries
protected LinkedHashSet<LDAPServerDescriptor.LdapEntry> ldapEntries
-
isDynamicServerList
protected boolean isDynamicServerList
-
useSsl
protected boolean useSsl
-
srvResolver
protected final DNSServiceResolver srvResolver
-
bindPassword
public String bindPassword
-
-
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()
-
setLdapUrls
public void setLdapUrls(LDAPUrlDescriptor[] ldapUrls)
-
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 queryuseSsl
- 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)
-
getSRVResolver
protected DNSServiceResolver getSRVResolver()
-
getRetries
public int getRetries()
- Since:
- 5.7
-
-