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] Enable entity previews in document details flyout #186850

Merged
merged 3 commits into from
Jun 27, 2024

Conversation

christineweng
Copy link
Contributor

@christineweng christineweng commented Jun 24, 2024

Summary

This PR enables entity flyout in the alert flyout where host/user name is displayed. The entity flyout is rendered as a preview on top of the summary (right) panel. At the bottom of preview, there is a footer that let users open entity flyout as usual, which allows for expand/collapse functionality.

How to test:

  • Enable feature flag entityAlertPreviewEnabled
  • Generate some alerts and open alert flyout
  • The following places should open host/user flyout as a preview
    • Summary panel (right)-> Investigation -> host and user names
    • Summary panel (right) -> Insights -> host and user names in entities
    • Details panel (left) -> Insights -> Entities -> the host and user names in the header, plus the related users and hosts in the table below
    • Details panel (left) -> Insights -> Prevalence -> host and user name
Screen.Recording.2024-06-24.at.8.22.19.PM.mov

Checklist

@christineweng christineweng added backport:skip This commit does not require backporting Team:Threat Hunting Security Solution Threat Hunting Team Team:Threat Hunting:Investigations Security Solution Investigations Team 8.15 candidate v8.15.0 labels Jun 24, 2024
@christineweng christineweng self-assigned this Jun 24, 2024
@christineweng
Copy link
Contributor Author

/ci

@christineweng christineweng marked this pull request as ready for review June 25, 2024 01:24
@christineweng christineweng requested review from a team as code owners June 25, 2024 01:24
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations)

@christineweng christineweng added the release_note:skip Skip the PR/issue when compiling release notes label Jun 25, 2024
@PhilippeOberti
Copy link
Contributor

The flow looks great! Let's verify with @paulewing later today to make sure that's exactly what he wants. I see little value in keeping the Entities tab under Insights in our expanded section of the alert flyout now... But maybe that's something that can be removed in a separate PR!

Copy link
Member

@machadoum machadoum left a comment

Choose a reason for hiding this comment

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

Hey Christine, this feature is awesome! Thank you! 👏 👏 👏

I have some minor concerns. Here are they:

  • The icon |< suggests that something will open when clicked. Could you verify with a designer if we can remove this icon inside the preview panel?



  • The inspect icon is disabled inside the preview panel



  • On my local env the header is missing some fields which show up on your video. Did I do something wrong?



  • 'Fist seen' and 'last seen' are empty inside the preview panel.
Screen.Recording.2024-06-25.at.10.49.32.-.2.mov

@christineweng
Copy link
Contributor Author

christineweng commented Jun 25, 2024

Hey @machadoum many thanks for the prompt review!

Hey Christine, this feature is awesome! Thank you! 👏 👏 👏

I have some minor concerns. Here are they:

  • The icon |< suggests that something will open when clicked. Could you verify with a designer if we can remove this icon inside the preview panel?

Good point. This is one of the things I want to bring up with design and PM, but unfortunately they are both out until Thursday, so depending on their input, I will update the icons.

Update: talked to Paul and I'm removing the icon

image

  • The inspect icon is disabled inside the preview panel

Fixed

  • On my local env the header is missing some fields which show up on your video. Did I do something wrong?
  • 'Fist seen' and 'last seen' are empty inside the preview panel.

both are showing up on my local... first/last seen come from the observed host/user data. so I suspect the scopeId can limit the indices (i.e. on alerts page, you can only see host information from alert index, but the host can be in logs*)

const observedUser = useObservedUser(userName, scopeId);

const lastSeenDate = useMemo(
() =>
max(
[observedUser.lastSeen.date, entraTimestamp, oktaTimestamp].map((el) => el && new Date(el))

I expanded the scope to pickup both alert and logs, which should help... if you encounter this again, could you share the data with me?

Copy link
Contributor

@PhilippeOberti PhilippeOberti left a comment

Choose a reason for hiding this comment

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

awesome work! I left a small comment.

Also during testing opening a preview panel (like host and user) when another preview is already open doesn't work. The new panel doesn't replace the currently opened one. I'm guessing this is expected and should be fixed with this other PR?

@christineweng
Copy link
Contributor Author

/ci

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 5532 5534 +2

Async chunks

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

id before after diff
securitySolution 14.1MB 14.1MB +29.5KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
securitySolution 83.4KB 83.4KB +29.0B

History

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

cc @christineweng

Copy link
Member

@machadoum machadoum left a comment

Choose a reason for hiding this comment

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

LGTM!

Thank you! 🔥 🔥 🔥 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.15 candidate backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting:Investigations Security Solution Investigations Team Team:Threat Hunting Security Solution Threat Hunting Team v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants