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

[8.x] [SecuritySolution] Add enrichPolicyExecutionInterval to entity enablement and init APIs (#207374) #208223

Merged
merged 4 commits into from
Jan 24, 2025

Conversation

machadoum
Copy link
Member

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…ment and init APIs (elastic#207374)

## Summary

Add `enrichPolicyExecutionInterval`param to entity enablement and init
APIs

### How to test?
* Start kibana
* Call the entity store enablement API with a short value for
`enrichPolicyExecutionInterval` param
* Check in the logs if the enrichment process is running frequently
* Clear the entity store
* Call the entity store enablement API without
`enrichPolicyExecutionInterval` param
* Check in the logs if the enrichment process is running less frequently

**Enable Entity store API call:**
```
POST kbn:/api/entity_store/enable {
  "enrichPolicyExecutionInterval": "10s"
}
```

**Init Entity store API call:**
```
POST kbn:/api/entity_store/engines/user/init {
  "enrichPolicyExecutionInterval": "10s"
}

```

**Enrich policy log message:**
```
   │ info [o.e.x.e.EnrichPolicyRunner] [...] Policy [entity_store_field_retention_user_default_v1.0.0]: Running enrich policy
```

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 1ca4d96)

# Conflicts:
#	oas_docs/output/kibana.serverless.yaml
#	oas_docs/output/kibana.yaml
#	x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/entity_store/enable.gen.ts
#	x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/entity_store/enable.schema.yaml
#	x-pack/solutions/security/plugins/security_solution/docs/openapi/ess/security_solution_entity_analytics_api_2023_10_31.bundled.schema.yaml
#	x-pack/solutions/security/plugins/security_solution/docs/openapi/serverless/security_solution_entity_analytics_api_2023_10_31.bundled.schema.yaml
#	x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/entity_store/entity_store_data_client.ts
@elasticmachine
Copy link
Contributor

💚 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
securitySolution 18.5MB 18.5MB +90.0B

cc @machadoum

@machadoum machadoum merged commit 6af68a2 into elastic:8.x Jan 24, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants