From f9993b5ffb23aa430d50c9708dd2b5b1533a852e Mon Sep 17 00:00:00 2001 From: Alejandro Abdelnur Date: Tue, 24 Apr 2012 13:44:53 +0000 Subject: [PATCH] HADOOP-8309. Pseudo & Kerberos AuthenticationHandler should use getType() to create token (tucu) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1329713 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 45297851d7..8cad2cc220 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 AuthenticationToken run() throws Exception { 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 f23b2d0381..336c36e4d2 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 AuthenticationToken authenticate(HttpServletRequest request, HttpServletR 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 606f46cc39..508f92cbe6 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -370,6 +370,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)