Correct default VisualStudioCodeCredential environment name#14648
Merged
chlowell merged 2 commits intoAzure:masterfrom Nov 4, 2020
Merged
Correct default VisualStudioCodeCredential environment name#14648chlowell merged 2 commits intoAzure:masterfrom
chlowell merged 2 commits intoAzure:masterfrom
Conversation
g2vinay
reviewed
Oct 26, 2020
| with open(path) as file: | ||
| data = json.load(file) | ||
| environment_name = data.get("azure.cloud", "Azure") | ||
| environment_name = data.get("azure.cloud", "AzureCloud") |
Member
There was a problem hiding this comment.
The change looks fine.
Shouldn't this env also alter the target Azure Auth Host for VS code client ?
the auth host provided via kwargs/constructor/env will take priority, but if isn't specified then this env should be used to target a specific auth host too.
Member
Author
There was a problem hiding this comment.
Perhaps; that would be a new feature. I put it on the backlog as #14808
g2vinay
previously approved these changes
Oct 29, 2020
mccoyp
approved these changes
Nov 4, 2020
openapi-sdkautomation Bot
pushed a commit
to AzureSDKAutomation/azure-sdk-for-python
that referenced
this pull request
Jun 9, 2021
Move swagger from private repo to public repo (Azure#14648) * Adding Swagger for AzureData on AzureArc * rename folder to AzureArcData * Adding Operations * Revert "Adding Operations". Keeping it the same with old approved swagger This reverts commit 83ff5548c0d605829d656a461a416e517fa8b49e. * Bump version to 2020-12-08 * Move 2021-06-01-preview to public repo * Fixing SDK generation Co-authored-by: Shuo Li <shul@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #14438, the gist of which is that VS Code Azure Account extension doesn't purge the refresh token it stores as its "Azure" token when the user signs out. Currently,
VisualStudioCodeCredentialwill use this token when it finds no more specific cloud identified in VS Code's settings file (as it would if a user were signed in to the extension). Thus the credential can attempt to redeem an expired refresh token, and raiseClientAuthenticationErrorrather than theCredentialUnavailableErrorwe want when no user is signed in to the extension.This implements the fix proposed in #14438, changing the default environment to "AzureCloud", which the extension does purge when the user signs out, and uses as its own default environment.