[SIEM][Detection Engine] - Update UI to read rule exceptions_list#69939
[SIEM][Detection Engine] - Update UI to read rule exceptions_list#69939yctercero wants to merge 56 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/siem (Team:SIEM) |
| export interface ExceptionIdentifiers { | ||
| id: string; | ||
| namespaceType: NamespaceType; | ||
| namespace_type: NamespaceType; |
There was a problem hiding this comment.
Was this changed to snake case to match the request body? I would expect it to be namespaceType everywhere except the API call, which sends namespace_type: namespaceType
There was a problem hiding this comment.
Yea it was. Would I specify that change from namespace_type to namespaceType in the graphql types?
There was a problem hiding this comment.
Working to update this and a found bug.
|
|
||
| const { indicesExist, indexPattern } = useWithSource('default', indexToAdd); | ||
|
|
||
| const exceptionLists = useMemo((): ExceptionIdentifiers[] => { |
There was a problem hiding this comment.
Ideally, we'd be transforming all of the rule params to camel case when we fetch them in use_rule / use_rules. This is a temporary workaround.
|
Pinging @elastic/apm-ui (Team:apm) |
💔 Build Failed
Failed CI StepsBuild metrics@kbn/optimizer bundle module count
History
To update your PR or re-run it, just comment with: |
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
Summary
This PR tries to start to tie together the recent server and client changes for exceptions lists.
exceptions_listpropertyexceptions_list, up until now we just had an empty array in it's placeidas opposed to it'slist_id, this now aligns with the UI using the same params on its endWith this PR, you should now be able to use the API to create rules with exception lists and see the alerts filtered in the UI as well as seeing the exceptions show now in the exceptions viewer. See #69715
TO DOsection for an explanation on the remaining updates needed to the filtering logic.Testing
To turn on lists plugin - in kibana.dev.yml
Add
export ELASTIC_XPACK_SIEM_LISTS_FEATURE=trueto your bash file.Use the scripts in
x-pack/plugins/lists/server/scriptsto create some sample exception lists and items. You can use the following:If you've previously played around with lists, run
./hard_reset.sh(this will delete any lists you've created).Create large value list:
./post_list.sh./post_list_item.sh(I modified the value to be"value": "10.4.2.140")Create exception list:
./post_exception_list.sh./post_exception_list_item.sh ./exception_lists/new/exception_list_item_with_list.jsonUse the scripts in
x-pack/plugins/security_solution/server/lib/detection_engine/scriptsto create rule:Before running script, you'll need to update the referenced exceptions_list id to the one you created
./post_rule.sh ./rules/queries/query_with_list.json(Makes reference to the exception list created in step above)In the

Alertstable, you should see something like the following where you only see events where theevent.moduleiszeekandsource.ipis10.4.2.140(or whatever ip you specified).Go to your newly created rule details and on the

Exceptionstab you should see something like this:Checklist