From eb1cc863d20c77f93fe1eb3604dbb5705325c40e Mon Sep 17 00:00:00 2001 From: Kihwal Lee Date: Wed, 27 Feb 2013 21:16:09 +0000 Subject: [PATCH] HADOOP-9339. IPC.Server incorrectly sets UGI auth type. Contributed by Daryn Sharp git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1450963 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../src/main/java/org/apache/hadoop/ipc/Server.java | 3 --- .../org/apache/hadoop/security/TestDoAsEffectiveUser.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 16069be9da..074bfc2348 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -1382,6 +1382,9 @@ Release 0.23.7 - UNRELEASED HADOOP-9303. command manual dfsadmin missing entry for restoreFailedStorage option (Andy Isaacson via tgraves) + HADOOP-9339. IPC.Server incorrectly sets UGI auth type (Daryn Sharp by + kihwal) + Release 0.23.6 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java index ef8687f35e..be18141aef 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java @@ -1553,9 +1553,6 @@ private void processConnectionContext(byte[] buf) throws IOException { UserGroupInformation protocolUser = ProtoUtil.getUgi(connectionContext); if (saslServer == null) { user = protocolUser; - if (user != null) { - user.setAuthenticationMethod(AuthMethod.SIMPLE); - } } else { // user is authenticated user.setAuthenticationMethod(authMethod); diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestDoAsEffectiveUser.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestDoAsEffectiveUser.java index 129d4a06d0..608cfb05cd 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestDoAsEffectiveUser.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestDoAsEffectiveUser.java @@ -180,7 +180,7 @@ public String run() throws IOException { } }); - Assert.assertEquals(PROXY_USER_NAME + " (auth:SIMPLE) via " + REAL_USER_NAME + " (auth:SIMPLE)", retVal); + Assert.assertEquals(PROXY_USER_NAME + " (auth:PROXY) via " + REAL_USER_NAME + " (auth:SIMPLE)", retVal); } catch (Exception e) { e.printStackTrace(); Assert.fail(); @@ -224,7 +224,7 @@ public String run() throws IOException { } }); - Assert.assertEquals(PROXY_USER_NAME + " (auth:SIMPLE) via " + REAL_USER_NAME + " (auth:SIMPLE)", retVal); + Assert.assertEquals(PROXY_USER_NAME + " (auth:PROXY) via " + REAL_USER_NAME + " (auth:SIMPLE)", retVal); } catch (Exception e) { e.printStackTrace(); Assert.fail();