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

[DOCS] Update Kibana install docs for security ON by default Beta #118770

Merged

Conversation

lockewritesdocs
Copy link
Contributor

@lockewritesdocs lockewritesdocs commented Nov 16, 2021

Summary

In 8.0, security is enabled and configured when users start Elasticsearch. An enrollment token is generated for Kibana, which users can copy and paste to enroll Kibana with Elasticsearch. This PR:

  • Adds a new section for starting Elasticsearch and enrolling Kibana (tar.gz, Windows, Deb, RPM)
  • Updates the section for Running Kibana from the command line to include steps for copying/pasting the enrollment token (tar.gz, Windows)

Preview links:

Note: Security ON by default currently does not support Homebrew, but hopefully will for 8.0.

@lockewritesdocs lockewritesdocs added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes docs v8.1.0 Feature:Security/Interactive Setup Platform Security - Interactive setup mode labels Nov 16, 2021
@lockewritesdocs lockewritesdocs self-assigned this Nov 16, 2021
Copy link
Contributor

@jportner jportner left a comment

Choose a reason for hiding this comment

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

Looks good, a couple of suggestions below. I'd also like @thomheymann to weigh in.

docs/setup/install/start-es-and-enroll.asciidoc Outdated Show resolved Hide resolved
Comment on lines 3 to 9
If this is the first time you're starting {kib}, this command generates a
unique link to enroll your {kib} instance with {es}.

. In your terminal, click the generated link to open {kib} in your browser.

. In your browser, paste the enrollment token for {kib} and click the
button to connect your {kib} instance with {es}.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this sort of glosses over the difference between the Kibana auth code and the Elastic enrollment token.

Maybe we could use a couple of screenshots here? Or maybe we could clarify this text a bit more? I'm not sure what the best approach is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So even if I go to http://0.0.0.0:5601/ (without the unique part of the URL), Kibana prompts me to enter the enrollment token because it’s the first time I’ve configured it. That’s cool!

If I click Configure manually and then enter http://0.0.0.0:9200, Kibana indicates that it can't connect to my cluster.

image

If I then go back and enter the enrollment code that Elasticsearch generated, I get this prompt to enter a verification code. I looked back in the Kibana terminal, and sure enough, there was a verification code!

  • @jportner, is this the behavior that you mentioned?
  • @thomheymann, are users only prompted for this verification code if they attempt to configure manually? Also, do you know why I received an error when trying to connect to http://0.0.0.0:9200 manually?

image

Copy link
Contributor

@thomheymann thomheymann Nov 17, 2021

Choose a reason for hiding this comment

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

Joe's description is correct but I would call the code "verification code". We ask for it whenever someone attempts to configure Kibana using interactive setup UI without having followed the link that was generated when starting Kibana. It doesn't matter whether they do that using the enrollment token or using the manual configuration mode. Keep in mind that we only ask for the verification code when required (i.e. the user did not follow the interactive setup link and the user has entered the enrollment token / manual connection details and clicked "Configure Elastic") so you will not see it simply by viewing the enrollment token screen or the manual configuration screen.

For clarification: The "Check address" step does not require the verification code so it is expected that you don't see it at that stage.

I'm not sure if we need to go into too much detail regarding this step in the docs since most users will (hopefully) never see it. Might be worth adding a note to the docs but I would try and keep it simple since the popup does explain what to do.

@lockewritesdocs
Copy link
Contributor Author

Ok, I think that I unlocked the manual configuration workflow (achievement unlocked 🔓)

Go to http://0.0.0.0:9200 (with or without the unique ID in the URL), which shows this in the terminal:

image

Click Configure manually and try to enter http://localhost:9200, followed by http://0.0.0.0:9200. Neither of these works, and I see the errors in the terminal. I find the correct URL where Elasticsearch is running, which is https://172.18.0.2:9200.

image

Enter the new URL and click Configure manually -- this produces a new login screen I've not seen previously that asks for the kibana_system password. We don't print this password to the terminal, which means that users have to run elasticsearch-reset-password -u kibana_system to set a new password for that user. Correct me if I'm wrong, but I don't know anywhere else where this password is available.

image

Copy link
Contributor

@thomheymann thomheymann left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together Adam. Looks great!

I've added a couple comments suggestions below but happy to go with what you recommend.

docs/setup/install/auto-enroll.asciidoc Outdated Show resolved Hide resolved
docs/setup/install/auto-enroll.asciidoc Outdated Show resolved Hide resolved
docs/setup/install/start-es-and-enroll.asciidoc Outdated Show resolved Hide resolved
@thomheymann
Copy link
Contributor

@lockewritesdocs Sorry you had to struggle through this, I didn't realise you hadn't seen the manual configuration screen.

We don't print this password to the terminal, which means that users have to run elasticsearch-reset-password -u kibana_system to set a new password for that user. Correct me if I'm wrong, but I don't know anywhere else where this password is available.

Good point - it might be worth adding some more guidance around this in the UI. I'll add a note to #118654

@lockewritesdocs lockewritesdocs changed the title [DOCS] Update install docs for security ON by default Beta [DOCS] Update Kibana install docs for security ON by default Beta Nov 17, 2021
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

History

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

cc @lockewritesdocs

Copy link
Contributor

@jportner jportner left a comment

Choose a reason for hiding this comment

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

LGTM!

@lockewritesdocs lockewritesdocs added the auto-backport Deprecated - use backport:version if exact versions are needed label Nov 18, 2021
@lockewritesdocs lockewritesdocs merged commit a578bea into elastic:main Nov 18, 2021
@lockewritesdocs lockewritesdocs deleted the docs__update-install-archive branch November 18, 2021 16:42
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 18, 2021
…astic#118770)

* [DOCS] Update install docs for security ON by default

* Incorporating reviewer feedback and expanding RPM + Debian steps

* Update Debian and RPM enrollment token process
@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 Nov 18, 2021
…18770) (#119053)

* [DOCS] Update install docs for security ON by default

* Incorporating reviewer feedback and expanding RPM + Debian steps

* Update Debian and RPM enrollment token process

Co-authored-by: Adam Locke <adam.locke@elastic.co>
fkanout pushed a commit to fkanout/kibana that referenced this pull request Nov 19, 2021
…astic#118770)

* [DOCS] Update install docs for security ON by default

* Incorporating reviewer feedback and expanding RPM + Debian steps

* Update Debian and RPM enrollment token process
TinLe pushed a commit to TinLe/kibana that referenced this pull request Nov 20, 2021
…astic#118770)

* [DOCS] Update install docs for security ON by default

* Incorporating reviewer feedback and expanding RPM + Debian steps

* Update Debian and RPM enrollment token process
dmlemeshko pushed a commit that referenced this pull request Nov 29, 2021
…18770)

* [DOCS] Update install docs for security ON by default

* Incorporating reviewer feedback and expanding RPM + Debian steps

* Update Debian and RPM enrollment token process
gbamparop pushed a commit to gbamparop/kibana that referenced this pull request Jan 12, 2022
…astic#118770)

* [DOCS] Update install docs for security ON by default

* Incorporating reviewer feedback and expanding RPM + Debian steps

* Update Debian and RPM enrollment token process
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 docs Feature:Security/Interactive Setup Platform Security - Interactive setup mode release_note:skip Skip the PR/issue when compiling release notes v8.0.0 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants