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

[Security Solution][Endpoint] Update list api summary endpoint to use filter #123476

Conversation

ashokaditya
Copy link
Member

@ashokaditya ashokaditya commented Jan 20, 2022

Summary

Updates the summary endpoint of list API to allow kql filters in requests.

policy detail card:
Screenshot 2022-01-24 at 10 32 08

integration host isolation exception card total
image

Checklist

Delete any items that are not applicable to this PR.

@ashokaditya ashokaditya self-assigned this Jan 20, 2022
@ashokaditya ashokaditya added v8.1.0 release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution labels Jan 20, 2022
@ashokaditya ashokaditya force-pushed the task/update_list_api_summary_endpoint_to_use_filter branch 3 times, most recently from 5c0458e to b9df82b Compare January 24, 2022 08:41
@ashokaditya ashokaditya force-pushed the task/update_list_api_summary_endpoint_to_use_filter branch from d806b35 to 35d1ef9 Compare January 24, 2022 15:22
@ashokaditya ashokaditya marked this pull request as ready for review January 24, 2022 15:22
@ashokaditya ashokaditya requested review from a team as code owners January 24, 2022 15:22
@ashokaditya ashokaditya requested review from pzl and dasansol92 January 24, 2022 15:22
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-onboarding-and-lifecycle-mgt (Team:Onboarding and Lifecycle Mgt)

ashokaditya added a commit to ashokaditya/security-docs that referenced this pull request Jan 24, 2022
Comment on lines 91 to 92
// Do not add up the items by OS if host isolation exception
// As each host exception entry applies to all OSs
Copy link
Member

Choose a reason for hiding this comment

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

thanks for commenting the "why" here 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

😄

@ashokaditya
Copy link
Member Author

doc PR elastic/security-docs/pull/1439

Copy link
Contributor

@dasansol92 dasansol92 left a comment

Choose a reason for hiding this comment

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

This is looking so good! Thanks for adding this filter parameter.
I think we are missing the changes on the Trusted Apps card and on the Host isolation Exceptions card. In those places we can use the new summary api instead of the list one.

page: 1,
per_page: 0,
saved_objects: [],
total: 7,
Copy link
Contributor

Choose a reason for hiding this comment

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

Not relevant but I think this total number should be 6 according the counters above

Copy link
Member Author

Choose a reason for hiding this comment

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

@dasansol92 so this was because the API was returning +1 as total. I went looking for why that was and @paul-tavares helped me figure that out. We made the changes in bdc0c97 to fix that. Also updated the test mock to have the correct total.

@ashokaditya
Copy link
Member Author

@elasticmachine merge upstream

Copy link
Contributor

@yctercero yctercero left a comment

Choose a reason for hiding this comment

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

Just did a code review, didn't pull down to check but code LGTM.

++ what Frank suggested about integration tests. Could you add an integration test that uses this new filter in https://github.com/elastic/kibana/blob/main/x-pack/test/lists_api_integration/security_and_spaces/tests/summary_exception_lists.ts ?

review suggestions
Copy link
Contributor

@paul-tavares paul-tavares left a comment

Choose a reason for hiding this comment

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

Thanks for all the tests 👍

LGTM. Make sure you get 👍 's from Detections team and/or security solution platform team

Copy link
Contributor

@yctercero yctercero left a comment

Choose a reason for hiding this comment

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

Thanks for the tests!

@ashokaditya
Copy link
Member Author

@elasticmachine merge upstream

@ashokaditya ashokaditya enabled auto-merge (squash) January 26, 2022 18:03
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
lists 140.6KB 140.6KB +10.0B
securitySolution 4.6MB 4.6MB +30.0B
total +40.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @ashokaditya

@ashokaditya ashokaditya merged commit 1855702 into elastic:main Jan 26, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jan 26, 2022
@dasansol92
Copy link
Contributor

@ashokaditya I was checking this and I think my comment was missed

I think we are missing the changes on the Trusted Apps card and on the Host isolation Exceptions card. In those places we can use the new summary api instead of the list one.

Did you created a separated issue for it?

@ashokaditya
Copy link
Member Author

I think we are missing the changes on the Trusted Apps card and on the Host isolation Exceptions card. In those places we can use the new summary API instead of the list one.

Oops my bad! I'll update those two in a new PR now. Thanks for looking into this and following up.

@ashokaditya ashokaditya deleted the task/update_list_api_summary_endpoint_to_use_filter branch January 27, 2022 09:13
ashokaditya added a commit to ashokaditya/kibana that referenced this pull request Jan 27, 2022
ashokaditya added a commit to ashokaditya/kibana that referenced this pull request Jan 27, 2022
ashokaditya added a commit to ashokaditya/kibana that referenced this pull request Jan 27, 2022
ashokaditya added a commit to elastic/security-docs that referenced this pull request Jan 27, 2022
* Update exception list summary api doc

fixes elastic/security-team/issues/2513
ref elastic/kibana/pull/123476

* Update api-summary-exception-container.asciidoc

* Update docs/detections/api/exceptions/api-summary-exception-container.asciidoc

Co-authored-by: Janeen Mikell-Straughn <[email protected]>

Co-authored-by: Janeen Mikell-Straughn <[email protected]>
ashokaditya added a commit that referenced this pull request Jan 28, 2022
…ation Exception cards to use exception list summary API (#123900)

* don't use deprecated class

ref /pull/123476

* update TA card to use summary api with filter

ref #123476 (review)

* update fleet hie card to use summary api

ref  #123476 (review)

* update param types

review changes

Co-authored-by: Kibana Machine <[email protected]>
awahab07 pushed a commit to awahab07/kibana that referenced this pull request Jan 31, 2022
…ation Exception cards to use exception list summary API (elastic#123900)

* don't use deprecated class

ref elastic/pull/123476

* update TA card to use summary api with filter

ref elastic#123476 (review)

* update fleet hie card to use summary api

ref  elastic#123476 (review)

* update param types

review changes

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants