sfu-db / connector-x

Fastest library to load data from DB to DataFrames in Rust and Python
https://sfu-db.github.io/connector-x
MIT License
1.85k stars 146 forks source link

Does ConnectorX have support for azure managed identity #640

Open MuhammadPathan opened 1 month ago

MuhammadPathan commented 1 month ago

I am connecting into SQL Server using SQL credentials however looking to change to using managed identity. is there support for this? is there an example?

username = os.environ["UID"] password = os.environ["PWD"] host = f"host" port = "1433" db = f"db" conn = f"mssql://{username}:{password}@{host}:{port}/{db}?encrypt=true"

aimtsou commented 4 days ago

Good evening,

Currently connectorx uses the tiberius crate for connecting to mssql databases as you can see here

At the same time tiberius does not support yet Azure Managed Identity as there is an open issue and a fork which has not been reviewed and merged: https://github.com/prisma/tiberius/issues/175

Another solution would be to change to odbc, which supports managed identity but this requires a design decision because it is a big change