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

Update Beats tutorials for security on by default #120388

Merged
merged 11 commits into from
Dec 7, 2021

Conversation

joshdover
Copy link
Contributor

@joshdover joshdover commented Dec 3, 2021

Summary

Adds YAML block, copy, and doc links to on-prem Beats tutorials about how to configure Beats for the self-signed cert generated by Elasticsearch in secure-by-default mode for 8.0. There's a lot of whitespace changes and it's all mostly copy and paste, not nearly as big as looks.

image

Checklist

Delete any items that are not applicable to this PR.

@joshdover joshdover added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team auto-backport Deprecated - use backport:version if exact versions are needed v8.1.0 labels Dec 3, 2021
defaultMessage:
'First time using Filebeat? See the [Quick Start]({guideLinkUrl}).\n\
export const createFilebeatInstructions = (context: TutorialContext) => {
const SSL_DOC_URL = `https://www.elastic.co/guide/en/beats/filebeat/${context.kibanaVersion}/configuration-ssl.html#ca-sha256`;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here's where we use the Kibana version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Another use case for #95389

Copy link
Contributor

@TinaHeiligers TinaHeiligers left a comment

Choose a reason for hiding this comment

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

Adding the Kibana version to the tutorials seems safe enough.

Comment on lines 180 to 198
textPost: i18n.translate(
'home.tutorials.common.filebeatInstructions.config.osxTextPostMarkdown',
{
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of \
Elasticsearch, and {kibanaUrlTemplate} is the URL of Kibana. To [configure SSL]({configureSslUrl}) with the \
default certificate generated by Elasticsearch, add its fingerprint in {esCertFingerprintTemplate} and set the \
verification mode to {selfSignedCaTemplate}.',
values: {
passwordTemplate: '`<password>`',
esUrlTemplate: '`<es_url>`',
kibanaUrlTemplate: '`<kibana_url>`',
configureSslUrl: SSL_DOC_URL,
esCertFingerprintTemplate: '`<es cert fingerprint>`',
selfSignedCaTemplate: '`self_signed_ca`',
},
}
),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

And here's where we actually update the instructions (similar below for each OS). Apologize for all the whitespace changes 😄

Copy link
Contributor

@TinaHeiligers TinaHeiligers left a comment

Choose a reason for hiding this comment

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

Adding the kibana version makes sense and, yes, this is another use-case for server-side doclinks.
nit: we need to make sure the tutorials give info about what is required and what isn't. I imagine someone going through a tutorial to get their data indexed and only finding out later that they missed a required config.

{
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of \
Elasticsearch, and {kibanaUrlTemplate} is the URL of Kibana. To [configure SSL]({configureSslUrl}) with the \
Copy link
Contributor

Choose a reason for hiding this comment

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

We should mention when configuring SSL is required for the deployment, if possible. Tutorials help guide folks through the process flow and giving more information around what is required and what isn't.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added a comment to the yaml block that indicates this, let me know what you think. Additionally, the docs that we're linking to here will be updated with additional information before the 8.0 release.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mostlyjason Feel free to let me know if you think we should make any adjustments to the copy here.

{
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of \
Elasticsearch, and {kibanaUrlTemplate} is the URL of Kibana. To [configure SSL]({configureSslUrl}) with the \
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment about guiding folks about required vs optional config

{
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of \
Elasticsearch, and {kibanaUrlTemplate} is the URL of Kibana. To [configure SSL]({configureSslUrl}) with the \
Copy link
Contributor

Choose a reason for hiding this comment

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

optional or required?

@joshdover joshdover force-pushed the sec-by-default/beats-tutorials branch from adb2809 to abdc9a2 Compare December 3, 2021 18:47
@joshdover joshdover marked this pull request as ready for review December 3, 2021 18:53
@joshdover joshdover requested a review from a team as a code owner December 3, 2021 18:53
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@joshdover joshdover self-assigned this Dec 3, 2021
@joshdover joshdover enabled auto-merge (squash) December 3, 2021 18:54
@joshdover joshdover disabled auto-merge December 3, 2021 18:56
Copy link
Contributor

@pgayvallet pgayvallet left a comment

Choose a reason for hiding this comment

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

LGTM once the unused i18n keys are removed

@joshdover
Copy link
Contributor Author

I've updated this to use the new ca_trusted_fingerprint config value that was added in elastic/beats#29229 instead of ca_sha256 + verification_mode: self_signed_ca

@joshdover joshdover enabled auto-merge (squash) December 7, 2021 13:56
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
home 102 103 +1
Unknown metric groups

API count

id before after diff
home 132 133 +1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @joshdover

@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
8.0

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Dec 7, 2021
TinLe pushed a commit to TinLe/kibana that referenced this pull request Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Fleet Team label for Observability Data Collection Fleet team v8.0.0 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants