kuskus icon indicating copy to clipboard operation
kuskus copied to clipboard

Allow connecting to cluster using settings and environment variables

Open assafmendelson opened this issue 4 years ago • 1 comments

Currently, when I want to connect to a cluster I need to load it which means manually entering the cluster URL, authority id and database. Then we go to the microsoft login page.

Instead it would be useful if I could define in the settings some database and allow to extract their credentials from environment variables. For example in the settings I would have something like:

"databases": [{ "database_id": "db1" "database": "my_database1" "cluster": "https://my_cluster.kusto.windows.net", "authority_id": "${authority_id_env_var_for_cluster1}", "client_id": "${client_id_env_var_for_cluster1}", "client_secret": "${client_secret_env_var_for_cluster1}", },{...}]

Then I would be able to give a command: load db1 and the connection would be configured where it gets the credentials from environment variables.

assafmendelson avatar Dec 23 '21 07:12 assafmendelson

This sounds like a great idea. Maybe you could optionally declare one as the default too.

My only concern is to be sure that no secrets are stored in plaintext in the extension settings.

Are you interested in taking a swing at this? I'd be happy to take a contribution and provide some help as you go.

rosshamish avatar Dec 23 '21 11:12 rosshamish