-
Notifications
You must be signed in to change notification settings - Fork 1.5k
OCPBUGS-4549: azure: fix MS Graph calls on Gov cloud #6844
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
OCPBUGS-4549: azure: fix MS Graph calls on Gov cloud #6844
Conversation
r4f4
commented
Feb 9, 2023
Getting a token credential differs from credentials vs certificates, but once with have an azcore.TokenCredential object, acquiring authorizers and creating a new Session object is exactly the same for both methods. This will be helpful when properly setting up USGov authorization scopes for both auth methods without duplicating code.
When doing API calls to the new MSGraph API, we need to override the URL used to connect to Microsoft Graph national cloud deployments. This fixes the following error when trying to destroy a Gov cloud cluster: ``` 02-07 14:39:50.162 level=debug msg=deleting application registrations 02-07 14:40:36.775 level=debug msg=failed to gather list of Service Principals by tag: Get "https://graph.microsoft.com/v1.0/servicePrincipals?$filter=startswith%28displayName%2C%20%27$INFRA_ID%27%29%20and%20tags%2Fany%28s%3As%20eq%20%27kubernetes.io_cluster.$INFRA_ID%3Downed%27%29": context deadline exceeded (Client.Timeout exceeded while awaiting headers) ``` Notice the usage of `https://graph.microsoft.com/` (global service) instead of `https://graph.microsoft.us/` (US Gov cloud). https://learn.microsoft.com/en-us/graph/sdks/national-clouds?tabs=go
|
@r4f4: This pull request references Jira Issue OCPBUGS-4549, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: patrickdillon The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@r4f4: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
@r4f4: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-4549 has been moved to the MODIFIED state. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |