Skip to content
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
8b32dfe
First draft
nastasha-solomon Oct 9, 2023
b5dbd1e
Fixed include
nastasha-solomon Oct 9, 2023
8137100
Update/create exception changes
nastasha-solomon Oct 29, 2023
a2807ce
Update docs/detections/api/exceptions/api-create-rule-default-excepti…
nastasha-solomon Oct 29, 2023
d68218b
Revising intro
nastasha-solomon Mar 13, 2024
af1e023
Adding new topic
nastasha-solomon Mar 19, 2024
7b8e8c3
Fixing refs
nastasha-solomon Mar 20, 2024
a772774
Removed duplicate entry
nastasha-solomon Mar 20, 2024
d1070c9
Yara's input
nastasha-solomon Apr 2, 2024
007e759
Minor wording changes
nastasha-solomon Apr 2, 2024
0ad87bd
Title update
nastasha-solomon Apr 2, 2024
d4da17a
Modifies title for shared exceptions
nastasha-solomon Apr 2, 2024
6c3747c
Fixing conflicts
nastasha-solomon Apr 3, 2024
8e76518
attempt number 2
nastasha-solomon Apr 3, 2024
356b9c6
Added file ext to index file
nastasha-solomon Apr 3, 2024
8b765a8
Closing table
nastasha-solomon Apr 3, 2024
fa50009
Update docs/detections/api/rules/rules-api-overview.asciidoc
nastasha-solomon Apr 3, 2024
7083f94
Update docs/detections/api/rules/rules-api-create-rule-default-except…
nastasha-solomon Apr 3, 2024
b836b6d
Minor changes and notes
nastasha-solomon Apr 3, 2024
52424a4
Fixed route in example
nastasha-solomon Apr 3, 2024
580f433
Update docs/detections/api/rules/rules-api-create-rule-default-except…
nastasha-solomon Apr 3, 2024
80f7417
Update docs/detections/api/rules/rules-api-create-single-rule-excepti…
nastasha-solomon Apr 3, 2024
1ab1940
Update docs/detections/api/rules/rules-api-create-single-rule-excepti…
nastasha-solomon Apr 3, 2024
9317b58
Remove comment chars
nastasha-solomon Apr 3, 2024
a32204d
Input from Yara
nastasha-solomon Aug 19, 2024
600fec0
Refreshed params
nastasha-solomon Aug 20, 2024
f301ba1
minor style fixes
nastasha-solomon Aug 20, 2024
bf3a09f
Update docs/detections/api/rules/rules-api-create-rule-default-except…
nastasha-solomon Oct 10, 2024
5e68b6e
Merge branch 'main' into issue-3491-exception-item-list
nastasha-solomon Dec 19, 2024
8f55a33
Merge branch 'main' into issue-3491-exception-item-list
nastasha-solomon Jan 8, 2025
d88a02d
Merge branch 'main' into issue-3491-exception-item-list
nastasha-solomon Jan 9, 2025
4f35260
Merge branch 'main' into issue-3491-exception-item-list
nastasha-solomon Jan 13, 2025
ed6e914
Update docs/detections/api/exceptions/api-create-exception-container.…
nastasha-solomon Jan 13, 2025
f952986
Update docs/detections/api/exceptions/api-update-exception-container.…
nastasha-solomon Jan 14, 2025
4b45ed1
Update docs/detections/api/rules/rules-api-create-rule-default-except…
nastasha-solomon Jan 14, 2025
8275775
Update docs/detections/api/rules/rules-api-create-rule-default-except…
nastasha-solomon Jan 14, 2025
2b85ddb
Ben's suggestion
nastasha-solomon Jan 14, 2025
404bc9d
Update docs/detections/api/rules/rules-api-overview.asciidoc
nastasha-solomon Jan 14, 2025
af5b351
Update docs/detections/api/rules/rules-api-create-single-rule-excepti…
nastasha-solomon Jan 14, 2025
e59785b
Merge branch 'main' into issue-3491-exception-item-list
nastasha-solomon Jan 14, 2025
68d3cb3
Replaced container with list
nastasha-solomon Jan 14, 2025
1cca3ee
fixed typo
nastasha-solomon Jan 14, 2025
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
4 changes: 4 additions & 0 deletions docs/detections/api/det-api-index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ include::rules/rules-api-delete.asciidoc[]

include::rules/rules-api-bulk-actions.asciidoc[]

include::rules/rules-api-create-rule-default-exception-list.asciidoc[]

include::rules/rules-api-create-single-rule-exception-item.asciidoc[]

include::rules/index-api-overview.asciidoc[]

include::rules/tags-api-overview.asciidoc[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ provided.
|No, defaults to `single`.
|`tags` |String[] |String array containing words and phrases to help categorize
exception containers. |No
|`type` |String a|The type of exception, which must be one of these:
|`type` |String a|The type of exception list, which must be one of these:

* `detection`: Detection rule exception
* `endpoint`: Endpoint alert exception
* `detection`: Shared rule exception list
* `endpoint`: Endpoint rule exception list
* `rule_default`: Single rule exception list
* `endpoint`: Endpoint rule exception
* `rule_default`: Single rule exception

|Yes

Expand Down
50 changes: 24 additions & 26 deletions docs/detections/api/exceptions/api-create-exception-item.asciidoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[[exceptions-api-create-exception-item]]
=== Create exception item
=== Create exceptions used by multiple rules

.New API Reference
[sidebar]
Expand All @@ -10,21 +10,23 @@ For the most up-to-date API details, refer to {api-kibana}/group/endpoint-securi
Creates an exception item and associates it with the specified
<<exceptions-api-create-container, exception container>>.

Refer to <<lists-api-overview>> for information about creating exception items from
lists, such as a list of IP addresses or host names.

NOTE: Before creating exception items, you must create an exception container.

IMPORTANT: Endpoint rule exception items cannot use
[IMPORTANT]
=====
* Before creating exception items, you must create an <<exceptions-api-create-container, exception container>>. After creating the container, you can associate exception items with it.
* Endpoint rule exception items cannot use
<<lists-api-overview, lists>> (the `list` in the `entries` array), and the
following fields cannot be used in exception queries (as `field` values in the
`entries` object):

* `file.Ext.quarantine_path`
* `file.Ext.quarantine_result`
* `process.entity_id`
* `process.parent.entity_id`
* `process.ancestry`
** `file.Ext.quarantine_path`
Copy link
Contributor

Choose a reason for hiding this comment

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

@caitlinbetz is this still accurate? I know we opened endpoint exceptions up to have less field restrictions, not sure if these still hold.

** `file.Ext.quarantine_result`
** `process.entity_id`
** `process.parent.entity_id`
** `process.ancestry`
=====

TIP: For more information about creating exceptions for a single rule, refer to <<exceptions-api-create-rule-default-exception-item>>. For more information about creating exception items from a list, such as a list of IP addresses or hosts names, refer to <<lists-api-overview>>.

==== Request URL

Expand All @@ -38,11 +40,11 @@ A JSON object with these fields:
|==============================================
|Name |Type |Description |Required

|`comments` |comments[] a|Array of `comment` fields:
|`comments` |String[] a|Array of `comment` fields. Default value is `[]` (empty):

* `comment` (string): Comments about the exception item.

|No, defaults to empty array.
|No

|`description` |String |Describes the exception item. |Yes
|`entries` |<<entries-object-schema, entries[]>> |Array containing the
Expand All @@ -61,22 +63,22 @@ in all {kib} spaces or just the space in which it is created, where:
* `single`: Only available in the {kib} space in which it is created.
* `agnostic`: Available in all {kib} spaces.

Must be the same value as its associated exception container.
Must be the same value as its associated exception container. Default value is `single`.

|No, defaults to `single`.
|`tags` |String[] |String array containing words and phrases to help categorize
exception items. |No
|`type` |String a|Exception query type, must be `simple`. |Yes
|`_tags` |String[] a|For endpoint rules only, defines the OS on which the
|No
|`os_types` |String[] a|Defines the OS on which the
exception is implemented. Valid values are:

* `os:windows`: Windows OS
* `os:linux`: Linux OS
* `os:macos`: Mac OS
* `os:macos`: Mac OS

The array must also include an `endpoint` element (to implement the exception on Linux hosts, use: `["endpoint", "os:linux"]`).
Default value is `[]` (empty).

|For endpoint exceptions, yes. For detection exceptions, no.
|No
|`tags` |String[] |String array containing words and phrases to help categorize
exception items. |No
|`type` |String a|Exception query type, must be `simple`. |Yes

|==============================================

Expand All @@ -89,10 +91,6 @@ The array must also include an `endpoint` element (to implement the exception on

|`field` |String |The source event field used to define the exception. Cannot
be an empty string. |Yes
|`list` |list |Object containing the
<<lists-api-create-container, list container's>> `id` and `type`. Only valid for
detection exception items.|No, except when using a list to define detection
exceptions.
|`operator` |String a|The operator used to determine when the exception is used.
Can be:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ the container's `id` field is not used.
exception containers. |No
|`type` |String a|The type of exception, which must be one of these:

* `detection`: Detection rule exception
* `endpoint`: Endpoint alert exception
|`type` |String a|The type of exception list. Valid values are:

* `detection`: Shared rule exception
* `endpoint`: Endpoint rule exception
* `rule_default`: Single rule exception

|Yes

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
[[exceptions-api-create-rule-default-exception-list]]
=== Create default exception list for a rule

Creates a default exception list for the rule you specify.

To add exception items to a default exception list, pass in exceptions items that you want applied to the rule. Refer to <<exceptions-api-create-rule-default-exception-item>> for more information.

When an exception item’s query evaluates to `true`, the associated rule does not issue alerts even when its other criteria are met.

NOTE: Default exception lists do not display on the **Shared Exception Lists** page in the {security-app} UI; they only appear in the Rule exceptions on the rule details page. This is because default exception lists can only be associated with a single rule. Refer to <<manage-exception>> to learn more.

==== Request URL

`POST <kibana host>:<port>/api/detection_engine/<rule_id>/exceptions`

==== Request body

A JSON object with these fields:

[width="100%",options="header"]
|==============================================
|Name |Type |Description |Required

|`description` |String |Describes the exception container. |Yes
|`list_id` |String |Unique identifier. |No, automatically created when it is not
provided.
|`meta` |Object |Placeholder for metadata about the list container. |No
|`name` |String |The exception container's name. |Yes
|`namespace_type` |String a|Determines whether the exception container is available in all {kib} spaces or just the space in which it is created, where:

* `single`: Only available in the {kib} space in which it is created.
* `agnostic`: Available in all {kib} spaces.

|No, defaults to `single`.
|`tags` |String[] |String array containing words and phrases to help categorize
exception containers. |No
|`type` |String a|The type of exception, which must be:

* `rule_default`: Exception list that belongs to a single rule.

|Yes

|==============================================

===== Example requests

Creates an exception container for holding trusted Linux process exception
items:

[source,console]
--------------------------------------------------
POST api/detection_engine/<rule_id>/exceptions
{
"description": "Excludes Linux trusted processes",
"name": "Linux process exceptions",
"list_id": "trusted-linux-processes",
"type": "detection",
"namespace_type": "single",
"tags": [
"linux",
"processes"
]
}
--------------------------------------------------
// KIBANA

==== Response code

`200`::
Indicates a successful call.


==== Response payload

The exception container object with a unique ID.

[source,json]
--------------------------------------------------
{
"_tags": [],
"created_at": "2020-07-13T09:33:46.187Z",
"created_by": "elastic",
"description": "Excludes Linux trusted processes",
"id": "f320c070-c4eb-11ea-80bb-11861bae2798", <1>
"list_id": "trusted-linux-processes", <2>
"name": "Linux process exceptions",
"namespace_type": "single", <3>
"tags": [
"linux",
"processes"
],
"tie_breaker_id": "2c08d5a5-2ecc-4d5a-acfb-0a367f25b3f3",
"type": "detection", <4>
"updated_at": "2020-07-13T09:33:46.359Z",
"updated_by": "elastic"
}
--------------------------------------------------

These values are required to associate the exception container with detection
rules:

<1> `id`
<2> `list_id`
<3> `namespace_type`
<4> `type`
Loading