From 75ea798249e412d9bcfa41adaf9f6b36db653082 Mon Sep 17 00:00:00 2001 From: Mike Wiesner Date: Fri, 3 May 2013 12:03:27 +0200 Subject: [PATCH] Kerberos settings are now in kerberos.properties instead of in XML --- .../main/webapp/WEB-INF/kerberos.properties | 22 +++++++++++++++++ .../webapp/WEB-INF/server-side-kerberos.xml | 17 ++++++++----- .../webapp/WEB-INF/spnego-with-form-login.xml | 19 +++++++++------ ...pnego-with-server-side-kerberos-option.xml | 24 +++++++++++-------- .../src/main/webapp/WEB-INF/spnego.xml | 20 ++++++++++------ 5 files changed, 72 insertions(+), 30 deletions(-) create mode 100644 spring-security-kerberos-sample/src/main/webapp/WEB-INF/kerberos.properties diff --git a/spring-security-kerberos-sample/src/main/webapp/WEB-INF/kerberos.properties b/spring-security-kerberos-sample/src/main/webapp/WEB-INF/kerberos.properties new file mode 100644 index 0000000..5e24b68 --- /dev/null +++ b/spring-security-kerberos-sample/src/main/webapp/WEB-INF/kerberos.properties @@ -0,0 +1,22 @@ +# These settings are always needed +# ================================ + +krb.debug=true + + +# These settings are only needed for SPNEGO Authentication +# ======================================================== + +krb.service.prinicipal=HTTP/web.springsource.com + +# Setting keyTabLocation to a classpath resource will most likely not work in a Java EE application Server +# See the Javadoc of SunJaasKerberosTicketValidator for more information on that +krb.keytab.location=file:/etc/web-springsource-com.keytab + + +# These settings are only needed for server side Kerberos Authentication +# ====================================================================== + +# No Prefix is supported in krb.conf.location. It must always be an absolute path. +krb.conf.location=/etc/krb5.conf + diff --git a/spring-security-kerberos-sample/src/main/webapp/WEB-INF/server-side-kerberos.xml b/spring-security-kerberos-sample/src/main/webapp/WEB-INF/server-side-kerberos.xml index d3d279e..09dfd55 100644 --- a/spring-security-kerberos-sample/src/main/webapp/WEB-INF/server-side-kerberos.xml +++ b/spring-security-kerberos-sample/src/main/webapp/WEB-INF/server-side-kerberos.xml @@ -1,8 +1,11 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:sec="http://www.springframework.org/schema/security" + xmlns:context="http://www.springframework.org/schema/context" + xsi:schemaLocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd + http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd"> @@ -18,7 +21,7 @@ class="org.springframework.security.extensions.kerberos.KerberosAuthenticationProvider"> - + @@ -26,9 +29,9 @@ - + - + + + diff --git a/spring-security-kerberos-sample/src/main/webapp/WEB-INF/spnego-with-form-login.xml b/spring-security-kerberos-sample/src/main/webapp/WEB-INF/spnego-with-form-login.xml index 2d62a9b..e64f371 100644 --- a/spring-security-kerberos-sample/src/main/webapp/WEB-INF/spnego-with-form-login.xml +++ b/spring-security-kerberos-sample/src/main/webapp/WEB-INF/spnego-with-form-login.xml @@ -1,8 +1,11 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:sec="http://www.springframework.org/schema/security" + xmlns:context="http://www.springframework.org/schema/context" + xsi:schemaLocation="http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd + http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd"> @@ -32,11 +35,11 @@ - + - - + + @@ -45,7 +48,8 @@ - + + @@ -28,7 +31,7 @@ class="org.springframework.security.extensions.kerberos.KerberosAuthenticationProvider"> - + @@ -39,11 +42,11 @@ - + - - + + @@ -51,9 +54,8 @@ - - - + + + + diff --git a/spring-security-kerberos-sample/src/main/webapp/WEB-INF/spnego.xml b/spring-security-kerberos-sample/src/main/webapp/WEB-INF/spnego.xml index d041cde..8fd3d0f 100644 --- a/spring-security-kerberos-sample/src/main/webapp/WEB-INF/spnego.xml +++ b/spring-security-kerberos-sample/src/main/webapp/WEB-INF/spnego.xml @@ -1,8 +1,11 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:sec="http://www.springframework.org/schema/security" + xmlns:context="http://www.springframework.org/schema/context" + xsi:schemaLocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd + http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd"> @@ -29,11 +32,11 @@ - + - - + + @@ -42,7 +45,8 @@ - + + + +