feat(mssql): bundle azure-identity for ActiveDirectoryDefault / AzCli / WorkloadIdentity auth#1755
Merged
Merged
Conversation
…orkloadIdentity auth Closes #1754 mssql-jdbc 12.6.1 supports ActiveDirectoryDefault, ActiveDirectoryAzCli, and ActiveDirectoryWorkloadIdentity but delegates them to the azure-identity library (com.azure:azure-identity), which was not previously bundled. Users hitting these modes got: java.lang.NoClassDefFoundError: com/azure/identity/DefaultAzureCredentialBuilder Add azure-identity 1.11.1 (the version mssql-jdbc 12.6.1 was certified against) to deps.edn so all non-browser-dependent Entra ID auth modes work out of the box. The SLF4J version conflict flagged by downstream workarounds (miljodir/DataEngineerPersona#6) does not affect the uberjar: Maven resolves to the newer slf4j-api already present via logback-classic. Also update docs/ref/mssql.rst: - Add ActiveDirectoryDefault (developer az login workflow, WSL2-safe), ActiveDirectoryAzCli, ActiveDirectoryWorkloadIdentity with examples - Deprecation note on ActiveDirectoryPassword (blocked by MFA enforcement in most modern Entra tenants, returns AADSTS50076) - Correct the ActiveDirectoryInteractive note: it works on native Windows / macOS / Linux desktops but fails in WSL2 (linux_xdg_open_failed) and headless environments; ActiveDirectoryDefault is the practical alternative - Quick-reference table of all auth modes and their use cases Add classpath assertion test for DefaultAzureCredentialBuilder, mirroring the existing MSAL4J test added in #1753.
This was referenced Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1754
What
Add
com.azure/azure-identity 1.11.1todeps.ednso all non-browser-dependent Entra ID authentication modes work out of the box with pgloader v4.Why
mssql-jdbc 12.6.1supportsActiveDirectoryDefault,ActiveDirectoryAzCli, andActiveDirectoryWorkloadIdentitybut delegates them to theazure-identitylibrary, which was declared<optional>true</optional>in mssql-jdbc's own POM and was not previously bundled. Users hitting these modes got:The
ActiveDirectoryDefaultmode is the standard developer ergonomic pattern — runaz loginonce, then no credentials appear in the pgloader URL. It also works headlessly in WSL2 (falls back toAzureCliCredential, which shells out toaz account get-access-token), unlikeActiveDirectoryInteractivewhich fails withlinux_xdg_open_failedthere.Discovered via a real-world workaround repo (miljodir/DataEngineerPersona#6) that was fetching the 51-jar azure-identity dependency tree manually to paper over the missing dep.
Changes
clojure/deps.ednAdd
com.azure/azure-identity {:mvn/version "1.11.1"}— the version mssql-jdbc 12.6.1 was certified against.The SLF4J version conflict flagged by the downstream workaround (azure-identity pulls in older
slf4j-api-1.7.36transitively) does not affect the uberjar: Maven dependency resolution picks the newerslf4j-apialready present vialogback-classic.clojure/test/pgloader/load_file/ast_test.cljAdd
test-azure-identity-on-classpath— classpath assertion forDefaultAzureCredentialBuilder, mirroring the existing MSAL4J test from #1753.docs/ref/mssql.rstRewrite the Azure SQL authentication section:
ActiveDirectoryDefault(developeraz loginworkflow, WSL2-safe),ActiveDirectoryAzCli, andActiveDirectoryWorkloadIdentitywith connection string examplesActiveDirectoryPassword: Microsoft has deprecated it due to mandatory MFA enforcement; most modern Entra tenants returnAADSTS50076ActiveDirectoryInteractivenote: it works on native Windows / macOS / Linux desktops but fails in WSL2 (linux_xdg_open_failed) and headless environmentsAuth modes after this PR
ActiveDirectoryServicePrincipalActiveDirectoryManagedIdentityActiveDirectoryDefaultaz loginfallback chainActiveDirectoryAzCliaz logintokenActiveDirectoryWorkloadIdentityActiveDirectoryPassword