Skip to content

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

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

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

Conversation

@shashbha14

@shashbha14 shashbha14 commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

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.

@vincbeck

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@dabla dabla left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nicely done!

@jscheffl
jscheffl merged commit 49ea0a2 into apache:main Feb 24, 2026
171 of 172 checks passed
@boring-cyborg

boring-cyborg Bot commented Feb 24, 2026

Copy link
Copy Markdown

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

dominikhei pushed a commit to dominikhei/airflow that referenced this pull request Mar 11, 2026
Co-authored-by: Shashwati <shashwatibhattacaharya21.2@gmail.com>
Ankurdeewan pushed a commit to Ankurdeewan/airflow that referenced this pull request Mar 15, 2026
Co-authored-by: Shashwati <shashwatibhattacaharya21.2@gmail.com>
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