|
|
|
|
@ -289,8 +289,9 @@ public class NtlmProcessingFilter extends SpringSecurityFilter implements Initia
@@ -289,8 +289,9 @@ public class NtlmProcessingFilter extends SpringSecurityFilter implements Initia
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Sets a flag denoting whether NTLM should retry whenever authentication |
|
|
|
|
* fails. Retry will only occur on an {@link AuthenticationCredentialsNotFoundException} |
|
|
|
|
* or {@link InsufficientAuthenticationException}. |
|
|
|
|
* fails. Retry will occur if the credentials are rejected by the domain controller or if an |
|
|
|
|
* an {@link AuthenticationCredentialsNotFoundException} |
|
|
|
|
* or {@link InsufficientAuthenticationException} is thrown. |
|
|
|
|
* |
|
|
|
|
* @param retryOnFailure the retry on failure flag value to set. |
|
|
|
|
*/ |
|
|
|
|
@ -412,9 +413,15 @@ public class NtlmProcessingFilter extends SpringSecurityFilter implements Initia
@@ -412,9 +413,15 @@ public class NtlmProcessingFilter extends SpringSecurityFilter implements Initia
|
|
|
|
|
} |
|
|
|
|
} catch(SmbAuthException e) { |
|
|
|
|
logger.error("Credentials " + auth + " were not accepted by the domain controller " + dcAddress); |
|
|
|
|
|
|
|
|
|
if (retryOnAuthFailure) { |
|
|
|
|
logger.debug("Restarting NTLM authentication handshake"); |
|
|
|
|
session.setAttribute(STATE_ATTR, BEGIN); |
|
|
|
|
throw new NtlmBeginHandshakeException(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
throw new BadCredentialsException("Bad NTLM credentials"); |
|
|
|
|
} finally { |
|
|
|
|
if (loadBalance) |
|
|
|
|
session.removeAttribute(CHALLENGE_ATTR); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|