You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by bi...@apache.org on 2019/02/28 18:10:59 UTC
[hadoop] branch branch-3.2 updated: YARN-9334. Allow YARN Service
client to send SPNEGO challenge header when authentication type is not
simple. Contributed by Billie Rinaldi
This is an automated email from the ASF dual-hosted git repository.
billie pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new 3f3548b YARN-9334. Allow YARN Service client to send SPNEGO challenge header when authentication type is not simple. Contributed by Billie Rinaldi
3f3548b is described below
commit 3f3548b66a262541e0b27020e4a91a15a8517543
Author: Eric Yang <ey...@apache.org>
AuthorDate: Wed Feb 27 18:47:14 2019 -0500
YARN-9334. Allow YARN Service client to send SPNEGO challenge header when authentication type is not simple.
Contributed by Billie Rinaldi
(cherry picked from commit 04b228e43b728d574d7ad97330aa4218cb7f8bf8)
---
.../java/org/apache/hadoop/yarn/service/client/ApiServiceClient.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-api/src/main/java/org/apache/hadoop/yarn/service/client/ApiServiceClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-api/src/main/java/org/apache/hadoop/yarn/service/client/ApiServiceClient.java
index 38cfd11..1e31dce 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-api/src/main/java/org/apache/hadoop/yarn/service/client/ApiServiceClient.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-api/src/main/java/org/apache/hadoop/yarn/service/client/ApiServiceClient.java
@@ -282,11 +282,10 @@ public class ApiServiceClient extends AppAdminClient {
private Builder getApiClient(String requestPath)
throws IOException {
Client client = Client.create(getClientConfig());
- Configuration conf = getConfig();
client.setChunkedEncodingSize(null);
Builder builder = client
.resource(requestPath).type(MediaType.APPLICATION_JSON);
- if (conf.get("hadoop.http.authentication.type").equals("kerberos")) {
+ if (UserGroupInformation.isSecurityEnabled()) {
try {
URI url = new URI(requestPath);
String challenge = generateToken(url.getHost());
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org