This is an automated email from the ASF dual-hosted git repository.

amagyar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git


The following commit(s) were added to refs/heads/master by this push:
     new e5427b1a3 KNOX-2883 Missing attach logging context from 
HadoopAuthFilter (#733)
e5427b1a3 is described below

commit e5427b1a3aea9f31cfb521e2d9845226169570d1
Author: Attila Magyar <[email protected]>
AuthorDate: Wed Feb 22 17:51:41 2023 +0100

    KNOX-2883 Missing attach logging context from HadoopAuthFilter (#733)
---
 .../java/org/apache/knox/gateway/hadoopauth/filter/HadoopAuthFilter.java | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/gateway-provider-security-hadoopauth/src/main/java/org/apache/knox/gateway/hadoopauth/filter/HadoopAuthFilter.java
 
b/gateway-provider-security-hadoopauth/src/main/java/org/apache/knox/gateway/hadoopauth/filter/HadoopAuthFilter.java
index 98e03d1cb..3c30be605 100755
--- 
a/gateway-provider-security-hadoopauth/src/main/java/org/apache/knox/gateway/hadoopauth/filter/HadoopAuthFilter.java
+++ 
b/gateway-provider-security-hadoopauth/src/main/java/org/apache/knox/gateway/hadoopauth/filter/HadoopAuthFilter.java
@@ -253,6 +253,7 @@ public class HadoopAuthFilter extends
     AuditContext context = auditService.getContext();
     if (context != null) {
       context.setUsername( principal.getName() );
+      auditService.attachContext(context);
       String sourceUri = (String)request.getAttribute( 
AbstractGatewayFilter.SOURCE_REQUEST_CONTEXT_URL_ATTRIBUTE_NAME );
       if (sourceUri != null) {
         auditor.audit( Action.AUTHENTICATION , sourceUri, ResourceType.URI, 
ActionOutcome.SUCCESS );

Reply via email to