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

added encoded API key placeholder for updated api_key elasticsearch authentication. #17

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SamoraHunter
Copy link

No description provided.

@mart-r mart-r requested a review from antsh3k February 14, 2025 10:45
@preciserobot
Copy link

preciserobot commented Feb 14, 2025

The documentation on the elasticsearch python library is quite non-specific but it appears the api_key username:password tuple is the (api_key.id, api_key.api_key), as described here.

We generally issue key ID and the key secret (plain and base64 encoded), so we should be able to use the existing implementation with some added documentation.

CORRECTION: We do not currently issue the key ID but the key name. I can change this internally to make it compatible with the current version of this repo.

@SamoraHunter
Copy link
Author

The documentation on the elasticsearch python library is quite non-specific but it appears the api_key username:password tuple is the (api_key.id, api_key.api_key), as described here.

We generally issue key ID and the key secret (plain and base64 encoded), so we should be able to use the existing implementation with some added documentation.

CORRECTION: We do not currently issue the key ID but the key name. I can change this internally to make it compatible with the current version of this repo.

That link is for version 7.17,

I think the version we're running is https://www.elastic.co/guide/en/elasticsearch/client/python-api/8.17/connecting.html

api_key="api_key",

The jupyterhub docker image also users 8.17:
https://github.com/CogStack/cogstack-jupyter-hub/blob/master/requirements.txt

@preciserobot
Copy link

The documentation on the elasticsearch python library is quite non-specific but it appears the api_key username:password tuple is the (api_key.id, api_key.api_key), as described here.
We generally issue key ID and the key secret (plain and base64 encoded), so we should be able to use the existing implementation with some added documentation.
CORRECTION: We do not currently issue the key ID but the key name. I can change this internally to make it compatible with the current version of this repo.

That link is for version 7.17,

I think the version we're running is https://www.elastic.co/guide/en/elasticsearch/client/python-api/8.17/connecting.html

api_key="api_key",

The jupyterhub docker image also users 8.17: https://github.com/CogStack/cogstack-jupyter-hub/blob/master/requirements.txt

The docs for 8.17 still show the string|tuple|None signature. Looks like this is retained here.

Indeed the implementation for elasticsearch-py 8.17 confirms this here:
client/__init__py:143,430
_base.py:128
utils.py:254

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