Open yunbozhang-msft opened 1 year ago
Adding Bogdan's comment from the Incident
This is a good point. There are 2 issues here:
If instance discovery fails with error except "invalid_instance", MSAL should ignore it
Once instance discovery fails, MSAL should not re-attempt to perform instance discovery on that environment
I suggest we track this via a bug, as it will require a fix in the library.
This issue is fixed and the fix should be available in the next msal4j release.
Released version 1.13.6 of the library to take care of this. Please reopen this if the issue persists.
Thanks team
获取 Outlook for iOShttps://aka.ms/o0ukef
发件人: Siddhi @.> 发送时间: Saturday, March 25, 2023 4:41:45 AM 收件人: AzureAD/microsoft-authentication-library-for-java @.> 抄送: Zhang Yunbo @.>; Author @.> 主题: Re: [AzureAD/microsoft-authentication-library-for-java] When Global AAD is unavailable, it will cause timeout issue with AAD authentication of native cloud. (Issue #605)
Released version 1.13.6 of the library to take care of this. Please reopen this if the issue persists.
― Reply to this email directly, view it on GitHubhttps://github.com/AzureAD/microsoft-authentication-library-for-java/issues/605#issuecomment-1483382480, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKSVJXQBSGM6Q2DYEBAJF4DW5YBITANCNFSM6AAAAAAVQUYBKY. You are receiving this because you authored the thread.Message ID: @.***>
Hi @siddhijain I verified this issue locally, but still reported this error, I think we still need a PR to fix this issue, as some users' network is limited, and they may block some global Azure networking. Also, I do not see any PR link to this issue, so please help check if lost to merge or commit PR, thanks!
FYI: Error stack:
Also I found I do not have permission to re-open this issue, could you please help reopen this issue? thanks! @siddhijain
Hello @zhangyunbo1994 : It's been some time since you first reported this issue, so just to clarify: is this a problem that started happening for some new users/scenarios, or was the original issue completely unresolved (and you only tested it recently)? Just trying to figure out if there's an edge case we didn't cover, or if we may have misunderstood the root cause.
Also, I believe this was the PR with the fix: https://github.com/AzureAD/microsoft-authentication-library-for-java/pull/606
Hi @Avery-Dunn The original issue is completely unresolved. And also I tested this issue recently, this issue is not resolved in the latest SDK.
If instance discovery fails with 404, MSAL should ignore this. We do not guarantee that MSAL won't call public cloud.
As a workaround:
.instanceDiscovery(false));
when you create the application object. See https://github.com/AzureAD/microsoft-authentication-library-for-java/pull/569/filesHi @bgavrilMS thanks!
I try the workaround locally, but still timeout, so I think back-end still try to connect to AAD public endpoint even though set instanceDiscovery to false.
Hi team,
I git clone MSAL4J code sample from this repo: ms-identity-java-webapp/msal-java-webapp-sample at master · Azure-Samples/ms-identity-java-webapp (github.com)
I config AAD configuration in application.properties file, and config to Azure China cloud. Endpoint is https://login.partner.microsoftonline.cn
Then run this sample in my local. Sample can be run successfully.
Then add the wrong DNS mapping in the hosts file to make the Global AAD endpoint inaccessible:
Next to re-start sample in local, you will get timeout error:
Why use an indigenous cloud to access global AAD endpoints? And there was a problem with the global AAD service before, when Global AAD was unavailable, it would affect the use of the native AAD(like Azure China AAD client).
Thanks!