Hi All, Hope you all are doing great.
I'm using CAS 4.2.x and trying to set the proxy callback URL on my client application. First of all, I got an exception error message as below when trying to authenticate my sample web app. HTTP Status 500 - org.jasig.cas.client.validation.TicketValidationException: *type* Exception report *message* *org.jasig.cas.client.validation.TicketValidationException:* *description* *The server encountered an internal error that prevented it from fulfilling this request.* *exception* javax.servlet.ServletException: org.jasig.cas.client.validation.TicketValidationException: The supplied proxy callback url 'https://acme.test.com:9443/mywebapp/proxyCallback <https://acme.wavity.com:9443/mywebapp/proxyCallback>' could not be authenticated. org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:227) org.jasig.cas.client.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:164) *root cause* org.jasig.cas.client.validation.TicketValidationException: The supplied proxy callback url 'https://acme.test.com:9443/mywebapp/proxyCallback <https://acme.wavity.com:9443/mywebapp/proxyCallback>' could not be authenticated. org.jasig.cas.client.validation.Cas20ServiceTicketValidator.parseResponseFromServer(Cas20ServiceTicketValidator.java:84) org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator.validate(AbstractUrlBasedTicketValidator.java:201) org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:204) org.jasig.cas.client.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:164) *note* *The full stack trace of the root cause is available in the Apache Tomcat/8.0.26 logs.* ------------------------------ Apache Tomcat/8.0.26 For your reference, I set up some files such as cas-client.properties and web.xml of the sample web app, and a JSON file for the service registry as below. *cas-client.properties* casServerLoginUrl=http://accounts.test.com:8080/cas/login serverName=https://acme.test.com:9443 casServerUrlPrefix=http://accounts.test.com:8080/cas/ gateway=false proxyCallbackUrl=https://acme.test.com:9443/mywebapp/proxyCallback *web.xml of the client application* <?xml version="1.0" encoding="UTF-8"?> <!-- Copyright (c) 2008, Martin W. Kirst All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Martin W. Kirst nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> <web-app id="mywebapp" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name>mywebapp</display-name> <description> Simple sample, how to use CAS Java Client 3.x. In this sample exists a public area (/) and a private area (/protected/*). </description> <!-- Sign out not yet implemented --> <!-- <filter> <filter-name>CAS Single Sign Out Filter</filter-name> <filter-class>org.jasig.cas.client.session.SingleSignOutFilter</filter-class> </filter> --> <filter> <filter-name>CAS Authentication Filter</filter-name> <filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class> </filter> <filter> <filter-name>CAS Validation Filter</filter-name> <filter-class>org.jasig.cas.client.validation.Cas30ProxyReceivingTicketValidationFilter</filter-class> </filter> <filter> <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name> <filter-class>org.jasig.cas.client.util.HttpServletRequestWrapperFilter</filter-class> </filter> <filter> <filter-name>CAS Assertion Thread Local Filter</filter-name> <filter-class>org.jasig.cas.client.util.AssertionThreadLocalFilter</filter-class> </filter> <!-- ************************* --> <!-- Sign out not yet implemented --> <!-- <filter-mapping> <filter-name>CAS Single Sign Out Filter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> --> <filter-mapping> <filter-name>CAS Authentication Filter</filter-name> <url-pattern>/protected/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>CAS Validation Filter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>CAS Assertion Thread Local Filter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>CAS Validation Filter</filter-name> <url-pattern>/proxyCallback</url-pattern> </filter-mapping> <!-- *********************** --> <!-- Sign out not yet implemented --> <!-- <listener> <listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class> </listener> --> <!-- *********************** --> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app> *The JSON file of the service registry* { "@class" : "org.jasig.cas.services.RegexRegisteredService", "serviceId" : "^https://.*.test.com.*", "name" : "Test Web App", "theme" : "test", "id" : 175854194241240, "description" : "This is a web app for testing the theme change.", "proxyPolicy" : { "@class" : "org.jasig.cas.services.RegexMatchingRegisteredServiceProxyPolicy", "pattern" : "^https?://.*" }, "evaluationOrder" : 0, "usernameAttributeProvider" : { "@class" : "org.jasig.cas.services.DefaultRegisteredServiceUsernameProvider" }, "logoutType" : "BACK_CHANNEL", "attributeReleasePolicy" : { "@class" : "org.jasig.cas.services.ReturnAllAttributeReleasePolicy", "authorizedToReleaseCredentialPassword" : false, "authorizedToReleaseProxyGrantingTicket" : true }, "accessStrategy" : { "@class" : "org.jasig.cas.services.DefaultRegisteredServiceAccessStrategy", "enabled" : true, "ssoEnabled" : true } } As far as I understood, we just need to map a specific URL path with the CAS Validation Filter for the proxy callback URL, but looks like my assumption might not be right. Can you anyone help me to understand how to set the proxy callback URL? Appreciated for your help in advance. Thank you, David -- You received this message because you are subscribed to the Google Groups "CAS Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscr...@apereo.org. Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/86334a3e-61d9-43d3-b37e-25ce3ae839cd%40apereo.org. For more options, visit https://groups.google.com/a/apereo.org/d/optout.