-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG][Text Analytics]Text Analytics Cilent fail to authenticate with token credential in USGOV and China #18520
Comments
We have the same problem in FR #17192 @tg-msft do you know if there is a guidance for .NET on how to do this? or how to surface this to our customers? |
FYI @suhas92 |
@Luyunmt - Can you please give examples of how this is achieved in the sdk with other cloud endpoints? |
Storage hardcodes that today so this a better question for @schaabs. If we're ready to add a common story for this, I think we should maybe stick this on the base |
@jongio Example in this link https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/DetectLanguageTests.cs#L46 can repro this issue |
The client generally should handle which scopes are required to properly authorize the call. Some services (such as storage) use the same scope in all clouds which is why they are able to hard code the scope they use. Other services need to use different scopes in different clouds. In these cases, the client should, if possible, handle this. There are a couple of strategies a client can choose to determine the required scope. First, if the service returns the required scopes or resource string via an authentication challenge ( If the no such data is available through an authentication challenge, a service client may be able to determine the targeted cloud and required scope based off the resource endpoint the user specifies. However, this can break down if the service supports custom domain links, or if end users use private links. We've avoided adding any client configuration for this up to this point as it introduces quite a bit of complexity to the user. The |
@maririos - Can you see if cognitive returns the scope/resource string in an Auth challenge? If so, does this work for default domains and resources with custom subdomain? To use AAD auth with Cognitive services, then the resource needs a custom subdomain, see: https://docs.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-azure-active-directory. For other services, a key is required and we therefore shouldn't have to worry about scope in other clouds. @tg-msft - Are you comfortable with the following while @johanste fleshes out cloud environment design?
@johanste - Where are we with a design for cloud environment? |
@schaabs - I'd think we'd only put
It'd unblock things today and ideally we'd @jongio - I'm in favor of enabling something for forward progress here. I think @schaabs will have the best idea how to do that with the least long term debt and I'll get behind his plan. |
@maririos - How do you recommend we proceed with this? |
We can def try the approach Ted suggested of adding the parameter to |
@jongio - Working on this. |
@maririos some of the TA features are not enabled in UsGov. Healthcare tests are failing. Should we remove UsGov cloud or do a PR for this issue? |
Better to remove it. This is a service constrain so unless there is a way to disable tests per clouds, not much we can do |
Even though the test won't pass, it will be good to make the proper changes in the TA library so users that don't need Healthcare can target other clouds |
OK, I will do a PR for this issue. |
We are holding on fixing this until the ACR design is complete. #21603 (comment) |
Hi, @benbp , @maririos! But there is a test named RecognizeHealthcareEntitiesBatchWithCancellation was not stable. The pipeline run result is at here. Could you help to see this problem, any thoughts of it? |
There is a known issue with that test => #24052 We haven't had the time to look into it in order to fix it though |
@nisha-bhatia , @maririos - Do you have any progress or plans to fix this issue? |
This bug fix will go out in the next release. |
We are running live Tests against other clouds like US Gov and Azure China Cloud. The goal is to check whether new azure sdk package work with other clouds or not.
In https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClient.cs#L68 as follow.
The scope is hard code as ' https://cognitiveservices.azure.com/.default' leading to only work well in the public cloud.
The value of the scope in different clouds is follow:
Azure public cloud: https://cognitiveservices.azure.com/.default
USGOV cloud: https://cognitiveservices.azure.us/.default
China cloud: https://cognitiveservices.azure.cn/.default
AZURE_AUTHORITY_HOST setting:
USGOV : https://login.microsoftonline.us/
China: https://login.microsoftonline.cn/
@jongio @danieljurek @benbp
The text was updated successfully, but these errors were encountered: