Add 'Generic' Entity Engine Definition#211232
Merged
romulets merged 48 commits intoelastic:mainfrom Apr 15, 2025
Merged
Conversation
Contributor
|
Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security) |
opauloh
approved these changes
Apr 11, 2025
Closed
4 tasks
lgestc
approved these changes
Apr 14, 2025
Contributor
lgestc
left a comment
There was a problem hiding this comment.
investigations changes lgtm!
dplumlee
approved these changes
Apr 14, 2025
Contributor
dplumlee
left a comment
There was a problem hiding this comment.
Rule management changes lgtm
Member
|
Hey @romulets, great job! 👏 👏 I found something unexpected in the Entity Analytics dashboard. Are we intentionally displaying a panel for the Generic Entity Risk score? Besides that, everything looks good. I also desk-tested the most common flows. |
Member
Author
|
@machadoum it's not intentional! Awesome catch!!! I'll fix right away |
machadoum
approved these changes
Apr 15, 2025
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Async chunks
History
cc @romulets |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Introduce a new Entity Engine Definition called Generic. The larger context on why we are introducing a new entity definition is described on this private github issue.
The tldr; is that we would like to have an entity store with all the entities described by the entity ecs field. The decision to call
genericentity definition comes from the fact that any entity can be described with theentityfield - user, host, service, database, queue, subscription and so on. Therefore it makes sense to have the concept calledgenericentity, meanwhile the existent entity definitions will be called concrete entities, because they describe a very concrete type of entity (currently user, host, service).Other changes included on this PR:
entity.namewithentity.id, only set if no value is foundentity.typeas the entity definition type toentity.EngineMetadata.TypegetRiskEngineEntityTypesandgetAssetCriticalityEntityTypes. There was a somewhat unnecessary and duplicated logic in these functions which essentially described the concrete entity definitions to be used by entity analytics flows. A new function calledgetEntityAnalyticsEntityTypeswas introduced which unifies this logic and returns the entity types that Entity Analytics care about.Video of a scroll through the entities processed by the generic entity store, source of the data is cloudbeat asset management integration.
no-sound.mov
How to test:
/app/management/kibana/settings), enablesecuritySolution:enableAssetInventory/security/entity_analytics_entity_store) enable entity storeIngest documents with
entity.idandentity.*fields. Personally I runcloudbeatasset discovery locallyVerify ingested documents in
.entities.v1.latest.security_generic_default--
OBS: Also test enabling the store without the uiSetting enabled, so you can make sure that it doesn't enable
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesIdentify risks
Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.
Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.
entity.idfield) we decided it's good enough to go.securitySolution:enableAssetInventorydisabled. Then enablesecuritySolution:enableAssetInventory==> No generic entity definition installed. You can manually install it in the EntityStore status pagesecuritySolution:enableAssetInventoryenabled. Then disablesecuritySolution:enableAssetInventorydefinition ==> hanging assets of generic entity store that can be deleted manually