Skip to content

Comments

Fix HiveServer2Hook password handling for PLAIN auth (#62338)#62364

Merged
jscheffl merged 1 commit intoapache:mainfrom
shashbha14:fix-hive-thrift-password-62338
Feb 24, 2026
Merged

Fix HiveServer2Hook password handling for PLAIN auth (#62338)#62364
jscheffl merged 1 commit intoapache:mainfrom
shashbha14:fix-hive-thrift-password-62338

Conversation

@shashbha14
Copy link
Contributor

@shashbha14 shashbha14 commented Feb 23, 2026

When creating a Hive Server 2 Thrift connection using the PLAIN authentication mechanism (the default), Airflow was failing to pass the provided password to the underlying pyhive library. This caused authentication failures even when correct credentials were provided.

This PR adds PLAIN to the list of mechanisms that correctly retrieve and pass the password in HiveServer2Hook.get_conn.

Related Issue: Fixes #62338

Tests: Added a new unit test
test_get_conn_with_password_plain
in
tests/unit/apache/hive/hooks/test_hive.py
to verify the fix.

@shashbha14 shashbha14 requested a review from XD-DENG as a code owner February 23, 2026 15:36
@boring-cyborg boring-cyborg bot added area:API Airflow's REST/HTTP API area:DAG-processing area:deadline-alerts AIP-86 (former AIP-57) area:dev-tools area:lineage area:production-image Production image improvements and fixes backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch kind:documentation labels Feb 23, 2026
@vincbeck
Copy link
Contributor

Please rebase correctly your PR, it contains bunch of unrelated commits

@shashbha14 shashbha14 force-pushed the fix-hive-thrift-password-62338 branch from c4e587b to a0103c7 Compare February 23, 2026 16:10
@shashbha14
Copy link
Contributor Author

Hi @vincbeck, I've rebased the branch on the latest main to remove the unrelated commits. It should now only contain the fix for #62338 and the corresponding unit test. Ready for another look.

@amoghrajesh
Copy link
Contributor

Not really @shashbha14, I still see a large unrelated diff
image

@shashbha14 shashbha14 force-pushed the fix-hive-thrift-password-62338 branch from a0103c7 to 17f2483 Compare February 24, 2026 14:19
@shashbha14
Copy link
Contributor Author

I've rebased the branch from the latest main and removed all unrelated commits. The PR now only contains the fix for #62338 and the corresponding unit test. Take another look, @vincbeck @amoghrajesh.

Copy link
Contributor

@dabla dabla left a comment

Choose a reason for hiding this comment

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

Nicely done!

@eladkal eladkal added area:providers provider:apache-hive and removed area:dev-tools area:API Airflow's REST/HTTP API kind:documentation area:production-image Production image improvements and fixes area:lineage area:deadline-alerts AIP-86 (former AIP-57) area:DAG-processing backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch labels Feb 24, 2026
@jscheffl jscheffl merged commit 49ea0a2 into apache:main Feb 24, 2026
171 of 172 checks passed
@boring-cyborg
Copy link

boring-cyborg bot commented Feb 24, 2026

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When creating a Hive Server 2 Thrift connection using airflow, the password does not take effect.

6 participants