- Notifications
You must be signed in to change notification settings - Fork11
FEAT: Adding authentication module and adding new auth types#135
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
Pull Request Overview
This pull request introduces comprehensive Azure Active Directory (AAD) authentication enhancements to the mssql-python package, expanding authentication method support and implementing a dedicated authentication module for improved connection handling.
- Adds support for three new AAD authentication methods:
ActiveDirectoryInteractive
,ActiveDirectoryDeviceCode
, andActiveDirectoryDefault
- Implements a new authentication module (
auth.py
) with token handling and credential management - Integrates the authentication logic into the existing connection initialization process
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
File | Description |
---|---|
mssql_python/auth.py | New authentication module implementing AAD token handling, credential management, and connection string processing |
mssql_python/connection.py | Integrates authentication processing into connection initialization with import and conditional logic |
README.md | Updates documentation to reflect new authentication methods and cross-platform support with usage notes |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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.
need to add tests here. logic looks good.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
0374aa2
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
ADO Work Item Reference
Summary
This pull request introduces significant enhancements to the
mssql-python
package, focusing on expanding authentication support and improving connection string handling. The most notable changes include adding support for new Azure Active Directory (AAD) authentication methods, implementing a dedicated authentication module, and integrating these updates into the connection handling logic.Authentication Enhancements:
Expanded AAD Authentication Methods: The documentation (
README.md
) now reflects support for additional authentication methods, includingActiveDirectoryInteractive
(via browser),ActiveDirectoryDeviceCode
(for environments without browser access), andActiveDirectoryDefault
(which selects the best method based on the environment). Notes were added to clarify usage and constraints for these methods.New
auth.py
Module: Introduced a dedicated module (mssql_python/auth.py
) to handle AAD authentication. This module includes:DefaultAzureCredential
,DeviceCodeCredential
, andInteractiveBrowserCredential
for token retrieval.Connection Handling Updates:
Integration of Authentication Logic: The
process_connection_string
function from the newauth.py
module was integrated into the connection initialization process inmssql_python/connection.py
. If the connection string specifies an AAD authentication type, it is processed to remove sensitive parameters and include the appropriate authentication token inattrs_before
.Import Update: The
process_connection_string
function was imported intomssql_python/connection.py
to enable the integration of the new authentication logic.