cancel
Showing results for 
Search instead for 
Did you mean: 

CAS Authentication with Alfresco

kevin
Champ in-the-making
Champ in-the-making
Hello,

I try to configure Alfresco to use a CAS authentication. I modified my web.xml file like this :
<filter>
   <filter-name>Authentication Filter</filter-name>
   <filter-class>edu.yale.its.tp.cas.client.filter.CASFilter</filter-class>
   <init-param>
      <param-name>edu.yale.its.tp.cas.client.filter.loginUrl</param-name>
      <param-value>https://xxxxx:8443/cas/login</param-value>
   </init-param>
   <init-param>
      <param-name>edu.yale.its.tp.cas.client.filter.validateUrl</param-name>
      <param-value>https://xxxxxxx:8443/cas/serviceValidate</param-value>
   </init-param>
   <init-param>
      <param-name>edu.yale.its.tp.cas.client.filter.serverName</param-name>
      <param-value>localhost:8080</param-value>
   </init-param>
</filter>

<filter-mapping>
   <filter-name>Authentication Filter</filter-name>
   <url-pattern>/*</url-pattern>
</filter-mapping>

And the CAS authentication seems to work : redirection to the CAS login, redirection to alfresco, CAS authentication on the CAS server side but then I get this error :
15:06:52,484 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/alfresco].[jsp]] "Servlet.service()" pour la servlet jsp a lanc? une exception
javax.faces.el.EvaluationException: Cannot get value for expression '#{NavigationBean.isGuest == false}'
   at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:397)
   at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:822)
   at javax.faces.webapp.UIComponentTag.isSuppressed(UIComponentTag.java:571)
   at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:220)
   at org.apache.jsp.jsp.browse.browse_jsp._jspx_meth_a_actionLink_2(org.apache.jsp.jsp.browse.browse_jsp:965)
   at org.apache.jsp.jsp.browse.browse_jsp._jspService(org.apache.jsp.jsp.browse.browse_jsp:379)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
(…)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   at java.lang.Thread.run(Thread.java:595)
Caused by: javax.faces.el.EvaluationException: org.alfresco.web.bean.NavigationBean
   at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:78)
   at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:532)
   at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
   at org.apache.commons.el.BinaryOperatorExpression.evaluate(BinaryOperatorExpression.java:154)
   at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:378)
   … 39 more
Caused by: javax.faces.el.EvaluationException: Bean: org.alfresco.web.bean.NavigationBean, property: isGuest
   at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:404)
   at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:71)
   … 43 more
Caused by: java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:400)
   … 44 more
Caused by: java.lang.NullPointerException
   at org.alfresco.web.bean.NavigationBean.getIsGuest(NavigationBean.java:445)
   … 49 more

Did someone get this error and is it possible to "CAS-ify" Alfresco and how ?

Thanks.

Kevin
1 REPLY 1

ribz33
Champ on-the-rise
Champ on-the-rise
Have you succeed to do it ?