Skip to content

Allow OpensearchTaskHandler and OpensearchRemoteLogIO to take empty username and password - #71692

Merged
eladkal merged 8 commits into
apache:mainfrom
topherinternational:os-task-handler-no-auth-client
Oct 4, 2026
Merged

eladkal merged 8 commits into
apache:mainfrom
topherinternational:os-task-handler-no-auth-client

Conversation

@topherinternational

Copy link
Copy Markdown
Contributor

This change allows OpensearchTaskHandler and OpensearchRemoteLogIO to utilize Opensearch connections without user/password authentication.

Current Behavior
These classes pass their username and password attributes to the OpenSearch client constructor. In the event these attributes are empty or null, the client attempts to connect to the host using an auth string of ":" or "None:None".

Proposed Behavior
os_task_handler._create_opensearch_client() passes the http_auth tuple to the OpenSearch() client constructor only if both username and password are truthy (i.e., they are non-empty strings).

Rationale
Several use cases take advantage of a non-authenticated endpoint. Opensearch instances are sometimes deployed without authentication for testing purposes, and production instances can be operated inside of a VPC where networking rules rather than credentials control access from other services in the cluster.

Additionally, this non-authenticated capability is already in place in the OpenSearchHook.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Comment thread providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py Outdated
Comment thread providers/opensearch/tests/unit/opensearch/log/test_os_task_handler.py Outdated
@topherinternational
topherinternational force-pushed the os-task-handler-no-auth-client branch from 5ae8aa0 to 0887e75 Compare August 21, 2026 21:16
@topherinternational
topherinternational force-pushed the os-task-handler-no-auth-client branch from 344b59e to 5be6917 Compare August 21, 2026 21:39
Comment thread providers/opensearch/tests/unit/opensearch/log/test_os_task_handler.py Outdated
@topherinternational
topherinternational force-pushed the os-task-handler-no-auth-client branch from 5be6917 to 709b9c0 Compare August 22, 2026 12:50
@topherinternational
topherinternational force-pushed the os-task-handler-no-auth-client branch 2 times, most recently from 0f48dd7 to 174bc2a Compare August 23, 2026 18:06

@Owen-CH-Leung Owen-CH-Leung 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.

LGTM!

@topherinternational
topherinternational force-pushed the os-task-handler-no-auth-client branch from 174bc2a to 2e92441 Compare August 26, 2026 19:17
@topherinternational
topherinternational force-pushed the os-task-handler-no-auth-client branch from 2e92441 to 25cb666 Compare September 4, 2026 11:24
@topherinternational

Copy link
Copy Markdown
Contributor Author

@jason810496 is there anything blocking this from merging?

@eladkal
eladkal force-pushed the os-task-handler-no-auth-client branch from 25cb666 to c0510ad Compare October 4, 2026 08:21
@eladkal
eladkal merged commit c8b1363 into apache:main Oct 4, 2026
99 checks passed
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.

3 participants