1 package com.atlassian.user.impl.ldap.properties;
2
3 import javax.naming.Context;
4 import javax.naming.spi.InitialContextFactory;
5
6 /**
7 * An interface for providing connection properties for connecting to an LDAP server via JNDI
8 */
9 public interface LdapConnectionProperties
10 {
11 /**
12 * @return the user to be used for authenticating to the LDAP server
13 * @see Context#SECURITY_PRINCIPAL
14 */
15 String getSecurityPrincipal();
16
17 /**
18 * @return the password to be used for authenticating to the LDAP server
19 * @see Context#SECURITY_CREDENTIALS
20 */
21 String getSecurityCredential();
22
23 /**
24 * @return the URL of the LDAP server to connect to, typically in the form 'ldap://host:port'
25 * @see Context#PROVIDER_URL
26 */
27 String getProviderURL();
28
29 /**
30 * @return the fully-qualified class name of the JNDI {@link InitialContextFactory} to use for opening the
31 * connection
32 * @see Context#INITIAL_CONTEXT_FACTORY
33 */
34 String getJNDIInitialContextFactoryIdentifier();
35
36 /**
37 * @return the batch size used for search results returned from the LDAP server
38 * @see Context#BATCHSIZE
39 */
40 int getSearchBatchSize();
41
42 /**
43 * @return the type of security to use for authentication, for example "simple"
44 * @see Context#SECURITY_AUTHENTICATION
45 */
46 String getSecurityAuthentication();
47
48 /**
49 * @return the type of security to use for the LDAP connection, for example "ssl"
50 * @see Context#SECURITY_PROTOCOL
51 */
52 String getSecurityProtocol();
53
54 /**
55 * @return <code>true</code> if LDAP connection pooling is enabled, otherwise <code>false</code>.
56 */
57 boolean isPoolingOn();
58
59 /**
60 * @return the time limit in milliseconds to be used when connecting to the LDAP server
61 */
62 int getConnectTimeoutMillis();
63
64 /**
65 * @return the time limit in milliseconds to be used when reading data from the LDAP server
66 */
67 int getReadTimeoutMillis();
68 }