mattlangston
Dec 8th, 2004, 04:32 PM
My company uses Kerberos servers for Unix and Windows authentication. I want to set up CAS using Acegi and Spring for a single sign on service for all of my company's intranet applications. However, I can't find a clean "Spring Way" of telling Acegi's JaasAuthenticationProvider which Kerberos servers to use.
My problem is simple: I need to define two system properties in order for JaasAuthenticationProvider to use Kerberos (see http://java.sun.com/j2se/1.4.2/docs/guide/security/jgss/tutorials/KerberosReq.html):
java.security.krb5.realm=xx.xx.com
java.security.krb5.kdc=yy.yy.com
My initial attempt (which just feels non-Springy) was to create a simple Java bean with two setters, setKrb5Realm() and setKrb5Kdc(), which internally calls java.lang.System.setProperties(). I do configure this bean in /WEB-INF/applicationContext.xml, but it seems like there should be a "Spring Way" to set system properties.
I tried using a technique to set system properties described in http://forum.springframework.org/showthread.php?t=11897, but it blows up Tomcat with a java.lang.NullPointerException coming from Catalina.
Has anyone else used Acegi and Kerberos in a Web application successfully? How do I set these two Kerberos system properties in /WEB-INF/applicationContext.xml? Am I all wrong in my approach?
Warmest regards, Matt
My problem is simple: I need to define two system properties in order for JaasAuthenticationProvider to use Kerberos (see http://java.sun.com/j2se/1.4.2/docs/guide/security/jgss/tutorials/KerberosReq.html):
java.security.krb5.realm=xx.xx.com
java.security.krb5.kdc=yy.yy.com
My initial attempt (which just feels non-Springy) was to create a simple Java bean with two setters, setKrb5Realm() and setKrb5Kdc(), which internally calls java.lang.System.setProperties(). I do configure this bean in /WEB-INF/applicationContext.xml, but it seems like there should be a "Spring Way" to set system properties.
I tried using a technique to set system properties described in http://forum.springframework.org/showthread.php?t=11897, but it blows up Tomcat with a java.lang.NullPointerException coming from Catalina.
Has anyone else used Acegi and Kerberos in a Web application successfully? How do I set these two Kerberos system properties in /WEB-INF/applicationContext.xml? Am I all wrong in my approach?
Warmest regards, Matt