Closed sm-shaw closed 4 months ago
I'll try to find some time to test this in coming days.
Multiple virtual users with interactive auth should work because the ODBC driver should cache the auth token, but of course we need to test.
Merging after reviews and approval of the three members of the code maintenance team.
Adds support for Microsoft Entra authentication for SQL Server workloads as discussed in Issue https://github.com/TPC-Council/HammerDB/issues/662
Note that as discussed in the issue, I have not tested this directly and have no means to do so, so fully reliant on feedback to verify that the correct functionality has been added. Windows and SQL authentication have been re-tested to make sure the added functionality does not impact the existing ones.
One question that is worth verifying is what happens when using interactive authentication if we have multiple virtual users? We can have hundreds or thousands (with asynchronous connections) - will all virtual users produce an interactive prompt?
To test, it is recommended to build from source on windows. This is very easy and just takes 1 command to build. Firstly, make sure you have visual studio 2022 installed.
Then download the zip file from here https://github.com/sm-shaw/HammerDB/tree/662 under the code tab.
Extract this into a directory of your choice and if you only want to test SQL Server edit the setup file as shown:
C:\HammerDB-662\HammerDB-662\Build\Bawt-2.1.0\Setup
edit HammerDB-Windows.bawt to comment out unneeded database interfaces
Then cd to the Bawt directory with a command prompt
cd C:\HammerDB-662\HammerDB-662\Build\Bawt-2.1.0
Set your python directory (or comment this out as well in the setup file)
set PYTHONHOME=C:\Users\UserName\AppData\Local\Programs\Python\Python310
and then run the build
Build-Windows.bat x64 vs2022+gcc Setup\HammerDB-Windows.bawt update
Note that compilation time on Windows is impacted a lot by Windows defender and temporarily turning off realtime protection will improve the compile time.
When complete the GUI will show that all packages built successfully.
Then a zip file (and directory) with the latest build for testing will be in this directory.
C:\HammerDB-662\HammerDB-662\Build\BawtBuild\vs2022\x64\Release\Distribution