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

sqlserver: Will it support connection via azure service principals instead of username/password #2024

Open
thomas-svrts opened this issue Feb 22, 2024 · 2 comments

Comments

@thomas-svrts
Copy link

If I check the code of soda-core I noticed only connection via password/username is possible.
Is it maybe an idea to add support for Azure service principals or Azure Managed identites to connect to Azure sql or Synapse dedicated pools?

In Azure its encouraged to use managed identies or service principals (tenant id, client id, secret).
In our case we installed soda agent on AKS, if we could use managed identities we don't even need to use credentials anymore (https://learn.microsoft.com/en-us/azure/aks/workload-identity-overview?tabs=python)

Here you find documentation how to get access token via Python using service principals: https://github.com/AzureAD/microsoft-authentication-library-for-python or use this lib https://learn.microsoft.com/en-us/python/api/azure-identity/azure.identity?view=azure-python

And that token then can be used to connect via pyodbc which is used by Soda: conn = pyodbc.connect(connString, attrs_before = { SQL_COPT_SS_ACCESS_TOKEN:tokenstruct});

@tools-soda
Copy link

SAS-2890

@sdebruyn
Copy link
Contributor

I fixed this in #2160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants