CAS client configuration with confluence

Dear all.

I am setting CAS client in Confluence 4.3.

https://wiki.jasig.org/display/CASC/Configuring+Confluence+with+JASIG+CAS+Client+for+Java+3.1

- Add jar files

cas-client-core-3.1.3.jar

cas-client-integration-atlassian-3.1.3.jar

- my configuration files.

1. seraph-config.xml

<init-param>

<param-name>login.url</param-name>

<param-value>https://x.x.x.x:8443/cas/login?service=${originalurl}/</param-value>

</init-param>

<init-param>

<param-name>link.login.url</param-name>

<param-value>https://x.x.x.x:8443/cas/login?service=${originalurl}/</param-value>

</init-param>

2. web.xml

<!-- CAS:START - Java Client Filters -->

<filter>

<filter-name>CasSingleSignOutFilter</filter-name>

<filter-class>org.jasig.cas.client.session.SingleSignOutFilter</filter-class>

</filter>

<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://x.x.x.x:8443/cas/login</param-value>

</init-param>

<init-param>

<param-name>serverName</param-name>

<param-value>http://x.x.x.x:8090/</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://x.x.x.x:8443/cas/serviceValidate</param-value>

</init-param>

<init-param>

<param-name>serverName</param-name>

<param-value>http://x.x.x.x:8090/</param-value>

</init-param>

<init-param>

<param-name>redirectAfterValidation</param-name>

<param-value>true</param-value>

</init-param>

</filter>

<!--- CAS:END -->

<!-- CAS:START - Java Client Filter Mappings -->

<filter-mapping>

<filter-name>CasSingleSignOutFilter</filter-name>

<url-pattern>/*</url-pattern>

</filter-mapping>

<filter-mapping>

<filter-name>CasAuthenticationFilter</filter-name>

<url-pattern>/login.action</url-pattern>

</filter-mapping>

<filter-mapping>

<filter-name>CasValidationFilter</filter-name>

<url-pattern>/*</url-pattern>

</filter-mapping>

<!-- CAS:END -->

<!-- CAS:START - Java Client Single Sign Out Listener -->

<listener>

<listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class>

</listener>

<!-- CAS:END -->

But occurred error.

Please help me.

go to my Confluence site → log in → occurred error below

Cause

javax.servlet.ServletException: org.jasig.cas.client.validation.TicketValidationException: The CAS server returned no response.

at org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:155)

caused by: org.jasig.cas.client.validation.TicketValidationException: The CAS server returned no response.

at org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator.validate(AbstractUrlBasedTicketValidator.java:181)

Stack Trace:[hide]

javax.servlet.ServletException: org.jasig.cas.client.validation.TicketValidationException: The CAS server returned no response.

at org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:155)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:99)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

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:298)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

at java.lang.Thread.run(Unknown Source)

Caused by: org.jasig.cas.client.validation.TicketValidationException: The CAS server returned no response.

at org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator.validate(AbstractUrlBasedTicketValidator.java:181)

at org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:132)

... 15 more

2 answers

First of all - those versions of CAS client are not compatible with current authentification infrastructure in Confluence. You need to compile 3.3-SNAPSHOT version of those jars from sources (see CASC-164) as this version was not released yet.

Correction: CASC-164 is related to JIRA. Anyway, we are using this version to authenticate with Confluence 4.2. It works, but there some exceptions described in CONF-26547.

There is missing following change in your seraph-config.xml:

-    &lt;authenticator class="com.atlassian.confluence.user.ConfluenceAuthenticator"/&gt;
+    &lt;authenticator class="org.jasig.cas.client.integration.atlassian.ConfluenceCasAuthenticator"/&gt;

Thank you for your answer.

However, the same error occurred also in Confluence 4.2 and 4.2.13.

(I already modified seraph-config.xml)

Please help me.

I got this working. I think the problem is not have a "/" or having it when it shouldn't be there. I did it twice, once for Texas A&M Univeristy (both Confuence & JIRA) and Univeristiy of Arizon.

Thank you for your answer.

I checked "/" and my files. But occurred same error.

Perhaps the setting value of my files seems to be wrong.

Can you show me your web.xml and seraph-config.xml?

Please help me.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

867 views 2 13
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you