mtxr / vscode-sqltools

Database management for VSCode
https://vscode-sqltools.mteixeira.dev?utm_source=github&utm_medium=homepage-link
MIT License
1.45k stars 292 forks source link

Implement sqltools-driver-credentials authentication provider and leverage it from MySQL driver #1066

Closed gjsjohnmurray closed 1 year ago

gjsjohnmurray commented 1 year ago

This PR makes the SQLTools extension register itself as an AuthenticationProvider named sqltools-driver-credentials which other drivers can use to store their connection passwords more securely than previously (e.g. when written as plaintext into the connection settings).

Additionally the SQLTools extension implements a new resolveConnection callback point which drivers can provide to alter connection properties after retrieval from settings and before connecting.

The MySQL driver leverages these two new features. On its settings form the Password mode field (previously called Use password) accepts a new value SQLTools Driver Credentials and uses this at connect time to request the password from the authentication provider. At that point the user will be prompted to grant permission for the authentication provider to store a password on behalf of the driver for the named connection's user and to supply it on future calls from the driver.

nikashu3110 commented 1 year ago

image

I am unable to solve this problem. can someone help me with this please.