Commit 18350777 by nixonrodrigues

ATLAS-2981: Skip trusted proxy authentication if doAsUser is same as remote user.

Change-Id: I8e9bf476fb921806e1fd73b11869e719aa532815
parent 5da37648
...@@ -447,7 +447,7 @@ public class AtlasAuthenticationFilter extends AuthenticationFilter { ...@@ -447,7 +447,7 @@ public class AtlasAuthenticationFilter extends AuthenticationFilter {
// Create the proxy user if doAsUser exists // Create the proxy user if doAsUser exists
String doAsUser = supportTrustedProxy ? Servlets.getDoAsUser(httpRequest) : null; String doAsUser = supportTrustedProxy ? Servlets.getDoAsUser(httpRequest) : null;
if (supportTrustedProxy && doAsUser != null) { if (supportTrustedProxy && doAsUser != null && !doAsUser.equals(httpRequest.getRemoteUser())) {
LOG.debug("doAsUser is {}", doAsUser); LOG.debug("doAsUser is {}", doAsUser);
UserGroupInformation requestUgi = (token != null) ? UserGroupInformation.createRemoteUser(token.getUserName()) : null; UserGroupInformation requestUgi = (token != null) ? UserGroupInformation.createRemoteUser(token.getUserName()) : null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment