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

Enahance the copy as curl capability in 8.0 #2256

Open
lockewritesdocs opened this issue Oct 25, 2021 · 3 comments
Open

Enahance the copy as curl capability in 8.0 #2256

lockewritesdocs opened this issue Oct 25, 2021 · 3 comments
Labels
docs DO NOT USE for *contents* of our docs. Only use for documentation *about* this repo. enhancement Something we'd like to improve

Comments

@lockewritesdocs
Copy link
Contributor

lockewritesdocs commented Oct 25, 2021

Summary

In 8.0, security is enabled by default. We should enhance our "copy as curl" capability in code snippets to automatically include an environment variable for the auto-generated node security certificate.

Changes

In the current security documentation for 8.0, we include the following snippet so that users can test the connection to their cluster:

curl --cacert config/tls_auto_config_initial_node_<timestamp>/http_ca.crt -u elastic https://localhost:9200 

We could instead replace the location of the security in the certificate in the Elasticsearch configuration directory with an environment variable, such as $ES_CA_CERT_LOCATION, which we would instruct users to set. We also need to set https as the default connection:

curl --cacert $ES_CA_CERT_LOCATION -u elastic https://localhost:9200 

To enact this change, we would need to enhance the console widget code.

@lockewritesdocs lockewritesdocs added enhancement Something we'd like to improve docs DO NOT USE for *contents* of our docs. Only use for documentation *about* this repo. labels Oct 25, 2021
@DanRoscigno
Copy link
Contributor

@lockewritesdocs what would you think about adding an environment variable for the endpoint also? I don't think I am ever targeting localhost, my target is usually a VM on my machine, or a VM in GCP, or an ECK/ECE/ESS deployment.

@lockewritesdocs
Copy link
Contributor Author

lockewritesdocs commented Oct 25, 2021

@lockewritesdocs what would you think about adding an environment variable for the endpoint also?

This is probably more real-world applicable than localhost. I think that most folks who are running localhost are doing so in a development-only capacity.

@gtback
Copy link
Member

gtback commented Oct 26, 2021

@DanRoscigno if you set the endpoint in the "gear" menu in the bottom left, the new endpoint will be used when you "Copy as curl".

I don't think we could (easily) do the same thing with the cert location, though.

@gtback gtback removed their assignment Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs DO NOT USE for *contents* of our docs. Only use for documentation *about* this repo. enhancement Something we'd like to improve
Projects
None yet
Development

No branches or pull requests

3 participants