-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Doc: Add clarification about API key format for Logstash #17688
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
base: main
Are you sure you want to change the base?
Doc: Add clarification about API key format for Logstash #17688
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
ee532b4
to
aea8d98
Compare
aea8d98
to
c6d674e
Compare
Looking... |
ef40eff
to
96e4b47
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left suggestions (and questions) inline. Thanks for your work on this.
@@ -19,7 +19,8 @@ Logstash accelerates your insights by harnessing a greater volume and variety of | |||
You’ll use the {{ls}} [{{es}} output plugin](logstash-docs-md://lsr/plugins-outputs-elasticsearch.md) to send data to {{serverless-full}}. | |||
Note these differences between {{es-serverless}} and both {{ess}} and self-managed {{es}}: | |||
|
|||
* Use **API keys** to access {{serverless-full}} from {{ls}}. Any user-based security settings in your [{{es}} output plugin](logstash-docs-md://lsr/plugins-outputs-elasticsearch.md) configuration are ignored and may cause errors. | |||
* You must use [**API keys**](/reference/secure-connection.md#ls-api-keys) to access {{serverless-full}} from {{ls}} as it does not support native user authentication. Any user-based security settings in your [{{es}} output plugin](logstash-docs-md://lsr/plugins-outputs-elasticsearch.md) configuration are ignored and may cause errors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* You must use [**API keys**](/reference/secure-connection.md#ls-api-keys) to access {{serverless-full}} from {{ls}} as it does not support native user authentication. Any user-based security settings in your [{{es}} output plugin](logstash-docs-md://lsr/plugins-outputs-elasticsearch.md) configuration are ignored and may cause errors. | |
* Use [**API keys**](/reference/secure-connection.md#ls-api-keys) to access {{serverless-full}} from {{ls}}. | |
Any user-based security settings in your [{{es}} output plugin](logstash-docs-md://lsr/plugins-outputs-elasticsearch.md) configuration are ignored and may cause errors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link to the relevant section is a nice addition. Let's keep the simpler, imperative statement format, and apply the one-sentence-per-line standard for easier GitHub edits and suggestions in the future.
@@ -74,6 +74,7 @@ output { <3> | |||
1. Use `filter-elastic_integration` as the first filter in your pipeline | |||
2. You can use additional filters as long as they follow `filter-elastic_integration` | |||
3. Sample config to output data to multiple destinations | |||
4. The format of the value is `id:api_key`, where `id` and `api_key` are the values returned by the [Create API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This topic is a high-level snippet designed to illustrate what's involved in using the elastic_integration filter. It's an incomplete configuration, and the details about one config setting out of 75 don't seem appropriate.
@@ -37,6 +37,8 @@ Configuration example: | |||
|
|||
* `output {elasticsearch { cloud_id => "<cloud id>" api_key => "<api key>" } }` | |||
|
|||
Note that the value of the [`api_key` option](logstash-docs-md://lsr/plugins-outputs-elasticsearch.md#plugins-outputs-elasticsearch-api_key) is in the format `id:api_key`, where `id` and `api_key` are the values returned by the [Create API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the value of the [`api_key` option](logstash-docs-md://lsr/plugins-outputs-elasticsearch.md#plugins-outputs-elasticsearch-api_key) is in the format `id:api_key`, where `id` and `api_key` are the values returned by the [Create API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key). |
@@ -53,6 +55,8 @@ Configuration example: | |||
* `output {elasticsearch { cloud_id => "<cloud id>" cloud_auth => "<cloud auth>" } }` | |||
* `output {elasticsearch { cloud_id => "<cloud id>" api_key => "<api key>" } }` | |||
|
|||
Note that the value of the [`api_key` option](logstash-docs-md://lsr/plugins-outputs-elasticsearch.md#plugins-outputs-elasticsearch-api_key) is in the format `id:api_key`, where `id` and `api_key` are the values returned by the [Create API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the value of the [`api_key` option](logstash-docs-md://lsr/plugins-outputs-elasticsearch.md#plugins-outputs-elasticsearch-api_key) is in the format `id:api_key`, where `id` and `api_key` are the values returned by the [Create API key API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The api_key link with this information is already available in the previous sentence, and makes this same information available to anybody who clicks it.
@@ -292,11 +296,20 @@ Tips for creating API keys: | |||
* {{ls}} can send both collected data and monitoring information to {{es}}. If you are sending both to the same cluster, you can use the same API key. For different clusters, you need an API key per cluster. | |||
* A single cluster can share a key for ingestion and monitoring purposes. | |||
* A production cluster and a monitoring cluster require separate keys. | |||
* When you create an API key for Logstash on the UI of your deployment, once the API key is generated, make sure you select **Logstash** from the dropdown to copy the API key in the correct `id:api_key` format. Note that base64 encoded API keys are not supported in the {{ls}} configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* When you create an API key for Logstash on the UI of your deployment, once the API key is generated, make sure you select **Logstash** from the dropdown to copy the API key in the correct `id:api_key` format. Note that base64 encoded API keys are not supported in the {{ls}} configuration. | |
* When you create an API key for Logstash, select **Logstash** from the **API key format** dropdown. | |
This option formats the API key in the correct id:api_key format required by Logstash. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ToDo: Is this applicable for serverless, Cloud, and self-managed?
:width: 400px | ||
::: | ||
|
||
Depending on the deployment, the UI for creating API keys and the API key format dropdown may be slightly different. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on the deployment, the UI for creating API keys and the API key format dropdown may be slightly different. | |
The UI for API keys may look different depending on the deployment type. |
Release notes
[rn:skip]
What does this PR do?
This PR clarifies the API key format required for Logstash in the following docs:
docs/reference/secure-connection.md
docs/reference/connecting-to-cloud.md
docs/reference/using-logstash-with-elastic-integrations.md
Related issues
Closes #17687
Changes
(All links are to the PR preview)
Previews
https://docs-v3-preview.elastic.dev/elastic/logstash/pull/17688/reference
https://docs-v3-preview.elastic.dev/elastic/logstash/pull/17688/reference/secure-connection
https://docs-v3-preview.elastic.dev/elastic/logstash/pull/17688/reference/connecting-to-cloud
https://docs-v3-preview.elastic.dev/elastic/logstash/pull/17688/reference/using-logstash-with-elastic-integrations