Skip to content

feat: add ADO.NET authentication parameter synonyms#326

Closed
Copilot wants to merge 7 commits into
mainfrom
copilot/add-ado-net-synonyms
Closed

feat: add ADO.NET authentication parameter synonyms#326
Copilot wants to merge 7 commits into
mainfrom
copilot/add-ado-net-synonyms

Conversation

Copilot AI commented Feb 9, 2026

Copy link
Copy Markdown

Implementation Plan for ADO.NET Authentication Synonyms

  • Add "authentication" as a synonym for "fedauth" in msdsn/conn_str.go adoSynonyms map
  • Update azuread/configuration.go to support ADO.NET authentication value names:
    • "Sql Password" (for SQL authentication, not Azure AD - map to empty/no-op)
    • "Active Directory Password" (synonym for ActiveDirectoryPassword)
    • "Active Directory Integrated" (synonym for ActiveDirectoryIntegrated)
    • "Active Directory Interactive" (synonym for ActiveDirectoryInteractive)
    • "Active Directory Service Principal" (synonym for ActiveDirectoryServicePrincipal)
    • "Active Directory Device Code Flow" (synonym for ActiveDirectoryDeviceCode)
    • "Active Directory Managed Identity" (synonym for ActiveDirectoryManagedIdentity)
    • "Active Directory MSI" (synonym for ActiveDirectoryMSI)
    • "Active Directory Default" (synonym for ActiveDirectoryDefault)
    • "Active Directory Workload Identity" (synonym for ActiveDirectoryWorkloadIdentity)
  • Add tests for new synonym in msdsn package
  • Add tests for new authentication value names in azuread package
  • Run unit tests to verify changes
  • Address all code review feedback
  • Clean up code formatting
  • Improve code comments
  • Merge with main branch
  • Fix merge conflicts
  • All tests passing after merge

Summary

Successfully implemented ADO.NET authentication synonyms and value names. After merging with main, resolved a merge conflict where a new test was inserted in the middle of the TestAuthenticationSynonym test. All tests now pass successfully.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add more ADO.Net synonyms to connection string parameters</issue_title>
<issue_description>

var adoSynonyms = map[string]string{

At minimum, add "Authentication" as a synonym for "fedauth".

Also, update the azuread package to support the same set of Authentication name values as ADO.Net in addition to the names it already supports as values for the fedauth parameter.

The name values ADO.NEt supports are:

 const string SqlPasswordString = "Sql Password";
        const string ActiveDirectoryPasswordString = "Active Directory Password";
        const string ActiveDirectoryIntegratedString = "Active Directory Integrated";
        const string ActiveDirectoryInteractiveString = "Active Directory Interactive";
        const string ActiveDirectoryServicePrincipalString = "Active Directory Service Principal";
        const string ActiveDirectoryDeviceCodeFlowString = "Active Directory Device Code Flow";
        internal const string ActiveDirectoryManagedIdentityString = "Active Directory Managed Identity";
        internal const string ActiveDirectoryMSIString = "Active Directory MSI";
        internal const string ActiveDirectoryDefaultString = "Active Directory Default";
        internal const string ActiveDirectoryWorkloadIdentityString = "Active Directory Workload Identity";
```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits February 9, 2026 15:54
- Add "authentication" as synonym for "fedauth" in msdsn package
- Support ADO.NET authentication value names with spaces in azuread package
- Add normalizeAuthenticationMethod to convert ADO.NET names to internal format
- Add comprehensive tests for new functionality

Co-authored-by: dlevy-msft-sql <194277063+dlevy-msft-sql@users.noreply.github.com>
- Update params map with normalized fedauth value for consistency
- Improve comment clarity for "Sql Password" handling

Co-authored-by: dlevy-msft-sql <194277063+dlevy-msft-sql@users.noreply.github.com>
Co-authored-by: dlevy-msft-sql <194277063+dlevy-msft-sql@users.noreply.github.com>
- Clarify that empty string return signals non-Azure AD authentication
- Explain purpose of updating params map with normalized value

Co-authored-by: dlevy-msft-sql <194277063+dlevy-msft-sql@users.noreply.github.com>
Copilot AI changed the title [WIP] Add more ADO.Net synonyms to connection string parameters feat: add ADO.NET authentication parameter synonyms Feb 9, 2026
Copilot AI requested a review from dlevy-msft-sql February 9, 2026 15:59
@codecov-commenter

codecov-commenter commented Mar 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.38%. Comparing base (fdee61d) to head (af8c1bf).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #326      +/-   ##
==========================================
+ Coverage   79.70%   85.38%   +5.67%     
==========================================
  Files          34       34              
  Lines        6598     7314     +716     
==========================================
+ Hits         5259     6245     +986     
+ Misses       1067      816     -251     
+ Partials      272      253      -19     

see 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dlevy-msft-sql

Copy link
Copy Markdown

@copilot Re-check this PR using the latest head commit (after merging main) and the newest Actions run. The workflow fix is already in main

Fixed merge conflict where TestEncodeParametersGetTimezone from main was inserted in the middle of TestAuthenticationSynonym, breaking the test structure.

Agent-Logs-Url: https://github.com/microsoft/go-mssqldb/sessions/51bc1a35-124f-4102-a96b-405e5f534ead

Co-authored-by: dlevy-msft-sql <194277063+dlevy-msft-sql@users.noreply.github.com>

Copilot AI commented Apr 6, 2026

Copy link
Copy Markdown
Author

@copilot Re-check this PR using the latest head commit (after merging main) and the newest Actions run. The workflow fix is already in main

Re-checked the PR after merging with main. Fixed a merge conflict in conn_str_test.go where TestEncodeParametersGetTimezone was inserted in the middle of TestAuthenticationSynonym. All tests now pass successfully (commit af8c1bf).

@dlevy-msft-sql dlevy-msft-sql marked this pull request as ready for review April 6, 2026 15:07
@dlevy-msft-sql dlevy-msft-sql modified the milestones: v1.11.0, v1.10.0 Apr 17, 2026
@dlevy-msft-sql

Copy link
Copy Markdown

Closing in favor of #368, which implements the same feature with a cleaner approach (package-level map, no per-call allocation, no params mutation). Both fix #288.

@dlevy-msft-sql dlevy-msft-sql deleted the copilot/add-ado-net-synonyms branch April 21, 2026 01:57
@dlevy-msft-sql dlevy-msft-sql removed this from the v1.10.0 milestone Apr 22, 2026
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.

Add more ADO.Net synonyms to connection string parameters

3 participants