hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bra...@apache.org
Subject [18/50] [abbrv] hadoop git commit: HADOOP-15823. ABFS: Stop requiring client ID and tenant ID for MSI (Contributed by Da Zhou via Daniel Templeton)
Date Tue, 30 Oct 2018 06:02:48 GMT
HADOOP-15823. ABFS: Stop requiring client ID and tenant ID for MSI
(Contributed by Da Zhou via Daniel Templeton)

Change-Id: I546ab3a1df1efec635c08c388148e718dc4a9843


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

Branch: refs/heads/HDFS-13891
Commit: 3468294df051b1fea57adee58c29d3b930c6013d
Parents: b659b2c
Author: Daniel Templeton <templedf@apache.org>
Authored: Wed Oct 24 14:18:35 2018 -0700
Committer: Brahma Reddy Battula <brahma@apache.org>
Committed: Tue Oct 30 11:31:17 2018 +0530

----------------------------------------------------------------------
 .../hadoop/fs/azurebfs/oauth2/AzureADAuthenticator.java       | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/3468294d/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/oauth2/AzureADAuthenticator.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/oauth2/AzureADAuthenticator.java
b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/oauth2/AzureADAuthenticator.java
index 97415ce..df7b199 100644
--- a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/oauth2/AzureADAuthenticator.java
+++ b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/oauth2/AzureADAuthenticator.java
@@ -110,9 +110,6 @@ public final class AzureADAuthenticator {
    */
   public static AzureADToken getTokenFromMsi(String tenantGuid, String clientId,
                                              boolean bypassCache) throws IOException {
-    Preconditions.checkNotNull(tenantGuid, "tenantGuid");
-    Preconditions.checkNotNull(clientId, "clientId");
-
     String authEndpoint = "http://169.254.169.254/metadata/identity/oauth2/token";
 
     QueryParams qp = new QueryParams();
@@ -120,12 +117,12 @@ public final class AzureADAuthenticator {
     qp.add("resource", RESOURCE_NAME);
 
 
-    if (tenantGuid.length() > 0) {
+    if (tenantGuid != null && tenantGuid.length() > 0) {
       String authority = "https://login.microsoftonline.com/" + tenantGuid;
       qp.add("authority", authority);
     }
 
-    if (clientId.length() > 0) {
+    if (clientId != null && clientId.length() > 0) {
       qp.add("client_id", clientId);
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message