I have to build a Centralized Authentication And Authorization Service. I am trying to use the JASIG CAS. But its mentioned that its a authentication protocol.My scenario is as follows.
- My application redirect to cas server on the first access.
- CAS redirect the user for google authentication
- User signs in with the desired email and redirect back to CAS
At this moment i need to validate the user in my local jdbc store for user enabled or not and if not already registered user, and the email domain is abc.com i need to auto register the user.
- CAS redirect to the calling service
My service do the validateService api call. I would like to get the user authorities for the requested service in the result response from the CAS
Does this scenario can be achieved by CAS, if extension possible for CAS, can someone suggest how to do that, basically the classes that i need to modify
Jasig CAS is highly customizable and because it is build with spring framework and spring security you can extend it to any your needs.
classes of your interests are:
PolicyBasedAuthenticationManager
AuthenticationHandler
PrincipalResolver
Jasig CAS is well documented. you should be able to find all information that you need there.