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][Host Isolation] Fixes bug to remove excess host metadata status toasts on non user initiated errors #105331

Merged
merged 3 commits into from
Jul 13, 2021

Conversation

parkiino
Copy link
Contributor

@parkiino parkiino commented Jul 12, 2021

Summary

  • This PR silently catches api calls to the endpoint host metadata api and isolation pending apis to prevent showing the user error toasts when the user has no control over the call
  • If the error code status from the host metadata api is 404, the agent status will show an "unenrolled" badge only on the alert details flyout + Take Action dropdown is disabled
  • Fixes a separate bug where an Unhealthy badge flashes right before the actual agent status badge finally loads. The default during the loading state is now replaced with a text -.

Screenshots

A dash shows right before the actual agent status is loaded
quikdash

Unenrolled badge for 404 error, Take Action button is disabled
image

@parkiino parkiino requested a review from a team as a code owner July 12, 2021 21:01
@parkiino parkiino added Feature:Endpoint Elastic Endpoint feature release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution v7.14.0 v7.15.0 v8.0.0 labels Jul 12, 2021
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

Pinging @elastic/esecurity-onboarding-and-lifecycle-mgt (Feature:Endpoint)

@@ -65,7 +64,8 @@ export const useHostIsolationStatus = ({
setPendingUnisolation(data[0].pending_actions?.unisolate ?? 0);
}
} catch (error) {
addError(error.message, { title: ISOLATION_PENDING_FAILURE });
// silently catch non-user initiated error
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we could be a bit more specific on the errors that remain silent in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i think if there are certain errors we want to catch / call out we can do so, i'm just not sure which ones we would want to call out i guess

@kibanamachine
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 6.3MB 6.3MB -244.0B

History

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

@parkiino parkiino merged commit 31b8974 into elastic:master Jul 13, 2021
@parkiino parkiino deleted the task/handle-toasts branch July 13, 2021 00:05
parkiino added a commit to parkiino/kibana that referenced this pull request Jul 13, 2021
…ess host metadata status toasts on non user initiated errors (elastic#105331)
parkiino added a commit that referenced this pull request Jul 13, 2021
…ess host metadata status toasts on non user initiated errors (#105331) (#105376)
parkiino added a commit that referenced this pull request Jul 13, 2021
…ess host metadata status toasts on non user initiated errors (#105331) (#105375)
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jul 13, 2021
…-png-pdf-report-type

* 'master' of github.com:elastic/kibana: (292 commits)
  bring back KQL autocomplete in timeline + fix last updated (elastic#105380)
  [Maps] Change TOC pop-up wording to reflect filter change, not search bar change (elastic#105163)
  Updating urls to upstream elastic repo (elastic#105250)
  [Maps] Move new vector layer wizard card down (elastic#104797)
  Exclude registering the cases feature if not enabled (elastic#105292)
  [Uptime] Alerts - Monitor status alert - check monitor status by monitor.timespan (elastic#104541)
  updated UI copy (elastic#105184)
  Log a warning when documents of unknown types are detected during migration (elastic#105213)
  [Logs UI] Register log threshold rule as lifecycle rule (elastic#104341)
  [Ingest pipelines] add network direction processor (elastic#103436)
  [Console] Autocomplete definitions (manual backport) (elastic#105086)
  [Security Solution] User can make Exceptions for Memory protection alerts (elastic#102196)
  [Lens] Formula: add validation for multiple field/metrics (elastic#104092)
  Removing async from file upload and data visualizer plugins start lifecycle (elastic#105197)
  Fix error when validating the form with non blocking validations (elastic#103629)
  [ML] Fix "View by" swim lane with applied filter and sorting by score  (elastic#105217)
  Update dependency @elastic/charts to v32 (elastic#104625)
  [CTI] shortens large numbers on Dashboard Link Panel (elastic#105269)
  [Security Solution][Endpoint][Host Isolation] Fixes bug to remove excess host metadata status toasts on non user initiated errors (elastic#105331)
  [Cases] Fix pushing alerts count on every push to external service (elastic#105030)
  ...

# Conflicts:
#	x-pack/plugins/reporting/common/types.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Endpoint Elastic Endpoint feature release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution v7.14.0 v7.15.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants