feat(source-mssql): Add Microsoft Entra ID Service Principal Authentication Support #74905
Replies: 1 comment
-
|
Hi, thank you for opening this detailed feature request! This is a well-documented proposal for adding Microsoft Entra ID Service Principal authentication to the MSSQL source connector. The motivation is clear — multiple enterprise users have identified the lack of Entra ID authentication as a blocker for adopting Airbyte with Azure SQL Database and Azure Synapse Analytics. A few highlights that make this a strong request:
This has been escalated to the internal team for evaluation: https://github.com/airbytehq/oncall/issues/11673 Regarding the open questions raised in the discussion:
Need more help? Join Airbyte Community Slack for peer support, or if you're a Cloud customer, open a support ticket referencing this URL. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
This discussion proposes adding Microsoft Entra ID (Azure AD)
ActiveDirectoryServicePrincipalauthentication as a non-breaking option for the MSSQL source connector, leveraging the JDBC driver's native support.Related Issues
Prior Art (Closed PR)
A reference implementation was developed in PR #74904 (now closed) on branch
devin/1773700827-mssql-entra-id-auth. The code changes are preserved there for reference.Motivation
Multiple users across issues #9557 and #20866 have stated that the lack of Entra ID / non-SQL-password authentication is a dealbreaker for their organizations:
Many enterprises require Entra ID authentication for Azure SQL Database / Azure Synapse Analytics and cannot use SQL Server authentication for security compliance reasons.
Proposed Approach
Leverage JDBC Driver's Native Support
The MSSQL JDBC driver (
mssql-jdbc:12.10.1) already supports Entra ID authentication natively via theauthenticationconnection property. Theazure-identity:1.15.3dependency is already present in the connector'sbuild.gradle. No new dependencies are needed.Non-Breaking Design
Add an optional
authenticationoneOf selector to the connector spec (following the existingEncryptionSpecificationsealed interface pattern):sql_password(default) — username + password (current behavior, fully backward compatible)active_directory_service_principal(new) — tenant_id + client_id + client_secretWhen no
authenticationblock is present in the config, the connector falls back to top-levelusername/passwordfields — zero disruption to existing connections.JDBC Property Mapping
user= username,password= passworduser= client_id,password= client_secret,authentication=ActiveDirectoryServicePrincipal,tenantId= tenant_idImplementation Details
The reference implementation (branch
devin/1773700827-mssql-entra-id-auth) touches three files:MsSqlServerSourceConfigurationSpecification.ktusername/passwordfields nullable (fromlateinit vartovar String? = null)AuthenticationSpecificationsealed interface withSqlPasswordAuthenticationandActiveDirectoryServicePrincipalAuthenticationvariants@JsonSetter/@JsonGettermethods for the optionalauthenticationblockMicronautPropertiesFriendlyAuthenticationSpecificationfor Micronaut DI compatibilityMsSqlServerSourceConfiguration.ktauthenticationJsonand set JDBC properties accordinglyusername/passwordwhen no auth block is presentMsSqlServerSourceConfigurationSpecificationTest.ktWhy Not OAuth/Consent Flow?
The Azure Blob Storage connector uses a platform-level OAuth consent flow (
MicrosoftAzureBlobStorageOAuthFlow.ktinairbyte-platform-internal). This approach was evaluated but is not recommended for MSSQL because:airbyte-platform-internalFuture Extensions
Phase 2 could add:
ActiveDirectoryDefault— usesDefaultAzureCredential(managed identity for Azure-hosted Airbyte)ActiveDirectoryPassword— Entra username + password (deprecated by Microsoft but still supported)Open Questions
username/passwordfields. Need to add appropriate@SuppressFBWarningsannotations or restructure.authenticationfield uses"order":4, which may collide with the existingusernamefield. May need adjustment.Devin session: https://app.devin.ai/sessions/a499a6f3e5b94104955a35bc765954a9
Requested by: kevin.gavino
Beta Was this translation helpful? Give feedback.
All reactions