Hello,

I checked my LDAP and tried several user. Each time I get this message
in daemmon.log :

 <AuthenticationHandler:
org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler successfully
authenticated the user which provided the following credentials:
[username: user_SURNAME.user_NAME]>
...

I changed a little bit my deployer but not too much and my attribute
repository is :

  <bean id="attributeRepository"
          
class="org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao">

      <property name="baseDN"
                value="ou=personnes,dc=myDC,dc=fr" />

      <property name="contextSource" ref="contextSource" />

      <property name="queryAttributeMapping">
        <map>
          <entry key="ENTPersonLogin" value="ENTPersonLogin" />
        </map>
      </property>

      <property name="resultAttributeMapping">
        <map>
          <entry key="ENTPersonLogin" value="ENTPersonLogin"/>
          <entry key="givenName" value="givenName"/>
        </map>
      </property>

    </bean>

So I can't see why I get these line after "successfully authenticated" :

 <Clearing action execution attributes map[[empty]]>
[org.springframework.webflow.engine.impl.FlowExecutionImpl] -
<Attempting to handle
org.springframework.webflow.execution.ActionExecutionException:
Exception thrown executing [annotatedact...@ad8bb4 targetAction =
[evaluateact...@405f6 expression =
authenticationViaFormAction.submit(flowRequestContext,
flowScope.credentials, messageContext), resultExposer = [null]],
attributes = map[[empty]]] in state 'realSubmit' of flow 'login' --
action execution attributes were 'map[[empty]]'] with root cause
[java.lang.NullPointerException]>


I'm desperate :)

Regards

Marc



On Sun, Feb 21, 2010 at 21:33, Scott Battaglia
<[email protected]> wrote:
> Its having trouble on this line:
> final Map<String, List<Object>> attributes =
> this.attributeRepository.getPerson(principalId).getAttributes();
> Either your attribute repository is null, or its not finding your user
> (which probably means its configured wrong).
> Cheers,
> Scott
>
> On Fri, Feb 19, 2010 at 8:43 AM, Marc Delerue <[email protected]> wrote:
>>
>> Hello,
>>
>> I'm trying deploy a CAS server usin openLDAP as directory.
>> I've read *a lot* of documentations and mailing list to solve several
>> troubles and finally I have this configuration in deployerConfigContext.xml
>> :
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!--
>>   | deployerConfigContext.xml centralizes into one file some of the
>> declarative configuration that
>>   | all CAS deployers will need to modify.
>>   |
>>   | This file declares some of the Spring-managed JavaBeans that make up a
>> CAS deployment.
>>   | The beans declared in this file are instantiated at context
>> initialization time by the Spring
>>   | ContextLoaderListener declared in web.xml.  It finds this file because
>> this
>>   | file is among those declared in the context parameter
>> "contextConfigLocation".
>>   |
>>   | By far the most common change you will need to make in this file is to
>> change the last bean
>>   | declaration to replace the default
>> SimpleTestUsernamePasswordAuthenticationHandler with
>>   | one implementing your approach for authenticating usernames and
>> passwords.
>>   +-->
>> <beans xmlns="http://www.springframework.org/schema/beans";
>>      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>      xmlns:p="http://www.springframework.org/schema/p";
>>      xmlns:sec="http://www.springframework.org/schema/security";
>>      xsi:schemaLocation="http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
>>                          http://www.springframework.org/schema/security
>> http://www.springframework.org/schema/security/spring-security-3.0.xsd";>
>>
>>
>>
>>  <bean id="authenticationManager"
>>
>> class="org.jasig.cas.authentication.AuthenticationManagerImpl">
>>
>>   <property name="credentialsToPrincipalResolvers">
>>     <list>
>>       <bean
>>
>>  class="org.jasig.cas.authentication.principal.CredentialsToLDAPAttributePrincipalResolver">
>>
>>         <property name="credentialsToPrincipalResolver">
>>           <bean id="ldapToPrincipalResolver"
>>
>> class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver"
>> />
>>         </property>
>>
>>         <property name="filter" value="(ENTPersonLogin=%u)" />
>>
>>         <!-- The attribute used to define the new Principal ID -->
>>
>>         <property name="principalAttributeName" value="ENTPersonLogin" />
>>
>>         <property name="searchBase" value="ou=personnes,dc=myDC,dc=fr" />
>>         <property name="contextSource" ref="contextSource" />
>>
>>         <property name="attributeRepository" ref="attributeRepository" />
>>
>>       </bean>
>>
>>       <bean
>>
>>  class="org.jasig.cas.authentication.principal.HttpBasedServiceCredentialsToPrincipalResolver"
>> />
>>
>>     </list>
>>   </property>
>>
>>       <property name="authenticationHandlers">
>>         <list>
>>           <bean
>>
>>  class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler" >
>>
>>             <property name="filter" value="ENTPersonLogin=%u" />
>>             <property name="searchBase" value="ou=personnes,dc=myDC,dc=fr"
>> />
>>             <property name="contextSource" ref="contextSource" />
>>           </bean>
>>
>>         </list>
>>       </property>
>>     </bean>
>>
>>
>>   <bean id="contextSource"
>> class="org.springframework.ldap.core.support.LdapContextSource">
>>     <property name="anonymousReadOnly" value="false" />
>>     <property name="pooled" value="true"/>
>>     <property name="urls">
>>       <list>
>>         <value>ldap://192.168.252.204/</value>
>>       </list>
>>     </property>
>>
>>     <property name="userDn" value="cn=admin,dc=emyDC,dc=fr"/> <!-- eg
>> uid=LdapUser,dc=yourdomain,dc=edu -->
>>     <property name="password" value="xxxxx"/>
>>
>>     <property name="baseEnvironmentProperties">
>>       <map>
>>         <entry>
>>           <key>
>>             <value>java.naming.security.authentication</value>
>>           </key>
>>           <value>simple</value>
>>         </entry>
>>       </map>
>>     </property>
>>   </bean>
>>
>>   <sec:user-service id="userDetailsService">
>>     <sec:user name="admin" password="notused" authorities="ROLE_ADMIN" />
>>   </sec:user-service>
>>
>>
>>
>>
>>   <bean id="attributeRepository"
>>
>> class="org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao">
>>
>>     <property name="baseDN"
>>               value="ou=personnes,dc=myDC,dc=fr" />
>>
>>     <property name="contextSource" ref="contextSource" />
>>
>>     <property name="resultAttributeMapping">
>>       <map>
>>         <entry key="givenName" value="givenName"/>
>>         <entry key="distinguishedName" value="distinguishedName" />
>>         <entry key="sn" value="sn" />
>>
>>       </map>
>>     </property>
>>
>>   </bean>
>>
>>   <bean
>>      id="serviceRegistryDao"
>>
>> class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl" />
>>  </beans>
>>
>>
>>  Tomcat stars without problem but, when i'm trying to authenticate i got a
>> "CAS is Unavailable,
>> There was an error trying to complete your request. Please notify your
>> support desk or try again.".
>>
>> If I look at the logs, that is what i get :
>>
>> Feb 19 15:27:55 debian jsvc.exec[13663]: 2010-02-19 15:27:55,022 INFO
>> [org.jasig.cas.authentication.AuthenticationManagerImpl] -
>> <AuthenticationHandler:
>> org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler successfully
>> authenticated the user which provided the following credentials: [username:
>> adminesv]>
>> Feb 19 15:27:55 debian jsvc.exec[13663]: 2010-02-19 15:27:55,052 DEBUG
>> [org.springframework.webflow.execution.AnnotatedAction] - <Clearing action
>> execution attributes map[[empty]]>
>> Feb 19 15:27:55 debian jsvc.exec[13663]: 2010-02-19 15:27:55,053 DEBUG
>> [org.springframework.webflow.engine.impl.FlowExecutionImpl] - <Attempting to
>> handle [org.springframework.webflow.execution.ActionExecutionException:
>> Exception thrown executing [annotatedact...@1efb003 targetAction =
>> [evaluateact...@118abfe expression =
>> authenticationViaFormAction.submit(flowRequestContext,
>> flowScope.credentials, messageContext), resultExposer = [null]], attributes
>> = map[[empty]]] in state 'realSubmit' of flow 'login' -- action execution
>> attributes were 'map[[empty]]'] with root cause
>> [java.lang.NullPointerException]>
>> Feb 19 15:27:55 debian jsvc.exec[13663]: 2010-02-19 15:27:55,053 DEBUG
>> [org.springframework.webflow.engine.impl.FlowExecutionImpl] - <Rethrowing
>> unhandled flow execution exception>
>> Feb 19 15:27:55 debian jsvc.exec[13663]: 2010-02-19 15:27:55,053 DEBUG
>> [org.springframework.webflow.conversation.impl.SessionBindingConversationManager]
>> - <Unlocking conversation 1>
>> Feb 19 15:27:55 debian jsvc.exec[13663]: 2010-02-19 15:27:55,055 ERROR
>> [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cas3].[cas]]
>> - <"Servlet.service()" pour la servlet cas a généré une
>> exception>#012java.lang.NullPointerException#012#011at
>> org.jasig.cas.authentication.principal.AbstractPersonDirectoryCredentialsToPrincipalResolver.resolvePrincipal_aroundBody0(AbstractPersonDirectoryCredentialsToPrincipalResolver.java:54)#012#011at
>> org.jasig.cas.authentication.principal.AbstractPersonDirectoryCredentialsToPrincipalResolver.resolvePrincipal_aroundBody1$advice(AbstractPersonDirectoryCredentialsToPrincipalResolver.java:44)#012#011at
>> org.jasig.cas.authentication.principal.AbstractPersonDirectoryCredentialsToPrincipalResolver.resolvePrincipal(AbstractPersonDirectoryCredentialsToPrincipalResolver.java:1)#012#011at
>> org.jasig.cas.authentication.AuthenticationManagerImpl.authenticateAndObtainPrincipal(AuthenticationManagerImpl.java:114)#012#011at
>> org.jasig.cas.authentication.AbstractAuthenticationManager.authenticate_aroundBody0(AbstractAuthenticationManager.java:42)
>> Feb 19 15:27:55 debian jsvc.exec[13663]: #011at
>> org.jasig.cas.authentication.AbstractAuthenticationManager.authenticate_aroundBody1$advice(AbstractAuthenticationManager.java:44)#012#011at
>> org.jasig.cas.authentication.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:1)#012#011at
>> org.jasig.cas.CentralAuthenticationServiceImpl.createTicketGrantingTicket_aroundBody10(CentralAuthenticationServiceImpl.java:406)#012#011at
>> org.jasig.cas.CentralAuthenticationServiceImpl.createTicketGrantingTicket_aroundBody11$advice(CentralAuthenticationServiceImpl.java:44)#012#011at
>> org.jasig.cas.CentralAuthenticationServiceImpl.createTicketGrantingTicket(CentralAuthenticationServiceImpl.java:1)#012#011at
>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)#012#011at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)#012#011at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)#012#011at
>> java.lang.reflect.Method.invoke(Method.java:597)#012#011at
>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307
>> Feb 19 15:27:55 debian jsvc.exec[13663]: )#012#011at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)#012#011at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)#012#011at
>> org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)#012#011at
>> org.perf4j.aop.AbstractTimingAspect.doPerfLogging(AbstractTimingAspect.java:71)#012#011at
>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)#012#011at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)#012#011at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)#012#011at
>> java.lang.reflect.Method.invoke(Method.java:597)#012#011at
>> org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:622)#012#011at
>> org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:611)#012#011at
>> org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(A
>> Feb 19 15:27:55 debian jsvc.exec[13663]:
>> spectJAroundAdvice.java:65)#012#011at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)#012#011at
>> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)#012#011at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)#012#011at
>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)#012#011at
>> $Proxy15.createTicketGrantingTicket(Unknown Source)#012#011at
>> org.jasig.cas.web.flow.AuthenticationViaFormAction.submit_aroundBody2(AuthenticationViaFormAction.java:87)#012#011at
>> org.jasig.cas.web.flow.AuthenticationViaFormAction.submit_aroundBody3$advice(AuthenticationViaFormAction.java:44)#012#011at
>> org.jasig.cas.web.flow.AuthenticationViaFormAction.submit(AuthenticationViaFormAction.java:1)#012#011at
>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)#012#011at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)#012#011at
>> sun.reflect.DelegatingMethodAccessorI
>> Feb 19 15:27:55 debian jsvc.exec[13663]:
>> mpl.invoke(DelegatingMethodAccessorImpl.java:25)#012#011at
>> java.lang.reflect.Method.invoke(Method.java:597)#012#011at
>> ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:830)#012#011at
>> ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1253)#012#011at
>> ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68)#012#011at
>> ognl.OgnlRuntime.callMethod(OgnlRuntime.java:1329)#012#011at
>> ognl.ASTMethod.getValueBody(ASTMethod.java:90)#012#011at
>> ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)#012#011at
>> ognl.SimpleNode.getValue(SimpleNode.java:258)#012#011at
>> ognl.ASTChain.getValueBody(ASTChain.java:141)#012#011at
>> ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)#012#011at
>> ognl.SimpleNode.getValue(SimpleNode.java:258)#012#011at
>> ognl.Ognl.getValue(Ognl.java:494)#012#011at
>> org.springframework.binding.expression.ognl.OgnlExpression.getValue(OgnlExpression.java:85)#012#011at
>> org.springframework.webflow.action.EvaluateAction.doExecute(EvaluateAction.java:77)#012#011at
>> org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188)#012#011at
>> org.springframework.webflow.executi
>> Feb 19 15:27:55 debian jsvc.exec[13663]:
>> on.AnnotatedAction.execute(AnnotatedAction.java:145)#012#011at
>> org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51)#012#011at
>> org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:101)#012#011at
>> org.springframework.webflow.engine.State.enter(State.java:194)#012#011at
>> org.springframework.webflow.engine.Transition.execute(Transition.java:227)#012#011at
>> org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:391)#012#011at
>> org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)#012#011at
>> org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:119)#012#011at
>> org.springframework.webflow.engine.Flow.handleEvent(Flow.java:555)#012#011at
>> org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:386)#012#011at
>> org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210)#012#011at
>> org.springframework.webflow.engine.ViewState.h
>> Feb 19 15:27:55 debian jsvc.exec[13663]:
>> andleEvent(ViewState.java:230)#012#011at
>> org.springframework.webflow.engine.ViewState.resume(ViewState.java:196)#012#011at
>> org.springframework.webflow.engine.Flow.resume(Flow.java:545)#012#011at
>> org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:259)#012#011at
>> org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:163)#012#011at
>> org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183)#012#011at
>> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)#012#011at
>> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)#012#011at
>> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)#012#011at
>> org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:563)#012#011at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:709)#012#011at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)#012#011at
>> org.jasig.cas.web.init.SafeDispatcherServlet.service
>> Feb 19 15:27:55 debian jsvc.exec[13663]:
>> _aroundBody2(SafeDispatcherServlet.java:115)#012#011at
>> org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody3$advice(SafeDispatcherServlet.java:44)#012#011at
>> org.jasig.cas.web.init.SafeDispatcherServlet.service(SafeDispatcherServlet.java:1)#012#011at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)#012#011at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)#012#011at
>> org.inspektr.common.web.ClientInfoThreadLocalFilter.doFilter(ClientInfoThreadLocalFilter.java:46)#012#011at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)#012#011at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)#012#011at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)#012#011at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)#012#011at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)#012#011at
>> org.apache.catalina.valves.E
>> Feb 19 15:27:55 debian jsvc.exec[13663]: rrorRepo
>> ²Feb 19 15:27:55 debian jsvc.exec[13663]:
>> rtValve.invoke(ErrorReportValve.java:117)#012#011at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)#012#011at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)#012#011at
>> org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:834)#012#011at
>> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640)#012#011at
>> org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286)#012#011at
>> java.lang.Thread.run(Thread.java:619)
>>
>>
>> I am totally lost with these messages :( . Has anybody an idea ?
>>
>> Thank you very much.
>>
>> Regards.
>>
>> Marc
>>
>>
>> PS :
>>
>> Debian - Tomcat5.5 - CAS 3.3.6 (built from sources) - SUN JDK
>>
>>
>> --
>> You are currently subscribed to [email protected] as:
>> [email protected]
>> To unsubscribe, change settings or access archives, see
>> http://www.ja-sig.org/wiki/display/JSG/cas-dev
>
> --
> You are currently subscribed to [email protected] as:
> [email protected]
> To unsubscribe, change settings or access archives, see
> http://www.ja-sig.org/wiki/display/JSG/cas-dev

-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-dev

Reply via email to