Azure / azure-cosmosdb-ads-extension

Azure Data Studio extension for Azure CosmosDB
MIT License
16 stars 10 forks source link

Improve vCore auth handling and dashboards #69

Closed sevoku closed 1 year ago

sevoku commented 1 year ago

vCore Auth

When building a connection string with simple auth we now always require a password. The is necessary because ARM won't provide a password for vCore clusters unlike it does for mongo accounts, since the password is set by the user and encrypted.

This can happen especially when connecting to a vCore cluster from the Azure browser, where the password will be null.

In addition if ADS has once successfully connected to the resource it will preserve the password through IConnectionOptions so there is no need to re-query it from the keychain.

IMPORTANT: this will break the "No Auth" option.

vCore Dashboards

This PR adds vCore support to dashboards and improves detection whether a service is vCore, Cosmos DB Mongo Account or native Mongo. For vCore native dashboards are reused (ARM has not resource management support for vCore yet), only the home dashboard is based on native extending it with Azure specific status area and an "Open in Portal" button.

Dependencies

arm-cosmosdb: 15.4.0, not officially released yet and available here: https://github.com/Azure/sdk-release-request/issues/3978#issuecomment-1504682014 Install it manually by unzipping azure-arm-cosmosdb-15.4.0-beta.2.zip and installing it using npm install --save [path-to-package]/azure-arm-cosmosdb-15.4.0-beta.2/package

azuredatastudio patch: https://github.com/microsoft/azuredatastudio/pull/22512, required for vCore support in the azurecore extension.

Next Steps

Further Improvements

languy commented 1 year ago

@azure/arm-cosmosdb@15.4.0 has just been released.

sevoku commented 1 year ago

Triggered a new build, let's see if it works

sevoku commented 1 year ago

hhm @languy that's weird, fails with Property 'mongoClusters' does not exist on type 'CosmosDBManagementClient'., but it's available in the beta we've been using initially.

languy commented 1 year ago

hhm @languy that's weird, fails with Property 'mongoClusters' does not exist on type 'CosmosDBManagementClient'., but it's available in the beta we've been using initially.

We'll run v15.4.0-beta-2 which contains the property mongoClusters.