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

elasticsearch-transport: Faraday::Connection#basic_auth is deprecated #1479

Closed
tagliala opened this issue Sep 5, 2021 · 2 comments
Closed

Comments

@tagliala
Copy link

tagliala commented Sep 5, 2021

Hi,

I've updated Faraday from 1.7.0 to 1.7.1 and I'm getting this deprecation warning from elasticsearch-transport, when the elasticsearch endpoint is authenticated through basic auth embedded in the url, http://test:deprecation@localhost:9200:

client = ::Faraday.new(__full_url(host), options, &block)

$ rails c
WARNING: `Faraday::Connection#basic_auth` is deprecated; it will be removed in version 2.0.
While initializing your connection, use `#request(:basic_auth, ...)` instead.
See https://lostisland.github.io/faraday/middleware/authentication for more usage info.

Versions:

ruby: 2.7.2
rails: 6.1.4.1
elasticsearch-rails: 7.2.0
elasticsearch-transport: 7.14.0

Ref: lostisland/faraday#1306

@picandocodigo
Copy link
Member

Hi @tagliala, thanks for reporting this!

I'm following the issue in Faraday, see if the support for basic auth in URLs is dropped. But I may update the client anyway to maybe send the auth header instead of depending on Faraday for this.

@picandocodigo
Copy link
Member

Closing this issue as it's been addressed upstream and it's fixed for Faraday v1.7.2 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants