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

Add a note mentioning the privileges needed for SLM #43708

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 47 additions & 1 deletion docs/reference/ilm/getting-started-slm.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,52 @@ hands-on scenario. The goal of this example is to automatically back up {es}
indices using the <<modules-snapshots,snapshots>> every day at a particular
time.

[float]
[[slm-and-security]]
=== Security and SLM
Before starting, it's important to understand the privileges that are needed
when configuring SLM if you are using the security plugin. There are two
built-in cluster privileges that can be used to assist: `manage_slm` and
`read_slm`. It's also good to note that the `create_snapshot` permission
allows taking snapshots even for indices the role may not have access to.

An example of configuring an administrator role for SLM follows:

[source,js]
-----------------------------------
POST /_security/role/slm-admin
{
"cluster": ["manage_slm", "create_snapshot"],
"indices": [
{
"names": [".slm-history-*"],
"privileges": ["all"]
}
]
}
-----------------------------------
// CONSOLE
// TEST[skip:security is not enabled here]

Or, for a read-only role that can retrieve policies (but not update, execute, or
delete them), as well as only view the history index:

[source,js]
-----------------------------------
POST /_security/role/slm-read-only
{
"cluster": ["read_slm"],
"indices": [
{
"names": [".slm-history-*"],
"privileges": ["read"]
}
]
}
-----------------------------------
// CONSOLE
// TEST[skip:security is not enabled here]

[float]
[[slm-gs-create-policy]]
=== Setting up a repository
Expand Down Expand Up @@ -166,4 +212,4 @@ by searching the index pattern `.slm-history*`.
That's it! We have our first SLM policy set up to periodically take snapshots
so that our backups are always up to date. You can read more details in the
<<snapshot-lifecycle-management-api,SLM API documentation>> and the
<<modules-snapshots,general snapshot documentation.>>
<<modules-snapshots,general snapshot documentation.>>