[cas-dev] PrincipalConverter

Stephen A. Cochran stephen.a.cochran at Dartmouth.EDU
Tue Jun 27 08:23:41 EDT 2006


On Jun 27, 2006, at 4:11 AM, Velpi wrote:

> That's certainly a solid solution, but it's not configurable at  
> all, am I right?
> It would be great if another principal like yours could actually be  
> configured
> to replace the default SimplePrincipal (most people don't like to  
> change the
> code to much, certainly because it's usually a (fatal) annoyance  
> when upgrading).

Not configurable without recompiling and deploying, true. But it's  
not something that I would see changing often.

I agree about changing code, which is why I didn't just change the  
SimplePrincipal class, I made a new class. I also did the same with  
all of the Auth handlers, mostly just duplicated and renamed to be  
something like x509DartAuthenticationHanlder. This avoids the upgrade  
problems because I didn't touch the distribution code. Thinking back,  
the x509 one was really the only default one I had to duplicate/ 
change. Wrote my own User/Pass because of our unusual directory system.

I guess to save duplicating auth handlers and making only a minor  
change a config option on what default Principal class to use would  
solve the problem assuming Java lets you do something like that.  
Honestly what I did was not difficult, considering at the time I  
didn't know anything about the structure of CAS and hadn't worked  
with a Java app since before ant/tomcat/maven etc existed. I also  
don't see the benefit in being able to reconfigure the Principal  
without redeploying, I can't imagine I'd ever use that functionality.

Steve Cochran
Dartmouth College


More information about the cas-dev mailing list