-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
Don't pass auth to opensearch client with empty login and password #39982
Conversation
cc @cjames23 can you take a look? |
424cbd2
to
5f60395
Compare
5f60395
to
dd4badb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good.
@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 |
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.
3c9cc9f
to
fc3732a
Compare
* 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. * Add typed dict for opensearch client arguments to satisfy mypy
* 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. * Add typed dict for opensearch client arguments to satisfy mypy
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.