kibana/docs/user/security/tutorials/how-to-secure-access-to-kibana.asciidoc
Kibana Machine 418281b2d1
[8.x] [Docs] Update nav instructions and sample data installation to accommodate for the solution views (#199163) (#199438)
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Docs] Update nav instructions and sample data installation to
accommodate for the solution views
(#199163)](https://github.com/elastic/kibana/pull/199163)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"florent-leborgne","email":"florent.leborgne@elastic.co"},"sourceCommit":{"committedDate":"2024-11-08T10:10:32Z","message":"[Docs]
Update nav instructions and sample data installation to accommodate for
the solution views (#199163)\n\nThis PR:\r\n- updates navigation
instructions to accommodate for the navigation\r\nchanges related to
solution views.\r\n- updates instructions for adding sample data to rely
on the\r\nintegrations page instead of the home page, that only exists
with the\r\nclassic solution view\r\n- updates references to the home
page to avoid confusing users using one\r\nof the new solution
views\r\n\r\nCloses:
https://github.com/elastic/platform-docs-team/issues/529\r\nCloses:
https://github.com/elastic/platform-docs-team/issues/540","sha":"8e7fb7a77e2399e3e946bbba0462517fd7dad0f7","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","v9.0.0","docs","v8.16.0","backport:version","v8.17.0"],"title":"[Docs]
Update nav instructions and sample data installation to accommodate for
the solution
views","number":199163,"url":"https://github.com/elastic/kibana/pull/199163","mergeCommit":{"message":"[Docs]
Update nav instructions and sample data installation to accommodate for
the solution views (#199163)\n\nThis PR:\r\n- updates navigation
instructions to accommodate for the navigation\r\nchanges related to
solution views.\r\n- updates instructions for adding sample data to rely
on the\r\nintegrations page instead of the home page, that only exists
with the\r\nclassic solution view\r\n- updates references to the home
page to avoid confusing users using one\r\nof the new solution
views\r\n\r\nCloses:
https://github.com/elastic/platform-docs-team/issues/529\r\nCloses:
https://github.com/elastic/platform-docs-team/issues/540","sha":"8e7fb7a77e2399e3e946bbba0462517fd7dad0f7"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199163","number":199163,"mergeCommit":{"message":"[Docs]
Update nav instructions and sample data installation to accommodate for
the solution views (#199163)\n\nThis PR:\r\n- updates navigation
instructions to accommodate for the navigation\r\nchanges related to
solution views.\r\n- updates instructions for adding sample data to rely
on the\r\nintegrations page instead of the home page, that only exists
with the\r\nclassic solution view\r\n- updates references to the home
page to avoid confusing users using one\r\nof the new solution
views\r\n\r\nCloses:
https://github.com/elastic/platform-docs-team/issues/529\r\nCloses:
https://github.com/elastic/platform-docs-team/issues/540","sha":"8e7fb7a77e2399e3e946bbba0462517fd7dad0f7"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
2024-11-08 10:41:00 +00:00

136 lines
7.2 KiB
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[[tutorial-secure-access-to-kibana]]
== Securing access to {kib}
{kib} is home to an ever-growing suite of powerful features, which help you get the most out of your data. Your data is important, and should be protected. {kib} allows you to secure access to your data and control how users are able to interact with your data.
For example, some users might only need to view your stunning dashboards, while others might need to manage your fleet of Elastic agents and run machine learning jobs to detect anomalous behavior in your network.
This guide introduces you to three of {kib}'s security features: spaces, roles, and users. By the end of this tutorial, you will learn how to manage these entities, and how you can leverage them to secure access to both {kib} and your data.
[float]
=== Spaces
Do you have multiple teams using {kib}? Do you want a “playground” to experiment with new visualizations or rules? If so, then <<xpack-spaces,{kib} Spaces>> can help.
Think of a space as another instance of {kib}. A space allows you to organize your <<dashboard, dashboards>>, <<alerting-getting-started, rules>>, <<xpack-ml, machine learning jobs>>, and much more into their own categories. For example, you might have a Marketing space for your marketeers to track the results of their campaigns, and an Engineering space for your developers to {apm-guide-ref}/apm-overview.html[monitor application performance].
The assets you create in one space are isolated from other spaces, so when you enter a space, you only see the assets that belong to that space.
Refer to the <<xpack-spaces, Spaces documentation>> for more information.
[float]
=== Roles
Once your spaces are setup, the next step to securing access is to provision your roles. Roles are a collection of privileges that allow you to perform actions in {kib} and Elasticsearch. Roles are assigned to users, and to {ref}/built-in-users.html[system accounts] that power the Elastic Stack.
You can create your own roles, or use any of the {ref}/built-in-roles.html[built-in roles]. Some built-in roles are intended for Elastic Stack components and should not be assigned to end users directly.
One of the more useful built-in roles is `kibana_admin`. Assigning this role to your users will grant access to all of {kib}'s features. This includes the ability to manage Spaces.
The built-in roles are great for getting started with the Elastic Stack, and for system administrators who do not need more restrictive access. With so many features, its not possible to ship more granular roles to accommodate everyones needs. This is where custom roles come in.
As an administrator, you have the ability to create your own roles to describe exactly the kind of access your users should have. For example, you might create a `marketing_user` role, which you then assign to all users in your marketing department. This role would grant access to all of the necessary data and features for this team to be successful, without granting them access they dont require.
[float]
=== Users
Once your roles are setup, the next step to securing access is to create your users, and assign them one or more roles. {kib}'s user management allows you to provision accounts for each of your users.
TIP: Want Single Sign-on? {kib} supports a wide range of SSO implementations, including SAML, OIDC, LDAP/AD, and Kerberos. <<kibana-authentication, Learn more about {kib}'s SSO features>>.
[float]
[[tutorial-secure-kibana-dashboards-only]]
=== Example: Create a user with access only to dashboards
Lets work through an example together. Consider a marketing analyst who wants to monitor the effectiveness of their campaigns. They should be able to see their teams dashboards, but not be allowed to view or manage anything else in {kib}. All of the teams dashboards are located in the Marketing space.
[float]
==== Create a space
Create a Marketing space for your marketing analysts to use.
. Go to the *Spaces* management page using the navigation menu or the
<<kibana-navigation-search,global search field>>.
. Click **Create a space**.
. Give this space a unique name. For example: `Marketing`.
. Click **Create space**.
+
If youve followed the example above, you should end up with a space that looks like this:
+
[role="screenshot"]
image::security/images/tutorial-secure-access-example-1-space.png[Create space UI]
[float]
==== Create a role
To effectively use dashboards, create a role that describes the privileges you want to grant.
In this example, a marketing analyst will need:
* Access to **read** the data that powers the dashboards
* Access to **read** the dashboards within the `Marketing` space
To create the role:
. Go to the *Roles* management page using the navigation menu or the
<<kibana-navigation-search,global search field>>.
. Click **Create role**.
. Give this role a unique name. For example: `marketing_dashboards_role`.
. For this example, you want to store all marketing data in the `acme-marketing-*` set of indices. To grant this access, locate the **Index privileges** section and enter:
.. `acme-marketing-*` in the **Indices** field.
.. `read` and `view_index_metadata` in the **Privileges** field.
+
TIP: You can add multiple patterns of indices, and grant different access levels to each. Click **Add index privilege** to grant additional access.
. To grant access to dashboards in the `Marketing` space, locate the {kib} section, and click **Add {kib} privilege**:
.. From the **Spaces** dropdown, select the `Marketing` space.
.. Expand the **Analytics** section, and select the **Read** privilege for **Dashboard**.
.. Click **Add Kibana privilege**.
. Click **Create role**.
+
If youve followed the example above, you should end up with a role that looks like this:
+
[role="screenshot"]
image::security/images/tutorial-secure-access-example-1-role.png[Create role UI]
[float]
==== Create a user
Now that you created a role, create a user account.
. Navigate to *Stack Management*, and under *Security*, select *Users*.
. Click *Create user*.
. Give this user a descriptive username, and choose a secure password.
. Assign the *marketing_dashboards_role* that you previously created to this new user.
. Click *Create user*.
[role="screenshot"]
image::security/images/tutorial-secure-access-example-1-user.png[Create user UI]
[float]
==== Verify
Verify that the user and role are working correctly.
. Logout of {kib} if you are already logged in.
. In the login screen, enter the username and password for the account you created.
+
Youre taken into the `Marketing` space, and the main navigation shows only the *Dashboard* application.
+
[role="screenshot"]
image::security/images/tutorial-secure-access-example-1-test.png[Verifying access to dashboards]
[float]
=== What's next?
This guide is an introduction to {kib}'s security features. Check out these additional resources to learn more about authenticating and authorizing your users.
* View the <<kibana-authentication, authentication guide>> to learn more about single-sign on and other login features.
* View the <<kibana-role-management, authorization guide>> to learn more about authorizing access to {kib}'s features.
Still have questions? Ask on our https://discuss.elastic.co/c/kibana[Kibana discuss forum] and a fellow community member or Elastic engineer will help out.