pzampino commented on code in PR #681:
URL: https://github.com/apache/knox/pull/681#discussion_r1052256852


##########
gateway-provider-security-hadoopauth/src/main/java/org/apache/knox/gateway/hadoopauth/filter/HadoopAuthFilter.java:
##########
@@ -200,12 +202,12 @@ protected void doFilter(FilterChain filterChain, 
HttpServletRequest request, Htt
     HttpServletRequest proxyRequest = null;
     final String remoteUser = request.getRemoteUser();
     if (!ignoreDoAs(remoteUser)) {
-      final String doAsUser = request.getParameter(QUERY_PARAMETER_DOAS);
+      final String doAsUser = 
request.getParameter(AuthFilterUtils.QUERY_PARAMETER_DOAS);
       if (doAsUser != null && !doAsUser.equals(remoteUser)) {
         LOG.hadoopAuthDoAsUser(doAsUser, remoteUser, request.getRemoteAddr());
         if (request.getUserPrincipal() != null) {
           try {
-            proxyRequest = AuthFilterUtils.getProxyRequest(request, doAsUser, 
topologyName, HadoopAuthDeploymentContributor.NAME);
+            proxyRequest = AuthFilterUtils.getProxyRequest(request, 
request.getUserPrincipal().getName(), doAsUser, topologyName, 
HadoopAuthDeploymentContributor.NAME);

Review Comment:
   @moresandeep, That's making an assumption that the principal name is ALWAYS 
gotten from the request.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to