I am using Netbeans and the Apache module that comes with it to build an intranet application that uses authentication with Active Directory. I have a few questions
1. Is the apache module that comes bundled with Netbeans configured to work with active directory for authentication?
2. How do I configure apache to use active directory for authentication
3. How do I configure the apache realm to use active directory for authentication through LDAP
I have tried with the code below, and the result is the java exception that follows. I have tried many options and several attributes for the realm configuration.
the code...
<Realm className="org.apache.catalina.realm.JNDIRealm"
debug="99"
connectionURL="ldap://<my_server_address>:389"
userRoleName="member"
userBase="cn=users,dc=<my_domain_name>"
userPattern="cn={0},cn=Users,dc=<my_domain_name>"
roleBase="cn=Users,dc=<my_domain_name>"
roleName="cn"
roleSearch="(member={0})"
roleSubtree="false"
userSubtree="true"
the exception...
javax.naming.NamingException: [LDAP: error code 1 - 00000000: LdapErr: DSID-0C090627, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, vece
at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3045)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2951)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2758)
at com.sun.jndi.ldap.LdapCtx.c_getAttributes(LdapCtx.java:1295)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:213)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:121)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:109)
at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:123)
at org.apache.catalina.realm.JNDIRealm.getUserByPattern(JNDIRealm.java:1026)
at org.apache.catalina.realm.JNDIRealm.getUser(JNDIRealm.java:990)
at org.apache.catalina.realm.JNDIRealm.authenticate(JNDIRealm.java:916)
at org.apache.catalina.realm.JNDIRealm.authenticate(JNDIRealm.java:810)
at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:258)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:417)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
I need some insights into possible sources of this error