Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
jahnvi480 merged 15 commits intomainfromjahnvi/new_auth_module
Jul 17, 2025

Conversation

jahnvi480
Copy link
Contributor

@jahnvi480jahnvi480 commentedJul 14, 2025
edited by azure-boardsbot
Loading

ADO Work Item Reference

AB#37905
AB#37927
AB#37926


Summary

This pull request introduces significant enhancements to themssql-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.

  • Newauth.py Module: Introduced a dedicated module (mssql_python/auth.py) to handle AAD authentication. This module includes:

    • Support forDefaultAzureCredential,DeviceCodeCredential, andInteractiveBrowserCredential for token retrieval.
    • Utility functions for processing connection string parameters, removing sensitive data, and generating SQL Server-compatible token structures.

Connection Handling Updates:

  • Integration of Authentication Logic: Theprocess_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: Theprocess_connection_string function was imported intomssql_python/connection.py to enable the integration of the new authentication logic.

@CopilotCopilotAI review requested due to automatic review settingsJuly 14, 2025 06:54
@github-actionsgithub-actionsbot added the pr-size: mediumModerate update size labelJul 14, 2025
Copy link
Contributor

@CopilotCopilotAI left a 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.

FileDescription
mssql_python/auth.pyNew authentication module implementing AAD token handling, credential management, and connection string processing
mssql_python/connection.pyIntegrates authentication processing into connection initialization with import and conditional logic
README.mdUpdates documentation to reflect new authentication methods and cross-platform support with usage notes

@github-actionsgithub-actionsbot added pr-size: mediumModerate update size and removed pr-size: mediumModerate update size labelsJul 14, 2025
Copy link
Collaborator

@bewithgauravbewithgaurav left a 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.

jahnvi480 reacted with thumbs up emoji
@github-actionsgithub-actionsbot added pr-size: mediumModerate update size and removed pr-size: mediumModerate update size labelsJul 15, 2025
@github-actionsgithub-actionsbot added pr-size: mediumModerate update size and removed pr-size: mediumModerate update size labelsJul 15, 2025
@github-actionsgithub-actionsbot added pr-size: mediumModerate update size and removed pr-size: mediumModerate update size labelsJul 16, 2025
@github-actionsgithub-actionsbot added pr-size: mediumModerate update size and removed pr-size: mediumModerate update size labelsJul 16, 2025
@github-actionsgithub-actionsbot added pr-size: mediumModerate update size and removed pr-size: mediumModerate update size labelsJul 16, 2025
bewithgaurav
bewithgaurav previously approved these changesJul 16, 2025
@github-actionsgithub-actionsbot added pr-size: mediumModerate update size and removed pr-size: mediumModerate update size labelsJul 16, 2025
@github-actionsgithub-actionsbot added pr-size: mediumModerate update size and removed pr-size: mediumModerate update size labelsJul 16, 2025
@jahnvi480jahnvi480 merged commit0374aa2 intomainJul 17, 2025
16 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@bewithgauravbewithgauravbewithgaurav approved these changes

@gargsaumyagargsaumyagargsaumya approved these changes

@sumitmsftsumitmsftAwaiting requested review from sumitmsft

Assignees
No one assigned
Labels
pr-size: mediumModerate update size
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@jahnvi480@bewithgaurav@sumitmsft@gargsaumya

[8]ページ先頭

©2009-2025 Movatter.jp