airbytehq / airbyte

The leading data integration platform for ETL / ELT data pipelines from APIs, databases & files to data warehouses, data lakes & data lakehouses. Both self-hosted and Cloud-hosted.
https://airbyte.com
Other
16.05k stars 4.11k forks source link

Source MSSQL - Failed to load MSAL4J Java library for performing ActiveDirectoryPassword authentication. #20866

Open walker-philips opened 1 year ago

walker-philips commented 1 year ago

Environment

Current Behavior

Attempting to connect to a Microsoft Dynamics backend MSSQL database. In order to complete the connection (at least from my experience), "Authentication=ActiveDirectoryPassword" needs to be provided as a JDBC URL Params option. Providing this issue returns the following error message: " Message: Failed to load MSAL4J Java library for performing ActiveDirectoryPassword authentication."

Expected Behavior

Deployment succeeds.

Steps to Reproduce

  1. Include "Authentication=ActiveDirectoryPassword" as a JDBC URL Params option

This seems to be a Driver issue at first glance, I found this link to potentially point in the right direction as to what Driver files may be necessary to work around it. [https://stackoverflow.com/questions/63989823/setting-up-adal-msal-for-connecting-to-azure-database-with-matlab]. The OP provides a list of .jar files he added to work around the issue. I will work on trying to locate a suitable/safe download site for these files and try placing them within the Docker image.

walker-philips commented 1 year ago

I am unfamiliar with Java, but would adding implementation group: 'com.microsoft.azure', name: 'com.microsoft.aad.msal4j', version: '1.13.2' to the build.gradle file do the trick? Not sure how to recompile the code (if thats even necessary)

WaltBranning commented 3 months ago

I am unfamiliar with Java, but would adding implementation group: 'com.microsoft.azure', name: 'com.microsoft.aad.msal4j', version: '1.13.2' to the build.gradle file do the trick? Not sure how to recompile the code (if thats even necessary)

That is the same conclusion that I am coming too also. I am running into the same issue. Were you able to get that to work?

walker-philips commented 3 months ago

@WaltBranning I ultimately built a python connector that uses sqlalchemy to correctly supply the expected Azure db parameters. We then just yield results from running sql queries as records to the airbyte protocol.

Unfortunately this requires some custom dev, and also doesnt get to enjoy any of the optimizations that the Airbyte team has been working on.