Monday, July 25, 2005

Combining CASFilter with Tomcat Realms using SecurityFilter

I have managed to combine using CASFilter and SecurityFilter. This means I can use CAS for authentication and Tomcat Realms (e.g JDBCRealm, DataSourceRealm, JNDIRealm) for the actual role authorization (isUserInRole).

See this page on the CAS wiki for details:Combining CASFilter with Tomcat Realms using SecurityFilter

3 comments:

Mark McLaren said...

Hi - just trying to follow this link because I'm interested in how to casify GWT ... anyway, the link deadends at the new jasig site. I think some of your others do too.



If you have any ideas about casifying gwt, I appreciate hearing them!



Thanks,

Dave


Note: Comment imported. Original by Dave Dumaresq at 2009-09-02 17:29

Mark McLaren said...

Hi Dave,

I'm not familiar with GWT and so I cannot comment but here is the article:





Combining CASFilter with Tomcat Realms using SecurityFilter





Here are the associated attachments:





AuthenticatorFactory.java

CASAuthenticator.java

securityfilter.jar



HTH

Mark
Note: Comment imported. Original by markmc website: http://content.mark-mclaren.info/ at 2009-09-02 20:35

Mark McLaren said...

Hi again Dave,



I am a GWT newbie but I thought I'd have a further look into how to CASify GWT.





A CAS Filter can be used to redirect new users to the CAS server and after authenticating the CAS server redirects the user back to your web application. If you apply the CAS filter to the entire web application then this is a kind of CAS authentication. However, I suspect that you want to do more than that. If your entire web application is protected by a CAS Filter (and perhaps an additional authorisation Filter), then you can write GWT RPC services that can access and make use of authentication/authorisation information and therefore potentially perform tasks like proxy authentication.





I have not actually used a CAS filter in the following GWT RPC service code example but my SimpleAuth filter should be enough to give you some ideas of how a CAS filter might work with an GWT RPC service. I hope this helps:





GWTProject.zip




Note: Comment imported. Original by markmc website: http://content.mark-mclaren.info/ at 2009-09-02 23:34