-
Notifications
You must be signed in to change notification settings - Fork 155
V 1.6.2 failed with proxy configured #273
Description
Hi,
We were using 1.4.0 msal4j version and now we have upgraded it to latest version 1.6.2. But now we get this exception while fetching the toke. Proxy is configured in our environment.
com.microsoft.aad.msal4j.MsalClientException: java.net.SocketTimeoutException: Read timed outcom.microsoft.aad.msal4j.MsalClientException: java.net.SocketTimeoutException: Read timed out at com.microsoft.aad.msal4j.HttpHelper.executeHttpRequest(HttpHelper.java:68) at com.microsoft.aad.msal4j.OAuthHttpRequest.send(OAuthHttpRequest.java:34) at com.microsoft.aad.msal4j.TokenRequestExecutor.executeTokenRequest(TokenRequestExecutor.java:37) at com.microsoft.aad.msal4j.AbstractClientApplicationBase.acquireTokenCommon(AbstractClientApplicationBase.java:117) at com.microsoft.aad.msal4j.AcquireTokenByAuthorizationGrantSupplier.execute(AcquireTokenByAuthorizationGrantSupplier.java:63) at com.microsoft.aad.msal4j.AuthenticationResultSupplier.get(AuthenticationResultSupplier.java:59) at com.microsoft.aad.msal4j.AuthenticationResultSupplier.get(AuthenticationResultSupplier.java:17) at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) at java.net.SocketInputStream.read(SocketInputStream.java:171)
We are using Client Credential flow to get the token. Exactly same as - https://github.com/Azure-Samples/ms-identity-java-daemon/tree/master/msal-client-credential-secret.
Additional thing what we did is whitelisted below urls on the proxy. We are using Squid proxy.
.login.microsoftonline.com, .dataservice.protection.outlook.com, .api.aadrm.com
This is required because MIPSDK does not support authenticated proxy. We are using msal4j to get the token and MIPSDK to fetch the labels from Azure Information Protection. Things work fine if these urls are removed from proxy whiltelisted list.
What is the change in newer versions of msal4j which are impacting this scenario?
It worked correctly when we were at 1.4.0 version but after upgrade to 1.6.2 things got broken.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status