Strange result of Seam CAS SSO integration
alartin Sep 23, 2009 7:50 AMI use Seam 2.2.0.GA and CAS Client 3.1.8, CAS Server 3.3.1.
It seems I can do SSO between two seam apps: app1 and app2. But When using CAS SSO, seam app is broken by some strange results.
Seam app1 is a simple CRUD app generated by seam-gen. When not using CAS SSO, you can sort the entity list in the XXXList.xhtml, you can create a new entity in the XXXEdit.xhtml and when you finish editing, you will be redirected to display page. But when using CAS SSO, it produces strange results:
1. XXXList.xhtml datatable sort function does not work any more.
2. After creating a new entity, you are not directed to the display page, you still stay at the editing page and can see a message of sucessful creation.
3. When you go to XXXList.xhtml and you can see the new created entity, but after you click View/Edit link, it shows a page without any information even the entity's id is in the request parameters(in the Browser's URL bar), seems like what you can see when creating a new entity. I am sure that the entity is persisted in the database. It seems that it can not resolve request parameters anymore.
Here are my app1's web.xml:
<!-- CAS:Java Client 3.1.8 --> <!-- <context-param> <param-name>contextConfigLocation</param-name> <param-value> classpath:casContext.xml </param-value> </context-param> --> <filter> <filter-name>CasAuthenticationFilter</filter-name> <filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class> <init-param> <param-name>casServerLoginUrl</param-name> <param-value>https://localhost:8443/cas/login</param-value> </init-param> <init-param> <param-name>serverName</param-name> <param-value>http://localhost:8080</param-value> </init-param> </filter> <filter> <filter-name>CasValidationFilter</filter-name> <filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class> <init-param> <param-name>casServerUrlPrefix</param-name> <param-value>https://localhost:8443/cas</param-value> </init-param> <init-param> <param-name>serverName</param-name> <param-value>http://localhost:8080</param-value> </init-param> <init-param> <param-name>redirectAfterValidation</param-name> <param-value>true</param-value> </init-param> </filter> <filter> <filter-name>CasSingleSignOutFilter</filter-name> <filter-class>org.jasig.cas.client.session.SingleSignOutFilter</filter-class> </filter> <!-- CAS: Java Client Filter Mappings --> <filter-mapping> <filter-name>CasAuthenticationFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>CasValidationFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>CasSingleSignOutFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
pages.xml:
<page view-id="*" action="#{ssoAuthenticator.checkLogin}">
Two classes: SSOAuthenticator and SSOPages are from the suggestion of CAS site: My Link
When I remove the CAS SSO, app1 works fine as before.