Hi, I'm having this problem when migrating CAS from 5.x to 6.x.
Any idea of what should configure to get this functionality in 6.X Thanks El viernes, 12 de febrero de 2021 a las 18:41:18 UTC+1, [email protected] escribió: > Hi Team, > > We have upgraded CAS Server to 6.2.2 and CAS client to 3.6.2. After > successful authentication, CAS client is not redirecting to our application > with samlArt param and 302 http status code. > > *We have updated the dependencies like below:* > > <dependency> > > <groupId>org.jasig.cas.client</groupId> > > <artifactId>cas-client-core</artifactId> > > <version>3.6.2</version> > > </dependency> > > <dependency> > > <groupId>org.jasig.cas.client</groupId> > > <artifactId>cas-client-support-saml</artifactId> > > <version>3.6.2</version> > > </dependency> > > We have overridden the Authentication & Validation filter class by > providing Server Name, Login server url and Server URL Prefix. > > Please find the code changes: > > *Web.xml* > > <filter> > > <filter-name>EXCASAuthenticationFilter</filter-name> > > > <filter-class>com.mercuryinsurance.epresentment.essweb.filter.EPCASAuthenticationFilter</filter-class> > > <init-param> > > <param-name>casServerLoginUrl</param-name> > > <param-value> casServerLoginUrl </param-value> > > </init-param> > > <init-param> > > <param-name>serverName</param-name> > > <param-value> serverName </param-value> > > </init-param> > > </filter> > > <filter> > > > > <filter-name>EXCASValidationFilter</filter-name> > > > <filter-class>com.mercuryinsurance.epresentment.essweb.filter.EPCASValidationFilter</filter-class> > > <init-param> > > <param-name>casServerUrlPrefix</param-name> > > <param-value>https://example.com/cas</param-value> > > </init-param> > > <init-param> > > <param-name>serverName</param-name> > > <param-value>serverName</param-value> > > </init-param> > > <init-param> > > <param-name>redirectAfterValidation</param-name> > > <param-value>true</param-value> > > </init-param> > > <init-param> > > <param-name>tolerance</param-name> > > <param-value>5000</param-value> > > </init-param> > > <init-param> > > <param-name>useSession</param-name> > > <param-value>true</param-value> > > </init-param> </filter> > > <filter> > > <filter-name>CASHttpServletRequestWrapperFilter</filter-name> > > > <filter-class>org.jasig.cas.client.util.HttpServletRequestWrapperFilter</filter-class> > > </filter> > > > > <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>CASHttpServletRequestWrapperFilter</filter-name> > > <url-pattern>/*</url-pattern> > > </filter-mapping> > > *Java changes:* > > *public* *class* EXCASAuthenticationFilter *extends* > Saml11AuthenticationFilter{ > > > > *private* *static* *final* String *CLASS_NAME* = > EXCASAuthenticationFilter.*class*.getSimpleName(); > > > > Logger log = Logger.*getLogger*(getClass()); > > FilterConfig filterConfig = *null*; > > > > @Override > > *public* *void* destroy() { > > // *TODO* Auto-generated method stub > > } > > > > @Override > > *public* *void* initInternal(FilterConfig arg0) *throws* > ServletException { > > *super*.initInternal(arg0); > > *this*.filterConfig = arg0; > > String serverName = “https://example.com” > > String casServerLoginUrl = ”https://example.com/cas/login”; > > setServerName(serverName); > > setCasServerLoginUrl(casServerLoginUrl); > > } > > > > *public* *class* EXCASValidationFilter *extends* > Saml11TicketValidationFilter > > { > > > > *private* *static* *final* String *CLASS_NAME* = > EXCASValidationFilter.*class*.getSimpleName(); > > > > FilterConfig filterConfig = *null*; > > Logger log = Logger.*getLogger*(getClass()); > > @Override > > *public* *void* destroy() { > > // *TODO* Auto-generated method stub > > } > > > > @Override > > *public* *void* initInternal(FilterConfig arg0) *throws* > ServletException { > > *this*.filterConfig = arg0; > > String serverName = ”https://example.com”; > > String casServerUrlPrefix = “https://example.com/cas”; > > Saml11TicketValidator validator = *new* > Saml11TicketValidator(casServerUrlPrefix); > > *super*.initInternal(arg0); > > setServerName(serverName); > > setTicketValidator(validator); > > setRedirectAfterValidation(*true*); > > } > > } > > After adding these code changes, control comes to our overridden filter > class and we are able to see logs with updated serverName, > casServerUrlPrefix and casServerLoginUrl. > > Still application gets redirected to default success page. > > [image: cas.png] > > We are expecting CAS to redirect to our application with samlArt > parameter. Are we missing any configuration or property? > > In few pages, they are asking to use > Cas30ProxyReceivingTicketValidationFilter and AuthenticationFilter. If we > use these filters, whether we will get samlArt param with redirection? > > > Please help how to proceed further. > Thanks in advance! > -- - Website: https://apereo.github.io/cas - Gitter Chatroom: https://gitter.im/apereo/cas - List Guidelines: https://goo.gl/1VRrw7 - Contributions: https://goo.gl/mh7qDG --- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/dc0d6ad8-bc53-4427-b40a-494326d98914n%40apereo.org.
