Note
In a future release, we will cache/maintain the user DN within the the Derby database or system to avoid the initial lookup. Also note that LDAP search/retrieval operations are usually very fast. The default LDAP url is ldap:/// (ldap://localhost:389/)
org.apache.derby.authentication.UserAuthenticator
| Modifier and Type | Field and Description |
|---|---|
| private static final String[] | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private String | |
| private String | |
| private String | |
| private String | |
| private String | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | authenticateUser(String
The user's name used to connect to JBMS system userName, String The user's password used to connect to JBMS system userPassword, String The database which the user wants to connect to. databaseName, Properties Additional jdbc connection info. info)Implements org. Authenticate the passed-in user's credentials. |
| protected String | Returns: String the escaped/encoded resultstring to escape according to RFC 2254 guidelines inString)Given an LDAP search string, returns the string with certain characters escaped according to RFC 2254 guidelines. |
| private String | |
| private DirContext | Returns: an initial DirContext using the supplied environment.environment used to create the initial DirContext. Null indicates an empty environment. env)Call new InitialDirContext in a privilege block |
| protected void | setJNDIProviderProperties()
Implements abstract org. This method basically tests and sets default/expected JNDI properties for the JNDI provider scheme (here it is LDAP). |
| attrDN | back to summary |
|---|---|
| private static final String[] attrDN | |
| dfltLDAPURL | back to summary |
|---|---|
| private static final String dfltLDAPURL | |
| LDAP_LOCAL_USER_DN | back to summary |
|---|---|
| private static final String LDAP_LOCAL_USER_DN | |
| LDAP_SEARCH_AUTH_DN | back to summary |
|---|---|
| private static final String LDAP_SEARCH_AUTH_DN | |
| LDAP_SEARCH_AUTH_PW | back to summary |
|---|---|
| private static final String LDAP_SEARCH_AUTH_PW | |
| LDAP_SEARCH_BASE | back to summary |
|---|---|
| private static final String LDAP_SEARCH_BASE | |
| LDAP_SEARCH_FILTER | back to summary |
|---|---|
| private static final String LDAP_SEARCH_FILTER | |
| LDAP_SEARCH_FILTER_USERNAME | back to summary |
|---|---|
| private static final String LDAP_SEARCH_FILTER_USERNAME | |
| leftSearchFilter | back to summary |
|---|---|
| private String leftSearchFilter | |
| rightSearchFilter | back to summary |
|---|---|
| private String rightSearchFilter | |
| searchAuthDN | back to summary |
|---|---|
| private String searchAuthDN | |
| searchAuthPW | back to summary |
|---|---|
| private String searchAuthPW | |
| searchBaseDN | back to summary |
|---|---|
| private String searchBaseDN | |
| useUserPropertyAsDN | back to summary |
|---|---|
| private boolean useUserPropertyAsDN | |
| LDAPAuthenticationSchemeImpl | back to summary |
|---|---|
| public LDAPAuthenticationSchemeImpl(JNDIAuthenticationService as, Properties dbProperties) | |
| authenticateUser | back to summary |
|---|---|
| public boolean authenticateUser(String userName, String userPassword, String databaseName, Properties info) throws SQLException Implements org. Authenticate the passed-in user's credentials. We authenticate against a LDAP Server.
| |
| doFilterEscaping | back to summary |
|---|---|
| protected String doFilterEscaping(String inString) Given an LDAP search string, returns the string with certain characters escaped according to RFC 2254 guidelines. Cribbed from org.apache.catalina.realm.JNDIRealm. The character mapping is as follows: char -> Replacement --------------------------- * -> \2a ( -> \28 ) -> \29 \ -> \5c \0 -> \00 | |
| getDNFromUID | back to summary |
|---|---|
| private String getDNFromUID(String uid) throws NamingException Search for the full user's DN in the LDAP server. LDAP server bind may or not be anonymous. If the admin does not want us to do anonymous bind/search, then we must have been given principal/credentials in order to successfully bind to perform the user's DN search.
| |
| privInitialDirContext | back to summary |
|---|---|
| private DirContext privInitialDirContext(final Properties env) throws NamingException Call new InitialDirContext in a privilege block
| |
| setJNDIProviderProperties | back to summary |
|---|---|
| protected void setJNDIProviderProperties() Implements abstract org. This method basically tests and sets default/expected JNDI properties for the JNDI provider scheme (here it is LDAP). | |