Skip to content

Changed API Key from tuple to encoding in the docs #2477

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 8 commits into from
Mar 21, 2024

Conversation

iuliaferoli
Copy link
Contributor

@iuliaferoli iuliaferoli commented Mar 20, 2024

still to be added - the mention in the readthedocs index
no longer applicable with the redirect from master to latest

Copy link

A documentation preview will be available soon.

Request a new doc build by commenting
  • Rebuild this PR: run docs-build
  • Rebuild this PR and all Elastic docs: run docs-build rebuild

run docs-build is much faster than run docs-build rebuild. A rebuild should only be needed in rare situations.

If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here.

Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

Comment on lines 324 to 325
cluster. Note that you need the API Key credential representing the Base64-encoding of the id and api_key value
https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html[generated from the API Key].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good and I don't want to delay this pull request further, but for future work I think we should encourage users going to Kibana instead which has a clear UI and docs (https://www.elastic.co/guide/en/kibana/current/api-keys.html) and displays the correct encoding by default:

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the result: https://elasticsearch-py_bk_2477.docs-preview.app.elstc.co/guide/en/elasticsearch/client/python-api/master/connecting.html#auth-apikey.

I don't understand the sentence:

You can configure the client to use Elasticsearch’s API Key for connecting to your cluster. Note that you need the API Key encoding you can generated in Kibana.

We also need to keep the Elasticsearch link for users that don't have Kibana. This all could have been done in a future pull request

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to include both methods

@iuliaferoli iuliaferoli requested a review from pquentin March 20, 2024 13:20
@iuliaferoli
Copy link
Contributor Author

Also added the same change in the init so it shows up on https://elasticsearch-py.readthedocs.io/en/latest/api/elasticsearch.html

Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM.

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

Successfully merging this pull request may close these issues.

2 participants