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] Search responses without a specific namespace to show pending actions #123741

Conversation

ashokaditya
Copy link
Member

Summary

Searches response docs in the endpoint response index pattern to determine pending action response counts.

Checklist

Delete any items that are not applicable to this PR.

@ashokaditya ashokaditya requested a review from a team as a code owner January 25, 2022 17:15
@ashokaditya ashokaditya changed the title search responses without a specific namespace to show pending actions [Security Solution][Endpoint] Search responses without a specific namespace to show pending actions Jan 25, 2022
@ashokaditya ashokaditya self-assigned this Jan 25, 2022
@ashokaditya ashokaditya added bug Fixes for quality problems that affect the customer experience impact:critical This issue should be addressed immediately due to a critical level of impact on the product. release_note:fix v8.0.0 auto-backport Deprecated - use backport:version if exact versions are needed Team:Defend Workflows “EDR Workflows” sub-team of Security Solution labels Jan 25, 2022
@elasticmachine
Copy link
Contributor

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

@ashokaditya ashokaditya force-pushed the fix/olm-pending_actions_index_name_update-123707 branch from 964f6e6 to eb6b4e4 Compare January 25, 2022 19:41
@ashokaditya ashokaditya force-pushed the fix/olm-pending_actions_index_name_update-123707 branch from 0457753 to f006eb1 Compare January 25, 2022 20:17
@kevinlog
Copy link
Contributor

kevinlog commented Jan 25, 2022

I checked this out and every looks like it's working!

I created 2 policies with different namespaces and switched them in and out on the same Endpoint. I isolated/released the Endpoint on both policies.

Policy 1 with security as the namespace:
The statuses are working
image

You can see the entries coming in correctly on the activity log
image

Policy 2 with other as the namespace:
The statuses are working
image

You can see the entries coming in correctly on the activity log
image

This same Endpoint has used different namespaces and Host Isolation and its Activity log history are preserved as expected.

Here are the multiple indices with the different namespaces:
image

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.

I left a question, but giving it a 👍

export const logsEndpointResponsesRegex = new RegExp(
`(^\.ds-\.logs-endpoint\.action\.responses-default-).+`
`(^\.ds-\.logs-endpoint\.action\.responses-\\w+-).+`
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you really need \\w+ 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.

Not really! Just matching the name is enough. Will clean it up in a follow up PR

@kevinlog kevinlog enabled auto-merge (squash) January 25, 2022 22:11
@kevinlog kevinlog merged commit dfd8bfb into elastic:main Jan 25, 2022
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

cc @ashokaditya

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 25, 2022
…espace to show pending actions (elastic#123741)

* search responses without a specific namespace to show pending actions

fixes elastic/issues/123707

* search over all endpoint response indices irrespective of namespace suffix

fixes elastic/issues/123707

* match namespace suffixes for endpoint action and response indices

fixes elastic/issues/123707

(cherry picked from commit dfd8bfb)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 25, 2022
…espace to show pending actions (elastic#123741)

* search responses without a specific namespace to show pending actions

fixes elastic/issues/123707

* search over all endpoint response indices irrespective of namespace suffix

fixes elastic/issues/123707

* match namespace suffixes for endpoint action and response indices

fixes elastic/issues/123707

(cherry picked from commit dfd8bfb)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.0
7.17

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jan 26, 2022
…espace to show pending actions (#123741) (#123769)

* search responses without a specific namespace to show pending actions

fixes /issues/123707

* search over all endpoint response indices irrespective of namespace suffix

fixes /issues/123707

* match namespace suffixes for endpoint action and response indices

fixes /issues/123707

(cherry picked from commit dfd8bfb)

Co-authored-by: Ashokaditya <1849116+ashokaditya@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Jan 26, 2022
…espace to show pending actions (#123741) (#123770)

* search responses without a specific namespace to show pending actions

fixes /issues/123707

* search over all endpoint response indices irrespective of namespace suffix

fixes /issues/123707

* match namespace suffixes for endpoint action and response indices

fixes /issues/123707

(cherry picked from commit dfd8bfb)

Co-authored-by: Ashokaditya <1849116+ashokaditya@users.noreply.github.com>
@ashokaditya ashokaditya deleted the fix/olm-pending_actions_index_name_update-123707 branch January 26, 2022 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed bug Fixes for quality problems that affect the customer experience impact:critical This issue should be addressed immediately due to a critical level of impact on the product. release_note:fix Team:Defend Workflows “EDR Workflows” sub-team of Security Solution v7.17.0 v8.0.0 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants