Author: markt
Date: Wed May 14 21:34:31 2014
New Revision: 1594731

URL: http://svn.apache.org/r1594731
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56523
When using SPNEGO authentication, log the exceptions associated with failed 
user logins at debug level rather than error level.

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    
tomcat/tc7.0.x/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1594730

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java?rev=1594731&r1=1594730&r2=1594731&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java
 Wed May 14 21:34:31 2014
@@ -262,7 +262,14 @@ public class SpnegoAuthenticator extends
             response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
             return false;
         } catch (PrivilegedActionException e) {
-            log.error(sm.getString("spnegoAuthenticator.serviceLoginFail"), e);
+            Throwable cause = e.getCause();
+            if (cause instanceof GSSException) {
+                if (log.isDebugEnabled()) {
+                    
log.debug(sm.getString("spnegoAuthenticator.serviceLoginFail"), e);
+                }
+            } else {
+                
log.error(sm.getString("spnegoAuthenticator.serviceLoginFail"), e);
+            }
             response.setHeader("WWW-Authenticate", "Negotiate");
             response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
             return false;

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1594731&r1=1594730&r2=1594731&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed May 14 21:34:31 2014
@@ -182,6 +182,11 @@
         <bug>56501</bug>: <code>HttpServletRequest.getContextPath()</code>
         should return the undecoded context path used by the user agent. 
(markt)
       </fix>
+      <fix>
+        <bug>56523</bug>: When using SPNEGO authentication, log the exceptions
+        associated with failed user logins at debug level rather than error
+        level. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to