Help needed in upgrading CAS Server

466 views
Skip to first unread message

Morning Star (vidivelli)

unread,
Sep 26, 2022, 11:23:24 AM9/26/22
to CAS Community
Hi all,
Thanks for your help in advance.

We are working on upgrading CAS server version from 6.3.7.4 to 6.5.3.
Can someone please help with the checklist?

At least if someone share the pom.xml file of 6.5.3 version, it will be very helpful.

Regards,
Anusuya.

Jonathan MacDonald

unread,
Sep 26, 2022, 1:52:01 PM9/26/22
to CAS Community, anusu...@gmail.com
Hi Anusuya,

Are you using the CAS Initializr?  I recently did a similar upgrade and the recommended approach is to start with a fresh install via the CAS Initializr.  Then, apply your customizations.  I did so incrementally and it worked well.


Note, I ended up using Docker so that I could run the specific version I wanted, vs hitting the Heroku instance.  As documented, run the the initializer via:

docker run --rm -p 8080:8080 apereo/cas-initializr:6.5.3  # You can see the tags here: https://hub.docker.com/r/apereo/cas-initializr/tags

With the local instance running, you could then initialize your vanilla project with:

curl -d type=cas-overlay -d casVersion=6.5.3 -d baseDir=./cas-6.5.3 http://localhost:8080/starter.tgz | tar -xzvf -

Hope that helps!

Jon

Łukasz Woźniak

unread,
Sep 26, 2022, 3:57:28 PM9/26/22
to cas-...@apereo.org
I Was upgrading cas from same version to 6.5.x . It wasn't hard. It depends on module You are using. Upgrade to 6.5.8, in lower version of 6.5.x there is a bug with languages and delegation authentication.

--
- 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 cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/fd03b3be-275a-4380-ba1a-072d60cd62cdn%40apereo.org.

Morning Star (vidivelli)

unread,
Sep 27, 2022, 10:37:09 AM9/27/22
to CAS Community, Łukasz Woźniak
Thanks Jonathan & Lukasz for your prompt response.
We are working on fixing vulnerability issue. As a part of it, we have many jar files. Along with that, we have  cas-server-cor...@6.3.7.4?type=jar and  cas-server-w...@6.3.7.4. Its very difficult to change the version of these 2 jars alone. So, just thinking is there any easy way to upgrade CAS server version from 6.3.7 to 6.5.+.

Which version of Client we should use if we switch to 6.5.8? As of now, we are deploying the CAS war file in tomcat server. Is this possible when we switch to 6.5+ version?

If I change the cas.version to 6.5.8, I am getting opensaml and shibboleth dependency issue :-( Atleast if this dependency issue is solved, I should be able to proceed further.
Missing artifact net.shibboleth.tool:xmlsectool:jar:3.0.0
Missing artifact net.shibboleth.utilities:java-support:jar:8.2.1
Missing artifact org.opensaml:opensaml-core:jar:4.1.1
Missing artifact org.opensaml:opensaml-messaging-impl:jar:4.1.1
Missing artifact org.opensaml:opensaml-profile-api:jar:4.1.1
Missing artifact org.opensaml:opensaml-profile-impl:jar:4.1.1
Missing artifact org.opensaml:opensaml-saml-api:jar:4.1.1
Missing artifact org.opensaml:opensaml-saml-impl:jar:4.1.1
Missing artifact org.opensaml:opensaml-security-api:jar:4.1.1
Missing artifact org.opensaml:opensaml-security-impl:jar:4.1.1
Missing artifact org.opensaml:opensaml-soap-api:jar:4.1.1
Missing artifact org.opensaml:opensaml-storage-impl:jar:4.1.1
Missing artifact org.opensaml:opensaml-xacml-saml-api:jar:4.1.1
Missing artifact org.opensaml:opensaml-xacml-saml-impl:jar:4.1.1
Missing artifact org.opensaml:opensaml-xmlsec-impl:jar:4.1.1
Missing artifact org.opensaml:opensaml:jar:4.1.1
overlay [ id org.apereo.cas:cas-server-webapp-tomcat] is not a dependency of the project.

Please find my pom.xml file below:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd ">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.apereo.cas</groupId>
    <artifactId>cas</artifactId>
    <packaging>war</packaging>
    <version>1.0</version>

    <build>
        <plugins>
            <plugin>
                <groupId>com.rimerosolutions.maven.plugins</groupId>
                <artifactId>wrapper-maven-plugin</artifactId>
                <version>0.0.5</version>
                <configuration>
                    <verifyDownload>true</verifyDownload>
                    <checksumAlgorithm>MD5</checksumAlgorithm>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.6</version>
               
                <configuration>
                    <warName>cas</warName>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <recompressZippedFiles>false</recompressZippedFiles>
                    <archive>
                        <compress>false</compress>
                        <manifestFile>${manifestFileToUse}</manifestFile>
                    </archive>
                    <overlays>
                        <overlay>
                            <groupId>org.apereo.cas</groupId>
                            <artifactId>cas-server-webapp${app.server}</artifactId>
                            <excludes>
                                <exclude>WEB-INF/lib/spring-beans-5.2.12.RELEASE.jar</exclude>                                
                            </excludes>
                        </overlay>
                    </overlays>
                    <!-- <packagingExcludes>WEB-INF/lib/jakarta.el-3.0.3.jar</packagingExcludes> -->
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
            </plugin>
        </plugins>
        <finalName>cas</finalName>
    </build>

    <properties>
        <cas.version>6.3.7.4</cas.version>
        <springboot.version>2.2.8.RELEASE</springboot.version>
        <ldaptive.version>2.0.1</ldaptive.version>
        <lombok.version>1.18.12</lombok.version>
        <app.server>-tomcat</app.server>

        <mainClassName>org.springframework.boot.loader.WarLauncher</mainClassName>
        <isExecutable>false</isExecutable>
        <manifestFileToUse>${project.build.directory}/war/work/org.apereo.cas/cas-server-webapp${app.server}/META-INF/MANIFEST.MF</manifestFileToUse>

        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <profiles>
        <profile>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <id>default</id>
            <dependencies>
                <!-- https://mvnrepository.com/artifact/org.springframework/spring-beans -->
                <dependency>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-beans</artifactId>
                    <version>5.2.20.RELEASE</version>
                </dependency>
                <dependency>
                    <groupId>org.apereo.cas</groupId>
                    <artifactId>cas-server-support-saml</artifactId>
                    <version>${cas.version}</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>nu</groupId>
                    <artifactId>nudetect</artifactId>
                    <version>2.2.131039</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>com.squareup.okhttp3</groupId>
                    <artifactId>okhttp</artifactId>
                    <version>4.8.0</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.apereo.cas</groupId>
                    <artifactId>cas-server-webapp${app.server}</artifactId>
                    <version>${cas.version}</version>
                    <type>war</type>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.apereo.cas</groupId>
                    <artifactId>cas-server-core-util-api</artifactId>
                    <version>${cas.version}</version>
                    <exclusions>
                        <exclusion>
                            <groupId>com.squareup.okhttp3</groupId>
                            <artifactId>okhttp</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>org.apereo.cas</groupId>
                    <artifactId>cas-server-core-webflow</artifactId>
                    <version>${cas.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apereo.cas</groupId>
                    <artifactId>cas-server-core-webflow-api</artifactId>
                    <version>${cas.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apereo.cas</groupId>
                    <artifactId>cas-server-support-ldap-core</artifactId>
                    <version>${cas.version}</version>
                    <exclusions>
                        <exclusion>
                            <groupId>*</groupId>
                            <artifactId>*</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>org.apereo.cas</groupId>
                    <artifactId>cas-server-support-hazelcast-ticket-registry</artifactId>
                    <version>${cas.version}</version>
                </dependency>
                <!-- https://mvnrepository.com/artifact/com.hazelcast/hazelcast -->
                <dependency>
                    <groupId>com.hazelcast</groupId>
                    <artifactId>hazelcast</artifactId>
                    <version>4.0.1</version>
                </dependency>
                <dependency>
                    <groupId>org.apereo.cas</groupId>
                    <artifactId>cas-server-core-web-api</artifactId>
                    <version>${cas.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apereo.cas</groupId>
                    <artifactId>cas-server-support-json-service-registry</artifactId>
                    <version>${cas.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apereo.cas</groupId>
                    <artifactId>cas-server-core-authentication-api</artifactId>
                    <version>${cas.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.ldaptive</groupId>
                    <artifactId>ldaptive</artifactId>
                    <version>${ldaptive.version}</version>
                    <exclusions>
                        <exclusion>
                            <groupId>*</groupId>
                            <artifactId>*</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>org.projectlombok</groupId>
                    <artifactId>lombok</artifactId>
                    <version>${lombok.version}</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.apereo.cas</groupId>
                    <artifactId>cas-server-support-throttle</artifactId>
                    <version>${cas.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.attoparser</groupId>
                    <artifactId>attoparser</artifactId>
                    <version>2.0.5.RELEASE</version>
                </dependency>
                <dependency>
                    <groupId>org.apereo.cas</groupId>
                    <artifactId>cas-server-support-rest</artifactId>
                    <version>${cas.version}</version>
                </dependency>
               
                 <dependency>
                    <groupId>io.projectreactor.netty</groupId>
                    <artifactId>reactor-netty</artifactId>
                    <version>0.9.9.RELEASE</version>
                    <exclusions>
                        <exclusion>
                            <groupId>*</groupId>
                            <artifactId>*</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
               
               
            </dependencies>
        </profile>

        <profile>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <id>exec</id>
            <properties>
                <mainClassName>org.apereo.cas.web.CasWebApplication</mainClassName>
                <isExecutable>true</isExecutable>
                <manifestFileToUse></manifestFileToUse>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.soebes.maven.plugins</groupId>
                        <artifactId>echo-maven-plugin</artifactId>
                        <version>0.3.0</version>
                        <executions>
                            <execution>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>echo</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <echos>
                                <echo>Executable profile to make the generated CAS web
                                    application executable.</echo>
                            </echos>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <id>bootiful</id>
            <properties>
                <app.server>-tomcat</app.server>
                <isExecutable>false</isExecutable>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>org.apereo.cas</groupId>
                    <artifactId>cas-server-webapp${app.server}</artifactId>
                    <version>${cas.version}</version>
                    <type>war</type>
                    <scope>provided</scope>
                </dependency>
            </dependencies>
        </profile>

        <profile>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <id>pgp</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.s4u.plugins</groupId>
                        <artifactId>pgpverify-maven-plugin</artifactId>
                        <version>1.1.0</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <pgpKeyServer>hkp://pool.sks-keyservers.net</pgpKeyServer>
                            <pgpKeysCachePath>${settings.localRepository}/pgpkeys-cache</pgpKeysCachePath>
                            <scope>test</scope>
                            <verifyPomFiles>true</verifyPomFiles>
                            <failNoSignature>false</failNoSignature>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>

Ray Bon

unread,
Sep 27, 2022, 1:43:37 PM9/27/22
to cas-...@apereo.org, l.g.w...@gmail.com
Anusuya,

Cas 6.5 will run in a stand alone tomcat.
If you upgrade your cas version, you will have to upgrade your third
party jars as well.
Also, some cas packages may have changed name.

To find where those missing artifacts are located, run
mvn dependency:tree

Ray

On Tue, 2022-09-27 at 07:37 -0700, Morning Star (vidivelli) wrote:
> Notice: This message was sent from outside the University of Victoria
> email system. Please be cautious with links and sensitive
> information.


>
> Thanks Jonathan & Lukasz for your prompt response.
> We are working on fixing vulnerability issue. As a part of it, we

> have many jar files. Along with that, we have  cas-server-core-
> servic...@6.3.7.4?type=jar and  cas-server-w...@6.3.7.4.

> api</artifactId>


>                     <version>${cas.version}</version>
>                 </dependency>
>                 <dependency>
>                     <groupId>org.apereo.cas</groupId>

>                     <artifactId>cas-server-support-ldap-

> registry</artifactId>


>                     <version>${cas.version}</version>
>                 </dependency>
>                 <dependency>
>                     <groupId>org.apereo.cas</groupId>

>                     <artifactId>cas-server-core-authentication-

Morning Star (vidivelli)

unread,
Sep 29, 2022, 12:18:29 PM9/29/22
to CAS Community, Ray Bon, Łukasz Woźniak
Thanks Ray.
I was able to make my local up by upgrading CAS to 6.5.8. Hope this version doesn't have any vulnerability jars.
As there is a change in folder structure for upgraded version, under which folder I should keep "casGenericSuccessView.html"

Regards,
Anusuya.

Ray Bon

unread,
Sep 29, 2022, 3:30:49 PM9/29/22
to cas-...@apereo.org, l.g.w...@gmail.com
Anusuya,

It would be in
src/main/resources/templates/login

You can search for it here https://github.dev/apereo/cas/tree/6.5.x (requires sign in) or you can clone the main cas project and search for the file on your local.

Ray

Morning Star (vidivelli)

unread,
Sep 30, 2022, 2:58:52 PM9/30/22
to CAS Community, Ray Bon, Łukasz Woźniak
Thanks Ray. It was very helpful. 

Couple of questions:
Compatible CAS client version for 6.5.8
I'm not able to view  custom exception message in UI. 
Cas.authn.errors.exception=com.xyz.exceptionclass.
Whether this property is correct? 
Custom_messages.properties file should be placed under resources folder right? 

Thanks, 
Anusuya. 

Ray Bon

unread,
Oct 3, 2022, 1:09:23 PM10/3/22
to anusu...@gmail.com, cas-...@apereo.org, l.g.w...@gmail.com
Anusuya,

Is your custom exception (com.xyz.exceptionclass) being thrown?

If you just want to replace a message that is already built into cas, you can add your override of the message to custom_messages.properties, https://fawnoos.com/2018/06/10/cas-userinterface-customizations/

Ray
Reply all
Reply to author
Forward
0 new messages