Azure / azure-cli

Azure Command-Line Interface
MIT License
3.95k stars 2.93k forks source link

Unable to set the `disableLocalAuth` property on CosmosDb accounts during creation/update #19750

Open ksstott opened 2 years ago

ksstott commented 2 years ago

Is your feature request related to a problem? Please describe. This documentation describes how to enforce RBAC authentication on a cosmos account. However while the cli will allow you to view the value of this property via az cosmosdb show and az cosmosdb list there is no way to set or update this value via the cli during account creation or update

Describe the solution you'd like Add command switches to allow this property to be set during update and creation. az cosmosdb create ... --disable-local-auth true az cosmosdb update ... --disable-local-auth true

Describe alternatives you've considered

Additional context This property is also not exposed via the REST API however playing around with the REST api it appears that it is returned by the GET endpoint and can be updated (at least via the PATCH endpoint when I tried it)

I assume that this is also a bug/feature request with the REST API but I do not know how to raise an issue on that.

ghost commented 2 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Wmengmsft, @MehaKaushik, @anfeldma-ms, @AverageDesigner.

Issue Details
**Is your feature request related to a problem? Please describe.** [This](https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-setup-rbac#using-azure-resource-manager-templates-2) documentation describes how to enforce RBAC authentication on a cosmos account. However while the cli will allow you to view the value of this property via `az cosmosdb show` and `az cosmosdb list` there is no way to set or update this value via the cli during account creation or update **Describe the solution you'd like** Add command switches to allow this property to be set during update and creation. `az cosmosdb create ... --disable-local-auth true` `az cosmosdb update ... --disable-local-auth true` **Describe alternatives you've considered** **Additional context** This property is also not exposed via the [REST API](https://docs.microsoft.com/en-us/rest/api/cosmos-db-resource-provider/2021-04-15/database-accounts/get) however playing around with the REST api it appears that it is returned by the `GET` endpoint and can be updated (at least via the `PATCH` endpoint when I tried it) I assume that this is also a bug/feature request with the REST API but I do not know how to raise an issue on that.
Author: ksstott
Assignees: -
Labels: `Service Attention`, `Cosmos`, `customer-reported`
Milestone: -
yonzhan commented 2 years ago

route to service team

wmengmsft commented 2 years ago

@ksstott, disableLocalAuth is not yet supported in Azure CLI. We will added this in a future CLI version. It is supported in our Rest API / ARM templates using API version 2021-06-15. The Rest API documentation will be updated to reflect the changes made in 2021-06-15 and later.

albigi commented 1 year ago

Any update on this one? It would be useful to have in az cli

sonnyhcl commented 1 month ago

Any update on this?