Skip to content

fix(mssql): remove invalid auth modes; suppress azure-identity log noise (#1754 follow-up)#1756

Merged
dimitri merged 1 commit into
mainfrom
fix/mssql-azure-identity
Jul 6, 2026
Merged

fix(mssql): remove invalid auth modes; suppress azure-identity log noise (#1754 follow-up)#1756
dimitri merged 1 commit into
mainfrom
fix/mssql-azure-identity

Conversation

@dimitri

@dimitri dimitri commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Follow-up to #1755, reported by @audunsolemdal in #1754.

Fixes

1. Remove ActiveDirectoryAzCli and ActiveDirectoryWorkloadIdentity from docs

These modes do not exist in mssql-jdbc 12.6.1. Confirmed via javap on the SqlAuthentication enum — the valid values are:
NotSpecified, SqlPassword, ActiveDirectoryPassword, ActiveDirectoryIntegrated, ActiveDirectoryManagedIdentity, ActiveDirectoryServicePrincipal, ActiveDirectoryServicePrincipalCertificate, ActiveDirectoryInteractive, ActiveDirectoryDefault.

ActiveDirectoryAzCli and ActiveDirectoryWorkloadIdentity exist only in the .NET (Microsoft.Data.SqlClient) and Go (go-mssqldb) drivers. Using either in the Java driver throws immediately:

SQLServerException: The authentication value "ActiveDirectoryAzCli" is not valid.

Replace with ActiveDirectoryIntegrated (Kerberos) and ActiveDirectoryServicePrincipalCertificate which are valid mssql-jdbc modes.

2. Suppress verbose azure-identity chain probe logging

ActiveDirectoryDefault walks DefaultAzureCredential's chain on every new connection, emitting INFO-level messages for each unavailable credential (EnvironmentCredential unavailable, ManagedIdentityCredential unavailable, etc.) — very noisy on a developer machine where most credential types aren't configured, and multiplied by pgloader's connection pool thread count.

Add to logback.xml:

<logger name="com.azure.identity" level="WARN"/>
<logger name="com.microsoft.aad.msal4j" level="ERROR"/>

This silences the expected chain traversal noise while preserving genuine warnings and errors.

ActiveDirectoryAzCli and ActiveDirectoryWorkloadIdentity do not exist in
the mssql-jdbc 12.6.1 SqlAuthentication enum — they are .NET/Go driver
concepts only. Remove both from docs and tests.

Add ActiveDirectoryIntegrated (Kerberos) and ActiveDirectoryServicePrincipalCertificate
to the docs table as they are valid mssql-jdbc modes confirmed by javap.

Suppress verbose azure-identity DefaultAzureCredential chain probe messages
(EnvironmentCredential unavailable, WorkloadIdentity unavailable,
ManagedIdentityCredential unavailable, etc.) in logback.xml by setting
com.azure.identity to WARN and com.microsoft.aad.msal4j to ERROR. These
INFO-level messages are expected on a developer machine but extremely noisy
when multiple connection threads each walk the full credential chain.

Reported by audunsolemdal in #1754.
@dimitri dimitri force-pushed the fix/mssql-azure-identity branch from c31179a to e7b3ef5 Compare July 6, 2026 12:34
@dimitri dimitri merged commit 0965f1f into main Jul 6, 2026
37 checks passed
@dimitri dimitri deleted the fix/mssql-azure-identity branch July 6, 2026 13:33
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

Successfully merging this pull request may close these issues.

1 participant