Hi Shavim,
I didn't use 5.2.4 so the names may be different. I've never used keycloak either, but maybe there is a way to change what value is released there instead of a CAS workaround.
A CAS workaround is to change the casGenericSuccessView.html file. You'll need to obtain the default
casGenericSuccessView.html file, if you built CAS from one of the overlays you should be able to obtain the template by a built-in gradle or maven task I believe. I use gradle with the explodeWar task, then grab the view from ./build/cas-resources/templates/casGenericSuccessView.html and move it to ./src/main/resources/templates/ so any changes made will be applied on the next build.
Then change this line:
<p th:utext="#{screen.success.success(${authentication.principal.id})}">You, <strong>username</strong>, have successfully logged into the Central Authentication Service.
to
<p th:utext="#{screen.success.success(${authentication.principal.attributes.user_name})}">You, <strong>username</strong>, have successfully logged into the Central Authentication Service.
Or whatever your attribute is called when returned by keycloak.
and run "./gradlew clean build" or maven equivalent to rebuild the cas.war file.