diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSAuthenticationFilter.java b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSAuthenticationFilter.java index 004ff388c1e..a68ed3baaff 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSAuthenticationFilter.java +++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSAuthenticationFilter.java @@ -20,8 +20,10 @@ package org.apache.hadoop.fs.http.server; import org.apache.commons.io.Charsets; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hdfs.web.WebHdfsConstants; import org.apache.hadoop.security.authentication.server.AuthenticationFilter; import org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationFilter; +import org.apache.hadoop.security.token.delegation.web.KerberosDelegationTokenAuthenticationHandler; import javax.servlet.FilterConfig; import javax.servlet.ServletException; @@ -92,6 +94,9 @@ public class HttpFSAuthenticationFilter } catch (IOException ex) { throw new RuntimeException("Could not read HttpFS signature secret file: " + signatureSecretFile); } + setAuthHandlerClass(props); + props.setProperty(KerberosDelegationTokenAuthenticationHandler.TOKEN_KIND, + WebHdfsConstants.WEBHDFS_TOKEN_KIND.toString()); return props; } diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index f63ee982810..046d49fc6fb 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -730,6 +730,9 @@ Release 2.7.1 - UNRELEASED HDFS-8626. Reserved RBW space is not released if creation of RBW File fails. (kanaka kumar avvaru via Arpit Agarwal) + HDFS-8337. Accessing httpfs via webhdfs doesn't work from a jar with + kerberos. (Yongjun Zhang) + Release 2.7.0 - 2015-04-20 INCOMPATIBLE CHANGES