Upgrade CAS 5.3.16 to the latest (7.1)

244 views
Skip to first unread message

faiyaz farhan uddin

unread,
Dec 24, 2024, 8:06:58 AM12/24/24
to CAS Community
Hi all,

I am a new developer, first time working in this field, so fresh from Uni. My task it is to understand how we can migrate our product to 5.3.16 to 7.1 or we should just build it from scratch.  I was thinking to upgrade step by step, for example, 5.3.16 to 6.6.15 then 6.6.15 to 7.1 and java 8 to 11 then to 21. I have done some research and tried to find some upgrade tutorial video / article, but can't find anything.
Our product is a login web app to use SSO.

CAS 5.3.16
Java 8

I am really confuse and hopefully someone with more expertise can help and guide me. If you need more info, don't hesitate to ask. Thank you!

Farhan

Mohamed Amdouni

unread,
Dec 24, 2024, 10:09:04 AM12/24/24
to cas-...@apereo.org
Hello,

I recently upgraded cas from 5.x to 6.6.x

I recommend you to strat a new branch and don’t try to upgrade.

- you will use gradle instead of maven : use the cas initializer to create a brand new project
- you don’t need to upgrade version by version just read the release notes on GitHub or the site … some of them are missing ….
- some cas peoperties should be added removed : activate log on startup
- some properties needs to be in bootstrap.properties
- you should take a look to the spring doc sometimes to understand the properties related to spring 
- you will need to export or recreate services because the db schema changed 
- some new behaviour will be noticed regarding timeouts 
- I don’t know if cas management will be used in cas 7 or you should use palantir … check the docs.
- the Misagh blog helped me a lot 
https://fawnoos.com/tags/ you will find a lot of examples using the new version
- this mail group is also helpful especially Ray :)

Good luck 

Best regards.

--
- Website: https://apereo.github.io/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 visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/656f3752-f32d-44a4-a755-07e362c91720n%40apereo.org.

Y G

unread,
Dec 25, 2024, 10:53:44 AM12/25/24
to CAS Community, Mohamed Amdouni
Hello,
Based on my experience, i recommend the following:

- Familiarize yourself with these technolgies: 
  - Java 8+ (Language that CAS is written, most likely you won't write code, but if some customizations done before on older CAS, you'll need to apply them to the newer versions too)
  - Spring Boot 3+ ( A Backend framework that CAS uses and configures )
  - Tymeleaf(if you need to make some web interface changes)
  - SQL(if a database-backed operation is done in older CAS version i.e user's are in a db table), 
  - Gradle+Maven(These are the build tools that is used by CAS's newer and older version projects. Focus on gradle because for the new CAS versions you'll need it)
  - Redis (if used in your firm - for caching or ticketing)
  - Hazelcast (if used in your firm - for  caching or ticketing) )
  - Git (always control your code with versioning)

- Read the CAS docs thoroughly. Familiarize yourself with CAS's mentality, how it does:
     - The authentication for your case(is your users inside a db, ldap or 3rd party) and check the configurations for it.
     - How multi-factor authentication configured and triggered(conditionally activated by the case you configure) in CAS (if it's used in your case)
     - How it fetches your users details (user attributes) and returns them if necessary and if configured
     - How your application's session is different from CAS's session, and CAS does not manage it for you(check how it's been handled in your app)
     - How does CAS do the ticketing (TGT,ST, PGT concepts and flows)
     - How is each of your/your firm's app defined in CAS (it's called service registry), and with a basic JSON structure how can it be handled easily with learning them
     - How CAS can use other types of protocols (CAS has its own and you should learn it, others as well)
     - How you can change the interface (i'm talking about the CAS web pages and its fragments)
     - How you can audit and check the logs of the CAS

- After reading CAS docs and have a basic understanding of the configurations. Check your older CAS setup, any customizations, how it's configured to do the authentication, ticketing(and how it's been configured to be cached), service registry, any audit configs enabled, what logging configurations done so far, any actuators that has been actually enabled and exposed.

-  I don't think that making a incremental upgrade is a good choice, doing upgrades from 5.x to 6.x and  from 6.x to 7.x not be mattered in the end as long as you show the 7.x result, but you will learn tremendous amount of things. I think learning the ropes and doing a fresh gradle overlay project with version 7 and making the necessary configurations is cost-effective.

- Check if your current CAS setup is being used with some custom operations (custom auth handler, custom communications)
- Generate yourself a fresh CAS 7.x from the cas initializer, open the project with your preferred IDE (i recommend using IntellijIdea Ultimate, it costs, but lets you do things faster) generate yourself a certificate (either using the gradle task inside the overlay project, or search and learn to run a command to generate manually and place it on the necessary place)
- Successfully compile and run the new project on your local machine, login with the default static user (i think this is the best moment on the learning curve that you've done a remarkable job to learn and apply something by yourself, at least i felt it then)
- Check that in basic setup, CAS uses static user lists inside and you can change it to your firm's style (are users in db, ldap or it uses 3rd party provider)
- And from then on, with comparing old CAS's functionality, update and configure the new project settings to the desired state. Remember to check/test/verify the changes.
- Lastly, learn how does your firm publish the finished state of the old project, familiarize of any new technology if encountered, and do a same style of it for your new CAS project.


You can check out the notes i've written a while back. https://gist.github.com/Kambaa/ba276643175e2c88666cce823d691d68

Remember to mark Cas docs, fawnoos blog and this mailing list as favorite in your web browser for this task, google and ai helps for explaining things too :)

I hope these shed light and guidance on how you're gonna approach your task and wish you a great success.

Have a nice day,
YG

24 Aralık 2024 Salı tarihinde saat 18:09:04 UTC+3 itibarıyla Mohamed Amdouni şunları yazdı:

Richard Frovarp

unread,
Dec 27, 2024, 10:18:20 PM12/27/24
to cas-...@apereo.org
As others have said, you start from scratch. The CAS IdP can do a great many things. You need to understand what your current setup is doing. In particular look at the dependencies from the Maven pom to tell you what needs to be done. From there build out the new system one piece at a time is easiest. Get authentication working, then work on the rest. A lot has changed between 5 and 7, including a rename of many of the config values. So you will need to work your way through them. The logs are good, so pay attention to what they say.
Reply all
Reply to author
Forward
0 new messages