bilaharith commented on a change in pull request #1481: HADOOP-16587: Made auth
endpoints configurable for MSI and refresh token flows
URL: https://github.com/apache/hadoop/pull/1481#discussion_r329675048
##########
File path:
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/oauth2/AzureADAuthenticator.java
##########
@@ -109,15 +112,12 @@ public static AzureADToken
getTokenUsingClientCreds(String authEndpoint,
* @return {@link AzureADToken} obtained using the creds
* @throws IOException throws IOException if there is a failure in obtaining
the token
*/
- public static AzureADToken getTokenFromMsi(String tenantGuid, String
clientId,
+ public static AzureADToken getTokenFromMsi(final String authEndpoint, String
tenantGuid, String clientId,
boolean bypassCache) throws
IOException {
- String authEndpoint =
"http://169.254.169.254/metadata/identity/oauth2/token";
-
QueryParams qp = new QueryParams();
qp.add("api-version", "2018-02-01");
qp.add("resource", RESOURCE_NAME);
-
if (tenantGuid != null && tenantGuid.length() > 0) {
String authority = "https://login.microsoftonline.com/" + tenantGuid;
Review comment:
value for authority also made configurable
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]