Note that there are some explanatory texts on larger screens.

plurals
  1. POSpring Kerberos Extension, SSO and Machines Outside the Domain
    primarykey
    data
    text
    <p>I have been POC'ing with milestone 2 of the Kerberos extension to achieve single sign-on. </p> <p><strong>Quick summary of my setup:</strong><br> <strong>KDC:</strong> Windows Server 2003 (SP2)<br> <strong>Web server:</strong> Ubuntu 10.04, Tomcat 5.5, Java 1.6.0_22 (not on the domain)<br> <strong>Spring:</strong> Framework 3.0.5, Security 3.0.4, Kerberos Extension 1.0.0 M2 </p> <p>I have setup my configuration to first attempt SPNEGO authentication and if it fails to then redirect to a login page. This is done by setting <strong>SpnegoAuthenticationProcessingFilter's</strong> "failureHandler" property. I have successfully tested this on Windows machines (XP and 7) that are in and out of the domain. The machines that are outside the domain gets redirected to the login page and then can successfully login.<br> Here is my config: </p> <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xmlns:beans="http://www.springframework.org/schema/beans" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd"&gt; &lt;http entry-point-ref="spnegoEntryPoint" auto-config="false"&gt; &lt;intercept-url pattern="/login*" access="IS_AUTHENTICATED_ANONYMOUSLY" /&gt; &lt;intercept-url pattern="/j_spring_security_check*" access="IS_AUTHENTICATED_ANONYMOUSLY"/&gt; &lt;intercept-url pattern="/**" access="IS_AUTHENTICATED_FULLY" /&gt; &lt;custom-filter ref="spnegoAuthenticationProcessingFilter" position="BASIC_AUTH_FILTER" /&gt; &lt;form-login login-page="/login.html" default-target-url="/" always-use-default-target="true"/&gt; &lt;/http&gt; &lt;authentication-manager alias="authenticationManager"&gt; &lt;authentication-provider ref="kerberosServiceAuthenticationProvider" /&gt; &lt;authentication-provider ref="kerberosAuthenticationProvider"/&gt; &lt;/authentication-manager&gt; &lt;beans:bean id="spnegoEntryPoint" class="org.springframework.security.extensions.kerberos.web.SpnegoEntryPoint" /&gt; &lt;beans:bean id="spnegoAuthenticationProcessingFilter" class="org.springframework.security.extensions.kerberos.web.SpnegoAuthenticationProcessingFilter"&gt; &lt;beans:property name="failureHandler"&gt; &lt;beans:bean class="org.springframework.security.web.authentication.ExceptionMappingAuthenticationFailureHandler"&gt; &lt;beans:property name="defaultFailureUrl" value="/login.html" /&gt; &lt;beans:property name="allowSessionCreation" value="true"/&gt; &lt;/beans:bean&gt; &lt;/beans:property&gt; &lt;beans:property name="authenticationManager" ref="authenticationManager" /&gt; &lt;/beans:bean&gt; &lt;beans:bean id="kerberosServiceAuthenticationProvider" class="org.springframework.security.extensions.kerberos.KerberosServiceAuthenticationProvider"&gt; &lt;beans:property name="ticketValidator"&gt; &lt;beans:bean class="org.springframework.security.extensions.kerberos.SunJaasKerberosTicketValidator"&gt; &lt;beans:property name="servicePrincipal" value="HTTP/mywebserver.corpza.corp.co.za"/&gt; &lt;beans:property name="keyTabLocation" value="classpath:mywebserver.keytab" /&gt; &lt;beans:property name="debug" value="true"/&gt; &lt;/beans:bean&gt; &lt;/beans:property&gt; &lt;beans:property name="userDetailsService" ref="dummyUserDetailsService" /&gt; &lt;/beans:bean&gt; &lt;beans:bean id="kerberosAuthenticationProvider" class="org.springframework.security.extensions.kerberos.KerberosAuthenticationProvider"&gt; &lt;beans:property name="kerberosClient"&gt; &lt;beans:bean class="org.springframework.security.extensions.kerberos.SunJaasKerberosClient"&gt; &lt;beans:property name="debug" value="true" /&gt; &lt;/beans:bean&gt; &lt;/beans:property&gt; &lt;beans:property name="userDetailsService" ref="dummyUserDetailsService" /&gt; &lt;/beans:bean&gt; &lt;beans:bean class="org.springframework.security.extensions.kerberos.GlobalSunJaasKerberosConfig"&gt; &lt;beans:property name="debug" value="true" /&gt; &lt;beans:property name="krbConfLocation" value="/etc/krb5.conf" /&gt; &lt;/beans:bean&gt; &lt;beans:bean id="dummyUserDetailsService" class="main.server.DummyUserDetailsService"/&gt; &lt;/beans:beans&gt; </code></pre> <p>When the Windows machine is outside the domain my web server responds with the <strong>"WWW-Authenticate Negotiate</strong>" header (as per usual) to which the Windows machine responds to with a NTLM header ("Negotiate TlRM..."), where the <strong>SpnegoAuthenticationProcessingFilter</strong> then says "Negotiate Header was invalid..." and awesomly redirects the user to the login page. Great.</p> <p><strong>The Issue:</strong><br> There are a number of Mac and Linux machines that are permanently outside the domain which would need to use this web app. When they hit the web app (with Firefox 3.6) my web server responds with the expected <strong>"WWW-Authenticate Negotiate"</strong> header to inform the client that the web app is Kerberized, BUT neither the Mac or Linux machines responds at all. Thus the <strong>SpnegoAuthenticationProcessingFilter</strong> doesn't get entered again and hence no failure and subsequently no redirection to the login page takes place.</p> <p><strong>The Question:</strong><br> Why doesn't the Mac and Linux machines respond in the same way as the Windows machines (can't belive I just asked that...)?</p> <p>I know that when the Mac and Linux machines obtain a ticket (via kinit) they are able to authenticated but this doesn't seem like a good solution at all as it requires effort from the user to provide credentials etc. where the tickets expires as well.</p> <p>So is there any way that we can get these machines to send back a NTLM header as the Windows machines does? Or if there are any other suggestions/ways please let me know.</p> <p>B.t.w. I did configure the Firefoxes that I used on to test on the Mac and Linux machines (<strong>"network.negotiate-auth.delegation-uris"</strong> and <strong>"network.negotiate-auth.trusted-uris"</strong> was set to ".corpza.corp.co.za").</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload