-
Notifications
You must be signed in to change notification settings - Fork 289
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
Add a SQL Authentication Method for AzureCli credential #2171
Conversation
@dotnet-policy-service agree |
Thanks for the submission. We've been trying to resist adding public APIs (and connection string settings would be considered public API) that contain "Azure" in them. Can you not use the new AccessTokenCallback property (#1260)? Or create a custom SqlAuthenticationProvider to accomplish what you want?
|
Hi David, We feel like like all of the Azure.Identity authentication methods should be more easily supported.
But this would introduce more changes, that's why I added an extra authentication method. Since there are already issues complaining about the This drastically reduces the time of our integration tests. (From 5m to 30s) If you have 50+ projects you don't want to configure or write AccessTokenCallback for each project, which is custom code = introduces more risk. We expect this out of the box, as these are both Microsoft projects and SqlClient is atm not aligned with the default way of working with identity in Azure. |
doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationMethod.xml
Outdated
Show resolved
Hide resolved
Co-authored-by: campersau <buchholz.bastian@googlemail.com>
@David-Engel the problem is even worse if you use powershell and You can work around this by providing an If we want to improve global security, these kind of hassles make it very hard for developers that are starting out. |
This can be done directly by implementing AccessTokenCallback. |
In integration tests we don't want to use the
ActiveDirectoryDefault
as the whole token chain is being processed.To improve the speed of integration tests that use Azure CLI to authenticate we would like to add an Authentication method purely for AzureCLI.