ADS Login Fails if a container is deleted and a new one is created
The credentials stored for a sql container are being persisted in ADS and not overwritten when a new container is created. This causes a login failure in ADS and forces a reset of the password, putting the context in SQLCMD out of synch with the creds in the SQL container.
There are 2 things that probably need to happen here:
- ADS creds for a container need to be deleted when a container is deleted.
- SQLCMD needs a mechanism to change a user password to avoid out of synch contexts - this should probably update ADS creds too.
We need to be extremely careful about modifying Azure Data Studio's settings file. It's not a documented format and there's no API. On Windows, it's possible to update the password in the credential manager if the lookup key for the new container is the same as the old one.
I debugged this, and have a fix (fix can currently be tested in #319, will factor it out of there into a separate PR)