Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to pass credential via Mac Keychain due to SqlToolsService (ADS) using UTF16 characters #257

Open
stuartpa opened this issue Feb 26, 2023 · 0 comments
Labels
ADS Azure Data Studio bug Something isn't working Security
Milestone

Comments

@stuartpa
Copy link
Collaborator

stuartpa commented Feb 26, 2023

In implementing sqlcmd open ads for Mac, we've hit an issue, in that the name of the credential that ADS is expecting (via SqlToolsService) is named using UTF16 characters (the internal representation for strings in .Net (C#)), but all the KeyChain packages for golang correctly take a string parameter for the credential name, which is UTF8, which means there is no way using golang keychain packages to name a credential using UTF16 characters. But naming the credential with UTF16 characters is incorrect anyway, is causes all sorts of problems in the Mac Keychain UI

The following bugs have already been filed in ADS, SqlToolsService:

microsoft/azuredatastudio#22385
microsoft/azuredatastudio#19269

When we have solved the UTF16 issue, there is another issue in that SqlToolsService ACLs the credential to just the SqlToolsService process, I'm not sure how sqlcmd will be able to do this (since sqlcmd won't necessary know where the SqlToolsService is)

As a temporary workaround, rather than trying to clone the UTF16 bug in ADS, we are going to require the user run a sqlcmd config cs to get the password from the sqlconfig to the console, and then cut and paste it into ADS the one time (and save password). We have an effort going on to work out the correct path forward to solve this.

@grrlgeek grrlgeek added this to the Backlog milestone May 3, 2023
@dlevy-msft dlevy-msft added bug Something isn't working ADS Azure Data Studio Security labels Aug 11, 2023
@dlevy-msft dlevy-msft modified the milestones: Backlog, October 2023 Aug 11, 2023
@dlevy-msft dlevy-msft modified the milestones: October 2023, Backlog Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADS Azure Data Studio bug Something isn't working Security
Projects
None yet
Development

No branches or pull requests

3 participants