feat: add ADO.Net Authentication connection string synonym and spaced value names#368
Open
dlevy-msft-sql wants to merge 2 commits into
Open
feat: add ADO.Net Authentication connection string synonym and spaced value names#368dlevy-msft-sql wants to merge 2 commits into
dlevy-msft-sql wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #368 +/- ##
===========================================
+ Coverage 80.66% 96.60% +15.93%
===========================================
Files 35 92 +57
Lines 6842 74355 +67513
===========================================
+ Hits 5519 71828 +66309
- Misses 1055 2191 +1136
- Partials 268 336 +68
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
21 tasks
f8cd298 to
cf87270
Compare
Map matches exact string constants from Microsoft.Data.SqlClient's DbConnectionStringUtilities (e.g. 'Active Directory Password'). Only includes values defined in the ADO.NET SqlAuthenticationMethod enum.
cf87270 to
8c3ed33
Compare
There was a problem hiding this comment.
Pull request overview
Adds ADO.Net-compatible authentication naming to the Go MSSQL driver’s connection-string handling, improving migration ergonomics for users coming from Microsoft.Data.SqlClient.
Changes:
- Add
Authenticationas an ADO-style keyword synonym forfedauthinmsdsnparsing. - Normalize ADO.Net “spaced” authentication method values (e.g.,
Active Directory Default) to the driver’s existingActiveDirectoryDefault-style values inazuread. - Extend
azureadunit tests to cover the new synonym and spaced value mappings (includingSql Passwordmeaning “no fedauth”).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| msdsn/conn_str.go | Adds authentication -> fedauth keyword synonym in ADO-style DSN parsing. |
| azuread/configuration.go | Adds mapping table + normalization step for ADO.Net spaced Authentication values. |
| azuread/configuration_test.go | Adds test cases validating synonym + spaced value support, including Sql Password behavior. |
This was referenced Apr 28, 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.
Problem
Users coming from ADO.Net expect to use
Authentication=Active Directory Defaultstyle connection strings, but the driver only supportsfedauth=ActiveDirectoryDefault.Fix
1. Connection string synonym
Added
"authentication"as a synonym for"fedauth"in the ADO-style connection string parser (msdsn/conn_str.go).2. ADO.Net-style value names
Added support for spaced authentication values in the
azureadpackage, matching ADO.Net SqlClient names:Examples
These connection strings are now equivalent:
Tests
Added 4 test cases to
TestValidateParameters:Authenticationsynonym with existing value nameActive Directory Passwordspaced nameActive Directory Managed Identityspaced nameSql Passwordreturns no fedauth configAll existing tests pass.
Fixes #288