{AzureCosmosDB} fixes Azure/azure-cli#24156#24200
Merged
Merged
Conversation
fixes Azure#24156 It's possible to input resource id without leading '/' in URI, and this cause Cosmos DB Analytical Store to be unable to identify the mentioned resources and by-pass on network acl checking. Without the leading '/' in resource URI, CLI execution won't report any errors or indicate it's actually an invalid format. Cosmos DB can still store the invalid URI at last, but no help to allow querying from Synapse. To Reproduce az cosmosdb update --name MyCosmosDBDatabaseAccount--resource-group MyResourceGroup--network-acl-bypass AzureServices --network-acl-bypass-resource-ids "subscriptions/subId/resourceGroups/rgName/providers/Microsoft.Synapse/workspaces/wsName" This PR validates the input values of --network-acl-bypass-resource-ids, to ensure customer configuring their resource correctly.
Collaborator
|
CosmosDB |
Member
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
evelyn-ys
reviewed
Oct 17, 2022
evelyn-ys
reviewed
Oct 17, 2022
Co-authored-by: Yishi Wang <yishiwang@microsoft.com>
evelyn-ys
approved these changes
Oct 18, 2022
avgale
pushed a commit
to avgale/azure-cli
that referenced
this pull request
Aug 24, 2023
* {azure CosmosDB} fixes Azure#24156
fixes Azure#24156
It's possible to input resource id without leading '/' in URI, and this cause Cosmos DB Analytical Store to be unable to identify the mentioned resources and by-pass on network acl checking.
Without the leading '/' in resource URI, CLI execution won't report any errors or indicate it's actually an invalid format.
Cosmos DB can still store the invalid URI at last, but no help to allow querying from Synapse.
To Reproduce
az cosmosdb update --name MyCosmosDBDatabaseAccount--resource-group MyResourceGroup--network-acl-bypass AzureServices --network-acl-bypass-resource-ids "subscriptions/subId/resourceGroups/rgName/providers/Microsoft.Synapse/workspaces/wsName"
This PR validates the input values of --network-acl-bypass-resource-ids, to ensure customer configuring their resource correctly.
* Update custom.py
* Update custom.py
* Update src/azure-cli/azure/cli/command_modules/cosmosdb/custom.py
Co-authored-by: Yishi Wang <yishiwang@microsoft.com>
* Update custom.py
* Update custom.py
Co-authored-by: Yishi Wang <yishiwang@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.
fixes #24156
It's possible to input resource id without leading '/' in URI, and this cause Cosmos DB Analytical Store to be unable to identify the mentioned resources and by-pass on network acl checking. Without the leading '/' in resource URI, CLI execution won't report any errors or indicate it's actually an invalid format. Cosmos DB can still store the invalid URI at last, but no help to allow querying from Synapse.
To Reproduce
az cosmosdb update --name MyCosmosDBDatabaseAccount--resource-group MyResourceGroup--network-acl-bypass AzureServices --network-acl-bypass-resource-ids "subscriptions/subId/resourceGroups/rgName/providers/Microsoft.Synapse/workspaces/wsName"
This PR validates the input values of --network-acl-bypass-resource-ids, to ensure customer configuring their resource correctly.
Related command
Description
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.