Skip to content
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

[computes] use the system username for impala/hive auth from configs #3870

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions apps/beeswax/src/beeswax/server/dbms.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,13 @@ def get_query_server_config_via_connector(connector):
else:
impersonation_enabled = hiveserver2_impersonation_enabled()

if compute['dialect'] == 'impala':
from impala import conf as dbms_conf
else:
from beeswax import conf as dbms_conf
auth_username = dbms_conf.AUTH_USERNAME.get()
auth_password = dbms_conf.AUTH_PASSWORD.get()

return {
'is_compute': True,
'dialect': compute['dialect'],
Expand All @@ -364,8 +371,8 @@ def get_query_server_config_via_connector(connector):
# For connectors/computes, the auth details are not available
# from configs and needs patching before submitting requests
'principal': 'TODO',
'auth_username': compute['options'].get('auth_username'),
'auth_password': compute['options'].get('auth_password', 'hue'),
'auth_username': compute['options'].get('auth_username', auth_username),
'auth_password': compute['options'].get('auth_password', auth_password),

'impersonation_enabled': impersonation_enabled,
'use_sasl': str(compute['options'].get('use_sasl', True)).upper() == 'TRUE',
Expand Down