Don't pass auth to opensearch client with empty login and password
This updates the opensearch hook to only pass the http_auth argument to the opensearch client if a login and password are part of the connection.
closes: #39979
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.
cc @cjames23 can you take a look?
@eladkal @cjames23 is there any review action coming on this?
My org could really use this change, we hit AWS OpenSearch with no auth (instead we validate that the client is inside our VPC/VPN). To get around the bug, we currently subclass the OpenSearchHook to shim in pretty much this exact code change. Would be great to not have to have this subclass at all.
@eladkal ping again on reviewing this? cjames seems to be off the grid.
LGTM. This aligns with the Elasticsearch provider behaviour too