HDFS-8337. Accessing httpfs via webhdfs doesn't work from a jar with kerberos. Contributed by Yongjun Zhang.
This commit is contained in:
parent
311a4179cc
commit
971dc838ec
@ -20,8 +20,10 @@
|
||||
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 @@ protected Properties getConfiguration(String configPrefix,
|
||||
} 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;
|
||||
}
|
||||
|
||||
|
@ -1071,6 +1071,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
|
||||
|
Loading…
Reference in New Issue
Block a user