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:32:45 UTC

[hadoop] branch branch-3.1 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.1
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new 72eacb3  YARN-9334.  Allow YARN Service client to send SPNEGO challenge header when authentication type is not simple.             Contributed by Billie Rinaldi
72eacb3 is described below

commit 72eacb3e107692bd0d379db94bc4a4b37f2044ca
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 15c1bab..82c483b 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
@@ -281,11 +281,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