Skip to content

[PECOBLR-727] Add kerberos support for proxy auth #675

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

vikrantpuppala
Copy link
Contributor

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • Other

Description

Add kerberos support for proxy auth

How is this tested?

  • Unit tests
  • E2E Tests
  • Manually
  • N/A

Related Tickets & Documents

Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
Copy link

@Copilot Copilot AI 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 PR adds Kerberos support for proxy authentication by refactoring proxy handling logic across multiple HTTP client classes to use shared utilities from a new http_utils module.

Key changes:

  • Extracted common proxy detection and connection pool creation logic into shared utilities
  • Replaced duplicated proxy handling code in three HTTP client classes with calls to centralized functions
  • Standardized proxy authentication handling to support Kerberos (via the shared utility functions)

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/databricks/sql/common/unified_http_client.py Refactored to use shared proxy detection and connection pool creation utilities
src/databricks/sql/backend/sea/utils/http_client.py Replaced custom proxy handling with shared utility functions
src/databricks/sql/auth/thrift_http_client.py Simplified proxy setup by delegating to centralized utilities

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


self._pool_manager = create_connection_pool(
scheme=self.scheme,
host=self.realhost if self.using_proxy() else self.host,
Copy link
Preview

Copilot AI Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method using_proxy() is called but not defined in this class. This will result in an AttributeError when proxy is configured.

Copilot uses AI. Check for mistakes.

self._pool_manager = create_connection_pool(
scheme=self.scheme,
host=self.realhost if self.using_proxy() else self.host,
port=self.realport if self.using_proxy() else self.port,
Copy link
Preview

Copilot AI Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method using_proxy() is called but not defined in this class. This will result in an AttributeError when proxy is configured.

Copilot uses AI. Check for mistakes.

"""Initialize the connection pool using shared utility."""
self._pool = create_connection_pool(
scheme=self.scheme,
host=self.realhost if self.using_proxy() else self.host,
Copy link
Preview

Copilot AI Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method using_proxy() is called but the original implementation has been removed. This will result in an AttributeError.

Copilot uses AI. Check for mistakes.

self._pool = create_connection_pool(
scheme=self.scheme,
host=self.realhost if self.using_proxy() else self.host,
port=self.realport if self.using_proxy() else self.port,
Copy link
Preview

Copilot AI Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method using_proxy() is called but the original implementation has been removed. This will result in an AttributeError.

Copilot uses AI. Check for mistakes.

Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
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.

1 participant