Skip to content
This repository was archived by the owner on Aug 16, 2022. It is now read-only.

Commit c6fc574

Browse files
Merge pull request #15 from opendistro/master
merge
2 parents 3ba19dd + a47d237 commit c6fc574

File tree

18 files changed

+739
-151
lines changed

18 files changed

+739
-151
lines changed

docs/ad/api.md

Lines changed: 567 additions & 137 deletions
Large diffs are not rendered by default.

docs/ad/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: default
33
title: Anomaly Detection
4-
nav_order: 36
4+
nav_order: 46
55
has_children: true
66
---
77

docs/ad/security.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
layout: default
3+
title: Anomaly Detection Security
4+
nav_order: 10
5+
parent: Anomaly Detection
6+
has_children: false
7+
---
8+
9+
# Anomaly detection security
10+
11+
You can use the security plugin with anomaly detection to limit non-admin users to specific actions. For example, you might want some users to only be able to create, update, or delete detectors, while others to only view detectors.
12+
13+
All anomaly detection indices are protected as system indices. Only a super admin user or an admin user with a TLS certificate can access system indices. For more information, see [System indices](../../security/configuration/system-indices/).
14+
15+
16+
Security for anomaly detection works the same as [security for alerting](../../alerting/security/).
17+
18+
## Basic permissions
19+
20+
As an admin user, you can use the security plugin to assign specific permissions to users based on which APIs they need access to. For a list of supported APIs, see [Anomaly Detection API](../api/).
21+
22+
The security plugin has two built-in roles that cover most anomaly detection use cases: `anomaly_full_access` and `anomaly_read_access`. For descriptions of each, see [Predefined roles](../../security/access-control/users-roles/#predefined-roles).
23+
24+
If these roles don't meet your needs, mix and match individual anomaly detection [permissions](../../security/access-control/permissions/) to suit your use case. Each action corresponds to an operation in the REST API. For example, the `cluster:admin/opendistro/ad/detector/delete` permission lets you delete detectors.
25+
26+
## (Advanced) Limit access by backend role
27+
28+
Use backend roles to configure fine-grained access to individual detectors based on roles. For example, users of different departments in an organization can view detectors owned by their own department.
29+
30+
First, make sure that your users have the appropriate [backend roles](../../security/access-control/). Backend roles usually come from an [LDAP server](../../security/configuration/ldap/) or [SAML provider](../../security/configuration/saml/), but if you use the internal user database, you can use the REST API to [add them manually](../../security/access-control/api/#create-user).
31+
32+
Next, enable the following setting:
33+
34+
```json
35+
PUT _cluster/settings
36+
{
37+
"transient": {
38+
"opendistro.anomaly_detection.filter_by_backend_roles": "true"
39+
}
40+
}
41+
```
42+
43+
Now when users view anomaly detection resources in Kibana (or make REST API calls), they only see detectors created by users who share at least one backend role.
44+
For example, consider two users: `alice` and `bob`.
45+
46+
`alice` has an analyst backend role:
47+
48+
```json
49+
PUT _opendistro/_security/api/internalusers/alice
50+
{
51+
"password": "alice",
52+
"backend_roles": [
53+
"analyst"
54+
],
55+
"attributes": {}
56+
}
57+
```
58+
59+
`bob` has a human-resources backend role:
60+
61+
```json
62+
PUT _opendistro/_security/api/internalusers/bob
63+
{
64+
"password": "bob",
65+
"backend_roles": [
66+
"human-resources"
67+
],
68+
"attributes": {}
69+
}
70+
```
71+
72+
Both `alice` and `bob` have full access to anomaly detection:
73+
74+
```json
75+
PUT _opendistro/_security/api/rolesmapping/anomaly_full_access
76+
{
77+
"backend_roles": [],
78+
"hosts": [],
79+
"users": [
80+
"alice",
81+
"bob"
82+
]
83+
}
84+
```
85+
86+
Because they have different backend roles, `alice` and `bob` cannot view each other's detectors and its results.

docs/ad/settings.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
layout: default
3+
title: Settings
4+
parent: Anomaly Detection
5+
nav_order: 4
6+
---
7+
8+
# Settings
9+
10+
The anomaly detection plugin adds several settings to the standard Elasticsearch cluster settings.
11+
They are dynamic, so you can change the default behavior of the plugin without restarting your cluster.
12+
You can mark them `persistent` or `transient`.
13+
14+
For example, to update the retention period of the result index:
15+
16+
```json
17+
PUT _cluster/settings
18+
{
19+
"transient": {
20+
"opendistro.anomaly_detection.ad_result_history_retention_period": "5m"
21+
}
22+
}
23+
```
24+
25+
Setting | Default | Description
26+
:--- | :--- | :---
27+
`opendistro.anomaly_detection.enabled` | True | Whether the anomaly detection plugin is enabled or not. If disabled, all detectors immediately stop running.
28+
`opendistro.anomaly_detection.max_anomaly_detectors` | 1,000 | The maximum number of non-high cardinality detectors (no category field) users can create.
29+
`opendistro.anomaly_detection.max_multi_entity_anomaly_detectors` | 10 | The maximum number of high cardinality detectors (with category field) in a cluster.
30+
`opendistro.anomaly_detection.max_anomaly_features` | 5 | The maximum number of features for a detector.
31+
`opendistro.anomaly_detection.ad_result_history_rollover_period` | 12h | How often the rollover condition is checked. If `true`, the plugin rolls over the result index to a new index.
32+
`opendistro.anomaly_detection.ad_result_history_max_docs` | 250000000 | The maximum number of documents in one result index. The plugin only counts refreshed documents in the primary shards.
33+
`opendistro.anomaly_detection.ad_result_history_retention_period` | 30d | The maximum age of the result index. If its age exceeds the threshold, the plugin deletes the rolled over result index. If the cluster has only one result index, the plugin keeps it even if it's older than its configured retention period.
34+
`opendistro.anomaly_detection.max_entities_per_query` | 1,000 | The maximum unique values per detection interval for high cardinality detectors. By default, if the category field has more than 1,000 unique values in a detector interval, the plugin selects the top 1,000 values and orders them by `doc_count`.
35+
`opendistro.anomaly_detection.max_entities_for_preview` | 30 | The maximum unique category field values displayed with the preview operation for high cardinality detectors. If the category field has more than 30 unique values, the plugin selects the top 30 values and orders them by `doc_count`.
36+
`opendistro.anomaly_detection.max_primary_shards` | 10 | The maximum number of primary shards an anomaly detection index can have.
37+
`opendistro.anomaly_detection.filter_by_backend_roles` | False | When you enable the security plugin and set this to `true`, the plugin filters results based on the user's backend role(s).
38+
`opendistro.anomaly_detection.max_cache_miss_handling_per_second` | 100 | High cardinality detectors use a cache to store active models. In the event of a cache miss, the cache gets the models from the model checkpoint index. Use this setting to limit the rate of fetching models. Because the thread pool for a GET operation has a queue of 1,000, we recommend setting this value below 1,000.

docs/alerting/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: default
33
title: Alerting
4-
nav_order: 30
4+
nav_order: 34
55
has_children: true
66
---
77

docs/images/ad.png

56.4 KB
Loading

docs/ism/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: default
33
title: Index State Management
4-
nav_order: 34
4+
nav_order: 30
55
has_children: true
66
---
77

docs/knn/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: default
33
title: KNN
4-
nav_order: 34
4+
nav_order: 50
55
has_children: true
66
has_toc: false
77
---
@@ -202,7 +202,7 @@ All parameters are required.
202202
- `source` is the name of the script, `knn_score`.
203203

204204
This script is part of the KNN plugin and isn't available at the standard `_scripts` path. A GET request to `_cluster/state/metadata` doesn't return it, either.
205-
205+
206206
- `field` is the field that contains your vector data.
207207
- `vector` is the point you want to find the nearest neighbors for.
208208
- `space_type` is either `l2` or `cosinesimil`.

docs/notebooks/index.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
---
22
layout: default
3-
title: Notebooks
4-
nav_order: 38
3+
title: Notebooks (experimental)
4+
nav_order: 54
55
has_children: false
66
---
77

8-
# Kibana Notebooks
8+
# Kibana notebooks (experimental)
9+
10+
Kibana notebooks have a known issue with [tenants](../security/access-control/multi-tenancy/). If you open a notebook and can't see its visualizations, you might be under the wrong tenant, or you might not have access to the tenant at all.
11+
{: .warning }
912

1013
A Kibana notebook is an interface that lets you easily combine live visualizations and narrative text in a single notebook interface.
1114

@@ -15,6 +18,7 @@ A notebook is a document composed of two elements: Kibana visualizations and par
1518

1619
Common use cases include creating postmortem reports, designing runbooks, building live infrastructure reports, and writing documentation.
1720

21+
1822
## Get Started with Notebooks
1923

2024
To get started, choose **Kibana Notebooks** in Kibana.

docs/pa/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: default
33
title: Performance Analyzer
4-
nav_order: 38
4+
nav_order: 58
55
has_children: true
66
---
77

0 commit comments

Comments
 (0)