-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Additional AAD authentication options #560
Merged
Merged
Conversation
This file contains 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
David-Engel
commented
May 12, 2020
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs
Show resolved
Hide resolved
...crosoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ActiveDirectoryAuthenticationProvider.cs
Show resolved
Hide resolved
...crosoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ActiveDirectoryAuthenticationProvider.cs
Show resolved
Hide resolved
...crosoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ActiveDirectoryAuthenticationProvider.cs
Show resolved
Hide resolved
johnnypham
reviewed
May 15, 2020
...lClient/netcore/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.NetStandard.cs
Outdated
Show resolved
Hide resolved
JRahnama
reviewed
May 15, 2020
src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj
Show resolved
Hide resolved
doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationMethod.xml
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs
Outdated
Show resolved
Hide resolved
- Doc edit - Additional validation around using SqlCredential with AAD Interactive - Fix test issue - Put ServicePrincipal in new workflow enum
Diffing netfx/netcore code to find the solution identified several other fixed bits: - NetFx changed connect retry from 1 to 2 if it detects Azure - Added missing trace calls - Change password should throw is using AAD Integrated - useSSPI should also be set for AAD Integrated - Correctly use the response for FEDAUTHREQUIRED PreLogin - TdsLogin length was being incorrectly increased at one point
It was for when ADAL was used instead of MSAL.
karinazhou
reviewed
Jun 9, 2020
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs
Show resolved
Hide resolved
cheenamalhotra
approved these changes
Jun 9, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last bits of changes..
doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationMethod.xml
Outdated
Show resolved
Hide resolved
Remove duplicate trace call Improve trace message
karinazhou
approved these changes
Jun 9, 2020
JRahnama
approved these changes
Jun 9, 2020
karinazhou
pushed a commit
to karinazhou/SqlClient
that referenced
this pull request
Jun 10, 2020
# Resolved Conflicts: # src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs
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.
Adding Active Directory Integrated and Interactive authentication to .NET Core to bring parity with the .NET Framework code.
Adding Active Directory Service Principal authentication. Service principal authentication involves setting up an App registration with a secret, granting permissions to the App in the SQL DB instance, then connecting like:
Server=tcp:<dbname>.database.windows.net,1433;Authentication=Active Directory Service Principal;User Id=<AppId>;Password=<Secret>;
Most of the file changes are just plumbing the additional, valid Authentication types. The core changes are all in ActiveDirectoryAuthenticationProvider.cs, which has been moved to common code (between netcore and netfx).