From 2eacd6d90a5e238cdb7c29f5f8875051a85b6584 Mon Sep 17 00:00:00 2001 From: Alejandro Abdelnur Date: Tue, 24 Apr 2012 13:51:24 +0000 Subject: [PATCH] Merge -r 1329712:1329713 from trunk to branch. FIXES: HADOOP-8309 git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1329720 13f79535-47bb-0310-9956-ffa450edef68 --- .../authentication/server/KerberosAuthenticationHandler.java | 2 +- .../authentication/server/PseudoAuthenticationHandler.java | 2 +- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/KerberosAuthenticationHandler.java b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/KerberosAuthenticationHandler.java index 45297851d73..8cad2cc220d 100644 --- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/KerberosAuthenticationHandler.java +++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/KerberosAuthenticationHandler.java @@ -288,7 +288,7 @@ public class KerberosAuthenticationHandler implements AuthenticationHandler { String clientPrincipal = gssContext.getSrcName().toString(); KerberosName kerberosName = new KerberosName(clientPrincipal); String userName = kerberosName.getShortName(); - token = new AuthenticationToken(userName, clientPrincipal, TYPE); + token = new AuthenticationToken(userName, clientPrincipal, getType()); response.setStatus(HttpServletResponse.SC_OK); LOG.trace("SPNEGO completed for principal [{}]", clientPrincipal); } diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/PseudoAuthenticationHandler.java b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/PseudoAuthenticationHandler.java index f23b2d0381c..336c36e4d23 100644 --- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/PseudoAuthenticationHandler.java +++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/PseudoAuthenticationHandler.java @@ -126,7 +126,7 @@ public class PseudoAuthenticationHandler implements AuthenticationHandler { throw new AuthenticationException("Anonymous requests are disallowed"); } } else { - token = new AuthenticationToken(userName, userName, TYPE); + token = new AuthenticationToken(userName, userName, getType()); } return token; } diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 5b25b729e89..d0c25d19223 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -250,6 +250,9 @@ Release 2.0.0 - UNRELEASED HADOOP-8284. clover integration broken, also mapreduce poms are pulling in clover as a dependency. (phunt via tucu) + HADOOP-8309. Pseudo & Kerberos AuthenticationHandler should use + getType() to create token (tucu) + BREAKDOWN OF HADOOP-7454 SUBTASKS HADOOP-7455. HA: Introduce HA Service Protocol Interface. (suresh)