hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [1/2] hadoop git commit: HADOOP-11628. SPNEGO auth does not work with CNAMEs in JDK8. (Daryn Sharp via stevel).
Date Sun, 18 Oct 2015 10:45:50 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 180efe667 -> 10932aad2
  refs/heads/trunk 58590fef4 -> bafeb6c7b


HADOOP-11628. SPNEGO auth does not work with CNAMEs in JDK8.  (Daryn Sharp via stevel).


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/10932aad
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/10932aad
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/10932aad

Branch: refs/heads/branch-2
Commit: 10932aad2985150c77d761f738787e773e4b9a20
Parents: 180efe6
Author: Steve Loughran <stevel@apache.org>
Authored: Sun Oct 18 11:45:11 2015 +0100
Committer: Steve Loughran <stevel@apache.org>
Committed: Sun Oct 18 11:45:11 2015 +0100

----------------------------------------------------------------------
 .../authentication/server/KerberosAuthenticationHandler.java     | 4 +++-
 hadoop-common-project/hadoop-common/CHANGES.txt                  | 3 +++
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/10932aad/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/KerberosAuthenticationHandler.java
----------------------------------------------------------------------
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 846541b..c6d1881 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
@@ -37,6 +37,7 @@ import javax.servlet.http.HttpServletResponse;
 
 import java.io.File;
 import java.io.IOException;
+import java.net.InetAddress;
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
@@ -342,7 +343,8 @@ public class KerberosAuthenticationHandler implements AuthenticationHandler
{
       authorization = authorization.substring(KerberosAuthenticator.NEGOTIATE.length()).trim();
       final Base64 base64 = new Base64(0);
       final byte[] clientToken = base64.decode(authorization);
-      final String serverName = request.getServerName();
+      final String serverName = InetAddress.getByName(request.getServerName())
+                                           .getCanonicalHostName();
       try {
         token = Subject.doAs(serverSubject, new PrivilegedExceptionAction<AuthenticationToken>()
{
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/10932aad/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index 3b245a1..975db86 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -649,6 +649,9 @@ Release 2.8.0 - UNRELEASED
     HADOOP-12479. ProtocMojo does not log the reason for a protoc compilation
     failure. (cnauroth)
 
+    HADOOP-11628. SPNEGO auth does not work with CNAMEs in JDK8.
+    (Daryn Sharp via stevel).
+
   OPTIMIZATIONS
 
     HADOOP-12051. ProtobufRpcEngine.invoke() should use Exception.toString()


Mime
View raw message