Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging level adjustments #1

Merged
merged 2 commits into from
May 28, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Next Release
============

Misc
----

* Adjusted some logging levels to make waffle less noisy

First release off [Github](http://github.com/dblock/waffle).

1.4 (6/21/2011)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void doFilter(ServletRequest sreq, ServletResponse sres,
HttpServletRequest request = (HttpServletRequest) sreq;
HttpServletResponse response = (HttpServletResponse) sres;

_log.info(request.getMethod() + " " + request.getRequestURI() + ", contentlength: " + request.getContentLength());
_log.debug(request.getMethod() + " " + request.getRequestURI() + ", contentlength: " + request.getContentLength());

if (doFilterPrincipal(request, response, chain)) {
// previously authenticated user
Expand Down Expand Up @@ -158,7 +158,7 @@ public void doFilter(ServletRequest sreq, ServletResponse sres,
return;
}

_log.info("authorization required");
_log.debug("authorization required");
sendUnauthorized(response, false);
}

Expand Down Expand Up @@ -197,7 +197,7 @@ private boolean doFilterPrincipal(HttpServletRequest request, HttpServletRespons
// user already authenticated

if (principal instanceof WindowsPrincipal) {
_log.info("previously authenticated Windows user: " + principal.getName());
_log.debug("previously authenticated Windows user: " + principal.getName());
WindowsPrincipal windowsPrincipal = (WindowsPrincipal) principal;

if (_impersonate && windowsPrincipal.getIdentity() == null) {
Expand All @@ -224,7 +224,7 @@ private boolean doFilterPrincipal(HttpServletRequest request, HttpServletRespons
}
}
} else {
_log.info("previously authenticated user: " + principal.getName());
_log.debug("previously authenticated user: " + principal.getName());
chain.doFilter(request, response);
}
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void sendUnauthorized(HttpServletResponse response) {
public boolean isPrincipalException(HttpServletRequest request) {
AuthorizationHeader authorizationHeader = new AuthorizationHeader(request);
boolean ntlmPost = authorizationHeader.isNtlmType1PostAuthorizationHeader();
_log.info("authorization: " + authorizationHeader.toString() + ", ntlm post: " + ntlmPost);
_log.debug("authorization: " + authorizationHeader.toString() + ", ntlm post: " + ntlmPost);
return ntlmPost;
}

Expand All @@ -79,25 +79,25 @@ public IWindowsIdentity doFilter(HttpServletRequest request,
// maintain a connection-based session for NTLM tokns
String connectionId = NtlmServletRequest.getConnectionId(request);
String securityPackage = authorizationHeader.getSecurityPackage();
_log.info("security package: " + securityPackage + ", connection id: " + connectionId);
_log.debug("security package: " + securityPackage + ", connection id: " + connectionId);

if (ntlmPost) {
// type 2 NTLM authentication message received
_auth.resetSecurityToken(connectionId);
}

byte[] tokenBuffer = authorizationHeader.getTokenBytes();
_log.info("token buffer: " + tokenBuffer.length + " byte(s)");
_log.debug("token buffer: " + tokenBuffer.length + " byte(s)");
IWindowsSecurityContext securityContext = _auth.acceptSecurityToken(connectionId, tokenBuffer, securityPackage);

byte[] continueTokenBytes = securityContext.getToken();
if (continueTokenBytes != null) {
String continueToken = new String(Base64.encode(continueTokenBytes));
_log.info("continue token: " + continueToken);
_log.debug("continue token: " + continueToken);
response.addHeader("WWW-Authenticate", securityPackage + " " + continueToken);
}

_log.info("continue required: " + securityContext.getContinue());
_log.debug("continue required: " + securityContext.getContinue());
if (securityContext.getContinue() || ntlmPost) {
response.setHeader("Connection", "keep-alive");
response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void doFilter(ServletRequest req, ServletResponse res,
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) res;

_log.info(request.getMethod() + " " + request.getRequestURI() + ", contentlength: " + request.getContentLength());
_log.debug(request.getMethod() + " " + request.getRequestURI() + ", contentlength: " + request.getContentLength());

AuthorizationHeader authorizationHeader = new AuthorizationHeader(request);

Expand Down