-
Couldn't load subscription status.
- Fork 450
Add entity to the top level namespaces in which it's being used #2556
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
Conversation
Add entity to the top level namespace of which it's used in sub-types. For example, we want `user.target.entity` fields to be present. `user.entity` itself is a `user` type, so `entity` must be reused on the user type. This also removes custom generator code which was being used to workaround the fact that this wasn't true before.
|
Documentation changes preview: https://docs-v3-preview.elastic.dev/elastic/ecs/pull/2556/reference/ |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
🔍 Preview links for changed docs |
| ## Field reuse [_field_reuse] | ||
|
|
||
| The `entity` fields are expected to be nested at: | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cloud.entity is missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple questions
generated/csv/fields.csv
Outdated
| 9.3.0-dev,true,cloud,cloud.target.provider,keyword,extended,,aws,Name of the cloud provider. | ||
| 9.3.0-dev,true,cloud,cloud.target.region,keyword,extended,,us-east-1,"Region in which this host, resource, or service is located." | ||
| 9.3.0-dev,true,cloud,cloud.target.service.name,keyword,extended,,lambda,The cloud service name. | ||
| 9.3.0-dev,true,cloud,cloud.target.target.entity.attributes,object,extended,,,A set of static or semi-static attributes of the entity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we are getting target duplicated in the output
cloud.target.target.entity.attributes
| 9.3.0-dev,true,user,user.roles,keyword,extended,array,"[""kibana_admin"", ""reporting_user""]",Array of user roles at the time of the event. | ||
| 9.3.0-dev,true,user,user.target.domain,keyword,extended,,,Name of the directory the user is a member of. | ||
| 9.3.0-dev,true,user,user.target.email,keyword,extended,,,User email address. | ||
| 9.3.0-dev,true,user,user.target.entity.attributes,object,extended,,,A set of static or semi-static attributes of the entity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like all the user.* entity related fields are removed?
Re-organize the finalizer to consider order first, and process self-nested and foreign reuse by order level, rather than doing all foreign reuse first, and then self-nested reuse second. This also collects self-nested fields by order level, to enable the above.
|
This is a summary of the changes I made in this PR now:
@nick-alayil, can you confirm if these changes are correct and what you want for entity? entity is added to some other objects as a consequence of being added to the top-level field (i.e. |
Thanks @mjwolf for making these changes! From this ticket’s context, everything looks good. I was mainly aiming to get There are a few other fields missing from a Graph Viz perspective, but I think those should be handled separately from this PR:
Not required ( |
| 9.3.0-dev,true,user,user.changes.risk.calculated_level,keyword,extended,,High,A risk classification level calculated by an internal system as part of entity analytics and entity risk scoring. | ||
| 9.3.0-dev,true,user,user.changes.risk.calculated_score,float,extended,,880.73,A risk classification score calculated by an internal system as part of entity analytics and entity risk scoring. | ||
| 9.3.0-dev,true,user,user.changes.risk.calculated_score_norm,float,extended,,88.73,A normalized risk score calculated by an internal system. | ||
| 9.3.0-dev,true,user,user.changes.risk.static_level,keyword,extended,,High,"A risk classification level obtained from outside the system, such as from some external Threat Intelligence Platform." | ||
| 9.3.0-dev,true,user,user.changes.risk.static_score,float,extended,,830.0,"A risk classification score obtained from outside the system, such as from some external Threat Intelligence Platform." | ||
| 9.3.0-dev,true,user,user.changes.risk.static_score_norm,float,extended,,83.0,A normalized risk score calculated by an external system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did we mean for user.changes.risk.* to be added?
| 9.3.0-dev,true,user,user.effective.risk.calculated_level,keyword,extended,,High,A risk classification level calculated by an internal system as part of entity analytics and entity risk scoring. | ||
| 9.3.0-dev,true,user,user.effective.risk.calculated_score,float,extended,,880.73,A risk classification score calculated by an internal system as part of entity analytics and entity risk scoring. | ||
| 9.3.0-dev,true,user,user.effective.risk.calculated_score_norm,float,extended,,88.73,A normalized risk score calculated by an internal system. | ||
| 9.3.0-dev,true,user,user.effective.risk.static_level,keyword,extended,,High,"A risk classification level obtained from outside the system, such as from some external Threat Intelligence Platform." | ||
| 9.3.0-dev,true,user,user.effective.risk.static_score,float,extended,,830.0,"A risk classification score obtained from outside the system, such as from some external Threat Intelligence Platform." | ||
| 9.3.0-dev,true,user,user.effective.risk.static_score_norm,float,extended,,83.0,A normalized risk score calculated by an external system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same with user.effective.risk.*?
| 9.3.0-dev+exp,true,user,user.target.id,keyword,core,,S-1-5-21-202424912787-2692429404-2351956786-1000,Unique identifier of the user. | ||
| 9.3.0-dev+exp,true,user,user.target.name,keyword,core,,a.einstein,Short name or login of the user. | ||
| 9.3.0-dev+exp,true,user,user.target.name.text,match_only_text,core,,a.einstein,Short name or login of the user. | ||
| 9.3.0-dev+exp,true,user,user.target.risk.calculated_level,keyword,extended,,High,A risk classification level calculated by an internal system as part of entity analytics and entity risk scoring. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These new risk fields should have existed previously. risk is a field in user type, and since user.target is a user type, user.target.risk should have exist. This is fixed by the change to finalizer ordering that fixed entity fields in the same situation.
…tic#2556) Add entity to the top level namespace of which it's used in sub-types. For example, we want user.target.entity fields to be present. user.entity itself is a user type, so entity must be reused on the user type. This also removes custom generator code which was being used to workaround the fact that this wasn't true before.
… (#2557) Add entity to the top level namespace of which it's used in sub-types. For example, we want user.target.entity fields to be present. user.entity itself is a user type, so entity must be reused on the user type. This also removes custom generator code which was being used to workaround the fact that this wasn't true before.
1. What does this PR do?
Add entity to the top level namespace of which it's used in sub-types.
For example, we want
user.target.entityfields to be present.user.entityitself is ausertype, soentitymust be reused on the user type.This also removes custom generator code which was being used to workaround the fact that this wasn't true before.
2. Which ECS fields are affected/introduced?
3. Why is this change necessary?
Fixes #2555
4. Have you added/updated documentation?
YES
5. Have you built ECS and committed any newly generated files?
YES
6. Have you run the ECS validation tests locally?
YES
7. Anything else for the reviewers?
Commit Message
Add entity to the top level namespace of which it's used in sub-types.
For example, we want
user.target.entityfields to be present.user.entityitself is ausertype, soentitymust be reused on the user type.This also removes custom generator code which was being used to workaround the fact that this wasn't true before.