Skip to content

Deprecate the 'http_auth' parameter #1776

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

Merged
merged 1 commit into from
Oct 27, 2021
Merged

Deprecate the 'http_auth' parameter #1776

merged 1 commit into from
Oct 27, 2021

Conversation

sethmlarson
Copy link
Contributor

This parameter is deprecated in favor of basic_auth.

@sethmlarson sethmlarson merged commit 28c3daf into main Oct 27, 2021
@sethmlarson sethmlarson deleted the deprecate-http-auth branch October 27, 2021 20:12
@sim0nx
Copy link
Contributor

sim0nx commented Oct 27, 2021

Hi, having opened issue #209 (#210) long time ago, I am wondering if this means that I can no longer pass a custom auth handler ?
basic_auth sounds like it would only support basic authentication ;-)

@sethmlarson
Copy link
Contributor Author

sethmlarson commented Oct 27, 2021

@sim0nx Hello! Thanks for commenting here, the current plan is to only support Basic, Bearer, and API Keys for authentication. What is your use-case for custom HTTP authentication specifically for Requests?

@sim0nx
Copy link
Contributor

sim0nx commented Oct 27, 2021

My long time use case is supporting kerberos/gsaapi authentication. I would thus highly appreciate it if you could leave support in there for custom auth handlers :-)

@sethmlarson
Copy link
Contributor Author

Gotcha! I'll leave the deprecation for Tuple[str, str] and str but keep the door open for custom HTTP authentication when using Requests specifically.

@sim0nx
Copy link
Contributor

sim0nx commented Oct 27, 2021

Great! Thank you! 👍

@sethmlarson
Copy link
Contributor Author

Captured this use-case here: #1778 Sorry to have removed it at all, I didn't actually know there was a use-case for it beyond Basic as none were documented 😅. TIL!

@sim0nx
Copy link
Contributor

sim0nx commented Oct 27, 2021

Lucky me I by coincidence browsed this project because of various deprecation warnings and saw your commit :-D

Thanks again, much appreciated!

@sethmlarson
Copy link
Contributor Author

@sim0nx Are your custom handlers available anywhere public? If so might be useful to make some sort of template available.

@sim0nx
Copy link
Contributor

sim0nx commented Oct 28, 2021

Sure, I currently use requests-gssapi (https://pypi.org/project/requests-gssapi/).
So that basically is

import requests
from requests_gssapi import HTTPSPNEGOAuth

conn = elasticsearch.Elasticsearch(...,
                                     connection_class=elasticsearch.RequestsHttpConnection,
                                     http_auth=HTTPSPNEGOAuth(),
                                     ...
                                     )

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

Successfully merging this pull request may close these issues.

2 participants