topherinternational opened a new pull request, #71692: URL: https://github.com/apache/airflow/pull/71692
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) --- -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
