[jboss-user] [Security & JAAS/JBoss] - LdapLoginModule configuration
MelampO
do-not-reply at jboss.com
Tue Jan 16 10:46:12 EST 2007
Hello
I'm trying to configure a very simple login system using LdapLoginModule. I had never worked with LDAP, so, searching the web and the jboss wiki I found the LoginModulesTestCase which works perfectly for me adding my personal configuration.
Following this example, I developed my first version, and it works fine:
LoginAction:
| @In(required = false)
| @Out(required = false)
| private Usuario usuario;
|
| /**
| * Hard coded login configurations for the test cases. The configuration
| * name corresponds to the unit test function that uses the configuration.
| */
|
| static {
| try {
| Configuration.setConfiguration(new LdapConfig());
| } catch (Exception e) {
| e.printStackTrace();
| }
| }
|
| static class LdapConfig extends Configuration {
| public void refresh() {
| }
|
| public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
| AppConfigurationEntry[] entry = null;
| try {
| Class[] parameterTypes = {};
| Method m = getClass().getDeclaredMethod(name, parameterTypes);
| Object[] args = {};
| entry = (AppConfigurationEntry[]) m.invoke(this, args);
| } catch (Exception e) {
| }
| return entry;
| }
|
| AppConfigurationEntry[] BibliotecaLdap() {
| String name = "org.jboss.security.auth.spi.LdapLoginModule";
| HashMap options = new HashMap();
| options.put("java.naming.factory.initial",
| "com.sun.jndi.ldap.LdapCtxFactory");
| options.put("java.naming.provider.url", "ldap://trasgu/");
| options.put("java.naming.security.authentication", "simple");
|
| AppConfigurationEntry ace = new AppConfigurationEntry(name,
| AppConfigurationEntry.LoginModuleControlFlag.REQUIRED,
| options);
| AppConfigurationEntry[] entry = { ace };
| return entry;
| }
| }
|
| /**
| * @see org.fundacion.biblioteca.actions.usuario.ValidarUsuario#login()
| */
| public String login() {
|
| UsernamePasswordHandler handler = new UsernamePasswordHandler(usuario
| .getUsername(), password.toCharArray());
|
| LoginContext lc;
|
| try {
| lc = new LoginContext("BibliotecaLdap", handler);
| lc.login();
| Subject subject = lc.getSubject();
| System.out.println("Subject: " + subject);
| } catch (LoginException e) {
| e.printStackTrace();
| }
|
| return null;
| }
|
Ok. This works and I could authenticate my users with LDAP (at this momment I don't need roles or groups).
My second step was do the same in a pretty way, without hardcoding configurations and adding everything in they configuration file. Now, I have this:
LoginAction:
| @In(required = false)
| @Out(required = false)
| private Usuario usuario;
|
| public String login() {
|
| UsernamePasswordHandler handler = new UsernamePasswordHandler(usuario
| .getUsername(), password.toCharArray());
|
| LoginContext lc;
|
| try {
| lc = new LoginContext("BibliotecaSecurity", handler);
| lc.login();
| Subject subject = lc.getSubject();
| System.out.println("Subject: " + subject);
| } catch (LoginException e) {
| e.printStackTrace();
| }
|
| return null;
| }
|
login-config.xml (very simple, but just with the same configuration that was working in the fisrt case)
| <application-policy name="BibliotecaSecurity">
| <authentication>
| <login-module
| code="org.jboss.security.auth.spi.LdapLoginModule"
| flag="required">
| <module-option name="java.naming.factory.initial">
| com.sun.jndi.ldap.LdapCtxFactory
| </module-option>
| <module-option name="java.naming.provider.url ">
| ldap://trasgu:389
| </module-option>
| <module-option
| name="java.naming.security.authentication">
| simple
| </module-option>
| </login-module>
| </authentication>
| </application-policy>
|
jboss-web.xml
| <jboss-web>
| <security-domain>java:/jaas/BibliotecaSecurity</security-domain>
| </jboss-web>
|
With this configuration, I have a FailedLoginException each time I call login() action...
| 14:16:13,170 ERROR [STDERR] javax.security.auth.login.FailedLoginException: Password Incorrect/Password Required
| 14:16:13,172 ERROR [STDERR] at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:213)
| 14:16:13,172 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 14:16:13,172 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 14:16:13,172 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 14:16:13,172 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 14:16:13,172 ERROR [STDERR] at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
| 14:16:13,173 ERROR [STDERR] at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
| 14:16:13,173 ERROR [STDERR] at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
| 14:16:13,173 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
| 14:16:13,173 ERROR [STDERR] at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
| 14:16:13,173 ERROR [STDERR] at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
| 14:16:13,173 ERROR [STDERR] at org.fundacion.biblioteca.actions.usuario.ValidarUsuarioLdap.login(ValidarUsuarioLdap.java:123)
| 14:16:13,173 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 14:16:13,173 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 14:16:13,174 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 14:16:13,174 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 14:16:13,174 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| 14:16:13,174 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| 14:16:13,174 ERROR [STDERR] at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
| 14:16:13,174 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| 14:16:13,174 ERROR [STDERR] at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:51)
| 14:16:13,174 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor109.invoke(Unknown Source)
| 14:16:13,174 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 14:16:13,174 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 14:16:13,174 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 14:16:13,174 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 14:16:13,175 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 14:16:13,175 ERROR [STDERR] at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:23)
| 14:16:13,175 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown Source)
| 14:16:13,175 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 14:16:13,175 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 14:16:13,176 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 14:16:13,176 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 14:16:13,176 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 14:16:13,176 ERROR [STDERR] at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:51)
| 14:16:13,176 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown Source)
| 14:16:13,176 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 14:16:13,176 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 14:16:13,176 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 14:16:13,176 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 14:16:13,177 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 14:16:13,177 ERROR [STDERR] at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:50)
| 14:16:13,177 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor105.invoke(Unknown Source)
| 14:16:13,177 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 14:16:13,177 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 14:16:13,177 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 14:16:13,177 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 14:16:13,177 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 14:16:13,177 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| 14:16:13,177 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| 14:16:13,177 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| 14:16:13,177 ERROR [STDERR] at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:49)
| 14:16:13,178 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor122.invoke(Unknown Source)
| 14:16:13,178 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 14:16:13,178 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 14:16:13,178 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
| 14:16:13,179 ERROR [STDERR] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| 14:16:13,179 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 14:16:13,179 ERROR [STDERR] at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
| 14:16:13,179 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 14:16:13,179 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| 14:16:13,179 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 14:16:13,179 ERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| 14:16:13,179 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 14:16:13,180 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
| 14:16:13,180 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
| 14:16:13,184 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 14:16:13,184 ERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| 14:16:13,184 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 14:16:13,184 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
| 14:16:13,185 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 14:16:13,185 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
| 14:16:13,185 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 14:16:13,185 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| 14:16:13,185 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 14:16:13,185 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| 14:16:13,185 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 14:16:13,185 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:188)
| 14:16:13,185 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
| 14:16:13,185 ERROR [STDERR] at $Proxy150.login(Unknown Source)
| 14:16:13,185 ERROR [STDERR] at org.fundacion.biblioteca.actions.usuario.ValidarUsuario$$FastClassByCGLIB$$845a45ae.invoke(<generated>)
| 14:16:13,185 ERROR [STDERR] at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| 14:16:13,185 ERROR [STDERR] at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
| 14:16:13,186 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:73)
| 14:16:13,186 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| 14:16:13,187 ERROR [STDERR] at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39)
| 14:16:13,187 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
| 14:16:13,187 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 14:16:13,187 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 14:16:13,187 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 14:16:13,187 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 14:16:13,187 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 14:16:13,187 ERROR [STDERR] at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:38)
| 14:16:13,187 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor104.invoke(Unknown Source)
| 14:16:13,188 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 14:16:13,188 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 14:16:13,188 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 14:16:13,188 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 14:16:13,188 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 14:16:13,188 ERROR [STDERR] at org.jboss.seam.interceptors.SynchronizationInterceptor.serialize(SynchronizationInterceptor.java:30)
| 14:16:13,188 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
| 14:16:13,188 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 14:16:13,188 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 14:16:13,189 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 14:16:13,192 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 14:16:13,193 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 14:16:13,193 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| 14:16:13,193 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| 14:16:13,193 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| 14:16:13,193 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:82)
| 14:16:13,193 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:51)
| 14:16:13,194 ERROR [STDERR] at org.jboss.seam.intercept.Proxy$$EnhancerByCGLIB$$2fd8a7d4_2.login(<generated>)
| 14:16:13,195 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 14:16:13,195 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 14:16:13,195 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 14:16:13,195 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 14:16:13,195 ERROR [STDERR] at com.sun.el.parser.AstValue.invoke(AstValue.java:151)
| 14:16:13,195 ERROR [STDERR] at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
| 14:16:13,199 ERROR [STDERR] at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
| 14:16:13,199 ERROR [STDERR] at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
| 14:16:13,199 ERROR [STDERR] at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
| 14:16:13,199 ERROR [STDERR] at javax.faces.component.UICommand.broadcast(UICommand.java:106)
| 14:16:13,199 ERROR [STDERR] at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
| 14:16:13,199 ERROR [STDERR] at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
| 14:16:13,199 ERROR [STDERR] at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316)
| 14:16:13,199 ERROR [STDERR] at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
| 14:16:13,199 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
| 14:16:13,199 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| 14:16:13,202 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| 14:16:13,203 ERROR [STDERR] at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
| 14:16:13,203 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| 14:16:13,203 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| 14:16:13,203 ERROR [STDERR] at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
| 14:16:13,203 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| 14:16:13,203 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| 14:16:13,203 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| 14:16:13,203 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| 14:16:13,203 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| 14:16:13,203 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| 14:16:13,203 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| 14:16:13,203 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| 14:16:13,203 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| 14:16:13,203 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| 14:16:13,203 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| 14:16:13,203 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| 14:16:13,203 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| 14:16:13,203 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| 14:16:13,204 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| 14:16:13,204 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| 14:16:13,204 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| 14:16:13,204 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
| 14:16:13,204 ERROR [STDERR] Caused by: javax.naming.InvalidNameException: [LDAP: error code 34 - invalid DN]
| 14:16:13,204 ERROR [STDERR] at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2926)
| 14:16:13,204 ERROR [STDERR] at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2732)
| 14:16:13,204 ERROR [STDERR] at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2646)
| 14:16:13,204 ERROR [STDERR] at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:283)
| 14:16:13,204 ERROR [STDERR] at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
| 14:16:13,205 ERROR [STDERR] at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
| 14:16:13,205 ERROR [STDERR] at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
| 14:16:13,205 ERROR [STDERR] at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
| 14:16:13,205 ERROR [STDERR] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
| 14:16:13,205 ERROR [STDERR] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
| 14:16:13,205 ERROR [STDERR] at javax.naming.InitialContext.init(InitialContext.java:223)
| 14:16:13,205 ERROR [STDERR] at javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:134)
| 14:16:13,205 ERROR [STDERR] at org.jboss.security.auth.spi.LdapLoginModule.createLdapInitContext(LdapLoginModule.java:307)
| 14:16:13,205 ERROR [STDERR] at org.jboss.security.auth.spi.LdapLoginModule.validatePassword(LdapLoginModule.java:239)
| 14:16:13,206 ERROR [STDERR] at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:210)
| 14:16:13,206 ERROR [STDERR] ... 150 more
|
Ithink that it can find the configuration (BibliotecaSecurity policy) but it can't authenticate the users. I have missed something? In my opinion this is the same that I have in the first version but without hardcoding the configuration. I think that I have the same configuration but I don't know where is the error... any help?
Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4002319#4002319
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4002319
More information about the jboss-user
mailing list