Enahance the copy as curl capability in 8.0
- Dominant language
- Ruby
- Stars
- 265
- Forks
- 347
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 2
Description
### 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](https://www.elastic.co/guide/en/elasticsearch/reference/master/configuring-stack-security.html#stack-start-with-security), we include the following snippet so that users can test the connection to their cluster:
```
curl --cacert config/tls_auto_config_initial_node_/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](https://github.com/elastic/docs/blob/926d0efb3cf0384c2797c381e38c07a5a8761c0a/resources/web/docs_js/components/console_widget.jsx) code.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.