This is an automated email from the ASF dual-hosted git repository. madhan pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push: new be824ba ATLAS-4528: updated log4j2 version to 2.17.1; removed references to org.apache.logging.NDC be824ba is described below commit be824ba8c567ca9f307dbc6ea2534b0751d5369d Author: Madhan Neethiraj <mad...@apache.org> AuthorDate: Mon Jan 10 07:50:19 2022 -0800 ATLAS-4528: updated log4j2 version to 2.17.1; removed references to org.apache.logging.NDC --- pom.xml | 2 +- .../apache/atlas/web/filters/AtlasAuthenticationFilter.java | 13 +++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index 8bb4064..6ebef60 100644 --- a/pom.xml +++ b/pom.xml @@ -736,7 +736,7 @@ <kafka.version>2.8.1</kafka.version> <keycloak.version>6.0.1</keycloak.version> <log4j.version>1.2.17</log4j.version> - <log4j2.version>2.15.0</log4j2.version> + <log4j2.version>2.17.1</log4j2.version> <lucene-solr.version>8.6.3</lucene-solr.version> <maven-site-plugin.version>3.7</maven-site-plugin.version> <MaxPermGen>512m</MaxPermGen> diff --git a/webapp/src/main/java/org/apache/atlas/web/filters/AtlasAuthenticationFilter.java b/webapp/src/main/java/org/apache/atlas/web/filters/AtlasAuthenticationFilter.java index 6ad0da1..e476ba2 100644 --- a/webapp/src/main/java/org/apache/atlas/web/filters/AtlasAuthenticationFilter.java +++ b/webapp/src/main/java/org/apache/atlas/web/filters/AtlasAuthenticationFilter.java @@ -42,7 +42,6 @@ import org.apache.hadoop.security.authentication.util.SignerException; import org.apache.hadoop.security.authentication.util.SignerSecretProvider; import org.apache.hadoop.security.authorize.AuthorizationException; import org.apache.hadoop.security.authorize.ProxyUsers; -import org.apache.log4j.NDC; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.security.authentication.AbstractAuthenticationToken; @@ -792,17 +791,11 @@ public class AtlasAuthenticationFilter extends AuthenticationFilter { if (httpRequest.getMethod().equals("OPTIONS")) { optionsServlet.service(request, response); } else { - try { - String requestUser = httpRequest.getRemoteUser(); + String requestUser = httpRequest.getRemoteUser(); - NDC.push(requestUser + ":" + httpRequest.getMethod() + httpRequest.getRequestURI()); + LOG.info("Request from authenticated user: {}, URL={}", requestUser, Servlets.getRequestURI(httpRequest)); - LOG.info("Request from authenticated user: {}, URL={}", requestUser, Servlets.getRequestURI(httpRequest)); - - filterChain.doFilter(servletRequest, servletResponse); - } finally { - NDC.pop(); - } + filterChain.doFilter(servletRequest, servletResponse); } } }