You can use this module as dependency in your own modules.
<dependency>
<groupId>io.github.johnjcool</groupId>
<artifactId>keycloak-cas-services</artifactId>
<version>4.4.0.Final</version>
</dependency>
- Download keycloak version from https://www.keycloak.org/
- Download corresponding keycloak-cas-services version from maven central
- Copy keycloak-cas-services-.jar to
<KEYCLOAK_INSTALLATION_DIR>/standalone/deployments
- Start keycloak with
<KEYCLOAK_INSTALLATION_DIR>/bin/standalone.<sh|bat>
- Navigate to http://localhost:8080 and create an admin account
Start ready to use docker image:
docker run -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=xxxxxx johnjcool/keycloak-cas
- Navigate to http://localhost:8080/auth/admin
- Login with your admin credentials
- Navigate to Themes Important!!! You have to do this on master realm
- Switch Admin Console Theme to keycloak-extended
- Signout
- Login with your admin credentials
- Navigate to Identity Providers
- Add provider CAS
- Configure CAS provider
- Click Save
- Navigate to Mappers to get Attributes from CAS
- Configure Attribute Mapper for email, firstName, lastName
- Signout and Central Authentication Service should be available
- Login with your admin credentials
- Navigate to Authetication
- Click on Actions/Config for Identity Provider Redirector
- Set Alias and Default Identiy Provider to
cas
- Signout and now you are automatically redirected to CAS for Login
Have fun!