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

[SIEM][CASE] Persist callout when dismissed #68372

Merged
merged 12 commits into from
Jun 26, 2020

Conversation

cnasikas
Copy link
Member

@cnasikas cnasikas commented Jun 5, 2020

Summary

This PR persists the dismissal of the callout to local storage and changes the context and the type of some messages.

It Introduces a new hook useMessagesStorage. The hook returns the following functions:

getMessages: (plugin: string) => string[];
addMessage: (plugin: string, id: string) => void;
removeMessage: (plugin: string, id: string) => void;
clearAllMessages: (plugin: string) => void;

Messages are divided into sub plugin domains. Each sub plugin has its own messages.

For cases, all error messages are being grouped into a callout by the type of message: primary, info, warning, and danger. The id of the callout is created with the use of md5. Even though, md5 is an insecure function its sufficient for our needs as is used as a mechanism to create callout fingerprints for internal use only and there are no security considerations. ONLY callouts of type primary are being persisted to local storage.

Other plugins, like Alerts, could use the new hook to add or get messages from the local storage depending on their needs.

Ref: https://github.com/elastic/siem-team/issues/666 and #67884

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@cnasikas cnasikas self-assigned this Jun 5, 2020
@cnasikas cnasikas added bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:SIEM v7.8.0 v7.9.0 v8.0.0 labels Jun 5, 2020
@cnasikas cnasikas changed the title [SIEM][CASE] Persist callout when dismissed [SIEM][CASE][skip-ci] Persist callout when dismissed Jun 5, 2020
@cnasikas cnasikas force-pushed the dismiss_callouts branch 4 times, most recently from 9b250a5 to 619dfff Compare June 8, 2020 16:47
@cnasikas cnasikas changed the title [SIEM][CASE][skip-ci] Persist callout when dismissed [SIEM][CASE] Persist callout when dismissed Jun 8, 2020
@cnasikas cnasikas requested review from XavierM and stephmilovic and removed request for XavierM June 8, 2020 16:53
@cnasikas cnasikas marked this pull request as ready for review June 8, 2020 16:54
@cnasikas cnasikas requested review from a team as code owners June 8, 2020 16:54
@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

@cnasikas cnasikas force-pushed the dismiss_callouts branch 2 times, most recently from e2ff95d to c5ae8ba Compare June 8, 2020 17:07
@cnasikas
Copy link
Member Author

cnasikas commented Jun 8, 2020

@elasticmachine merge upstream

XavierM
XavierM previously requested changes Jun 8, 2020
Copy link
Contributor

@XavierM XavierM left a comment

Choose a reason for hiding this comment

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

I think it is ok to have this kind of logic for primary/info callout. I feel strongly that we should not have it for error/warning messages. Since the user can hide them for a long time and it will not be aware of what's going on with the application.

@cnasikas
Copy link
Member Author

cnasikas commented Jun 9, 2020

I think it is ok to have this kind of logic for primary/info callout. I feel strongly that we should not have it for error/warning messages. Since the user can hide them for a long time and it will not be aware of what's going on with the application.

You are right!

@spalger spalger removed the v7.8.0 label Jun 18, 2020
Copy link
Contributor

@stephmilovic stephmilovic left a comment

Choose a reason for hiding this comment

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

Thank you for making the requested changes. Tested locally in chrome and safari, LGTM! Thanks @cnasikas

@XavierM XavierM dismissed their stale review June 26, 2020 16:12

Yes we are only info callout

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

@kbn/optimizer bundle module count

id value diff baseline
securitySolution 780 +4 776

page load asset size

beta
id value diff baseline
/bundles/app/core/bootstrap.js - -13.8KB 13.8KB
/bundles/core/core.entry.js - -1.1MB 1.1MB
/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.@elastic.js - -4.0MB 4.0MB
/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.css - -183.7KB 183.7KB
/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js - -4.6MB 4.6MB
/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.v7.light.css - -511.3KB 511.3KB
/bundles/light_theme.style.css - -95.9KB 95.9KB
/bundles/plugin/advancedSettings/advancedSettings.plugin.js - -941.3KB 941.3KB
/bundles/plugin/alerts/alerts.plugin.js - -89.5KB 89.5KB
/bundles/plugin/apm/apm.plugin.js - -219.2KB 219.2KB
/bundles/plugin/apmOss/apmOss.plugin.js - -4.2KB 4.2KB
/bundles/plugin/beats_management/beats_management.plugin.js - -522.9KB 522.9KB
/bundles/plugin/bfetch/bfetch.plugin.js - -28.7KB 28.7KB
/bundles/plugin/canvas/canvas.plugin.js - -2.0MB 2.0MB
/bundles/plugin/charts/charts.plugin.js - -833.9KB 833.9KB
/bundles/plugin/cloud/cloud.plugin.js - -6.3KB 6.3KB
/bundles/plugin/console/console.plugin.js - -28.0KB 28.0KB
/bundles/plugin/crossClusterReplication/crossClusterReplication.plugin.js - -152.3KB 152.3KB
/bundles/plugin/dashboard/dashboard.plugin.js - -634.0KB 634.0KB
/bundles/plugin/dashboardEnhanced/dashboardEnhanced.plugin.js - -143.5KB 143.5KB
/bundles/plugin/dashboardMode/dashboardMode.plugin.js - -109.3KB 109.3KB
/bundles/plugin/data/data.plugin.js - -1.3MB 1.3MB
/bundles/plugin/dataEnhanced/dataEnhanced.plugin.js - -138.1KB 138.1KB
/bundles/plugin/devTools/devTools.plugin.js - -123.9KB 123.9KB
/bundles/plugin/discover/discover.plugin.js - -221.1KB 221.1KB
/bundles/plugin/discoverEnhanced/discoverEnhanced.plugin.js - -13.8KB 13.8KB
/bundles/plugin/embeddable/embeddable.plugin.js - -387.2KB 387.2KB
/bundles/plugin/embeddableEnhanced/embeddableEnhanced.plugin.js - -26.3KB 26.3KB
/bundles/plugin/esUiShared/esUiShared.plugin.js - -927.8KB 927.8KB
/bundles/plugin/expressions/expressions.plugin.js - -314.9KB 314.9KB
/bundles/plugin/features/features.plugin.js - -13.4KB 13.4KB
/bundles/plugin/fileUpload/fileUpload.plugin.js - -688.0KB 688.0KB
/bundles/plugin/globalSearch/globalSearch.plugin.js - -29.0KB 29.0KB
/bundles/plugin/graph/graph.plugin.js - -15.3KB 15.3KB
/bundles/plugin/grokdebugger/grokdebugger.plugin.js - -11.2KB 11.2KB
/bundles/plugin/home/home.plugin.js - -24.6KB 24.6KB
/bundles/plugin/indexLifecycleManagement/indexLifecycleManagement.plugin.js - -184.2KB 184.2KB
/bundles/plugin/indexManagement/indexManagement.plugin.js - -201.7KB 201.7KB
/bundles/plugin/indexPatternManagement/indexPatternManagement.plugin.js - -137.3KB 137.3KB
/bundles/plugin/infra/infra.plugin.js - -92.9KB 92.9KB
/bundles/plugin/ingestPipelines/ingestPipelines.plugin.js - -30.3KB 30.3KB
/bundles/plugin/inputControlVis/inputControlVis.plugin.js - -258.9KB 258.9KB
/bundles/plugin/inspector/inspector.plugin.js - -238.3KB 238.3KB
/bundles/plugin/kibanaLegacy/kibanaLegacy.plugin.js - -174.7KB 174.7KB
/bundles/plugin/kibanaReact/kibanaReact.plugin.js - -575.3KB 575.3KB
/bundles/plugin/kibanaUtils/kibanaUtils.plugin.js - -432.8KB 432.8KB
/bundles/plugin/lens/lens.plugin.js - -748.7KB 748.7KB
/bundles/plugin/licenseManagement/licenseManagement.plugin.js - -26.2KB 26.2KB
/bundles/plugin/licensing/licensing.plugin.js - -21.6KB 21.6KB
/bundles/plugin/logstash/logstash.plugin.js - -141.8KB 141.8KB
/bundles/plugin/management/management.plugin.js - -25.9KB 25.9KB
/bundles/plugin/maps/maps.plugin.js - -220.6KB 220.6KB
/bundles/plugin/mapsLegacy/mapsLegacy.plugin.js - -1.0MB 1.0MB
/bundles/plugin/mapsLegacyLicensing/mapsLegacyLicensing.plugin.js - -3.9KB 3.9KB
/bundles/plugin/ml/ml.plugin.js - -1.3MB 1.3MB
/bundles/plugin/monitoring/monitoring.plugin.js - -22.8KB 22.8KB
/bundles/plugin/navigation/navigation.plugin.js - -122.2KB 122.2KB
/bundles/plugin/newsfeed/newsfeed.plugin.js - -22.7KB 22.7KB
/bundles/plugin/observability/observability.plugin.js - -103.1KB 103.1KB
/bundles/plugin/painlessLab/painlessLab.plugin.js - -158.8KB 158.8KB
/bundles/plugin/regionMap/regionMap.plugin.js - -791.7KB 791.7KB
/bundles/plugin/remoteClusters/remoteClusters.plugin.js - -35.2KB 35.2KB
/bundles/plugin/reporting/reporting.plugin.js - -257.7KB 257.7KB
/bundles/plugin/rollup/rollup.plugin.js - -186.0KB 186.0KB
/bundles/plugin/savedObjects/savedObjects.plugin.js - -196.2KB 196.2KB
/bundles/plugin/savedObjectsManagement/savedObjectsManagement.plugin.js - -176.6KB 176.6KB
/bundles/plugin/searchprofiler/searchprofiler.plugin.js - -42.8KB 42.8KB
/bundles/plugin/security/security.plugin.js - -248.0KB 248.0KB
/bundles/plugin/share/share.plugin.js - -80.5KB 80.5KB
/bundles/plugin/snapshotRestore/snapshotRestore.plugin.js - -57.5KB 57.5KB
/bundles/plugin/spaces/spaces.plugin.js - -367.3KB 367.3KB
/bundles/plugin/statusPage/statusPage.plugin.js - -3.6KB 3.6KB
/bundles/plugin/telemetry/telemetry.plugin.js - -77.2KB 77.2KB
/bundles/plugin/telemetryManagementSection/telemetryManagementSection.plugin.js - -27.5KB 27.5KB
/bundles/plugin/tileMap/tileMap.plugin.js - -807.1KB 807.1KB
/bundles/plugin/transform/transform.plugin.js - -21.6KB 21.6KB
/bundles/plugin/triggers_actions_ui/triggers_actions_ui.plugin.js - -103.0KB 103.0KB
/bundles/plugin/uiActions/uiActions.plugin.js - -162.5KB 162.5KB
/bundles/plugin/uiActionsEnhanced/uiActionsEnhanced.plugin.js - -124.1KB 124.1KB
/bundles/plugin/upgradeAssistant/upgradeAssistant.plugin.js - -46.6KB 46.6KB
/bundles/plugin/uptime/uptime.plugin.js - -327.3KB 327.3KB
/bundles/plugin/usageCollection/usageCollection.plugin.js - -24.4KB 24.4KB
/bundles/plugin/visTypeMarkdown/visTypeMarkdown.plugin.js - -512.5KB 512.5KB
/bundles/plugin/visTypeMetric/visTypeMetric.plugin.js - -536.7KB 536.7KB
/bundles/plugin/visTypeTable/visTypeTable.plugin.js - -563.0KB 563.0KB
/bundles/plugin/visTypeTagcloud/visTypeTagcloud.plugin.js - -797.1KB 797.1KB
/bundles/plugin/visTypeTimelion/visTypeTimelion.plugin.js - -670.7KB 670.7KB
/bundles/plugin/visTypeTimeseries/visTypeTimeseries.plugin.js - -212.2KB 212.2KB
/bundles/plugin/visTypeVega/visTypeVega.plugin.js - -580.3KB 580.3KB
/bundles/plugin/visTypeVislib/visTypeVislib.plugin.js - -1.2MB 1.2MB
/bundles/plugin/visualizations/visualizations.plugin.js - -343.4KB 343.4KB
/bundles/plugin/visualize/visualize.plugin.js - -18.2KB 18.2KB
/bundles/plugin/watcher/watcher.plugin.js - -35.2KB 35.2KB
/node_modules/@kbn/ui-framework/dist/kui_light.css - -62.1KB 62.1KB
/translations/en.json - -29.0B 29.0B
/ui/fonts/inter_ui/Inter-UI-Medium.woff2 - -92.2KB 92.2KB
/ui/fonts/inter_ui/Inter-UI-Regular.woff2 - -86.4KB 86.4KB
total - -36.2MB -

History

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

@cnasikas cnasikas merged commit 6808903 into elastic:master Jun 26, 2020
@cnasikas cnasikas deleted the dismiss_callouts branch June 26, 2020 18:31
rylnd added a commit to rylnd/kibana that referenced this pull request Jun 26, 2020
* master:
  skip failing suite (elastic#70104) (elastic#70103)
  [ENDPOINT] Hide the Timeline Flyout while on the Management Pages (elastic#69998)
  [SIEM][CASE] Persist callout when dismissed (elastic#68372)
  [SIEM][Exceptions] - Cleaned up and updated exception list item comment structure (elastic#69532)
  [Maps] remove indexing state from redux (elastic#69765)
  Add API integration test for deleting data streams. (elastic#70020)
  renames SIEM to Security Solution (elastic#70070)
cnasikas added a commit to cnasikas/kibana that referenced this pull request Jun 27, 2020
# Conflicts:
#	x-pack/plugins/security_solution/package.json
#	x-pack/plugins/security_solution/public/alerts/components/no_write_alerts_callout/translations.ts
#	x-pack/plugins/security_solution/public/cases/components/callout/index.test.tsx
#	x-pack/plugins/security_solution/public/cases/components/callout/translations.ts
#	x-pack/plugins/security_solution/public/cases/components/use_push_to_service/helpers.tsx
#	x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.test.tsx
#	x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.tsx
#	x-pack/plugins/security_solution/public/cases/pages/case.tsx
#	x-pack/plugins/security_solution/public/cases/pages/case_details.tsx
#	x-pack/plugins/security_solution/public/common/mock/kibana_react.ts
#	x-pack/plugins/security_solution/public/timelines/components/timeline/header/translations.ts
#	x-pack/plugins/siem/public/containers/local_storage/use_messages_storage.test.tsx
#	x-pack/plugins/siem/public/containers/local_storage/use_messages_storage.tsx
#	x-pack/plugins/siem/public/pages/case/components/callout/callout.test.tsx
#	x-pack/plugins/siem/public/pages/case/components/callout/callout.tsx
#	x-pack/plugins/siem/public/pages/case/components/callout/helpers.test.tsx
#	x-pack/plugins/siem/public/pages/case/components/callout/types.ts
cnasikas added a commit to cnasikas/kibana that referenced this pull request Jun 27, 2020
# Conflicts:
#	x-pack/plugins/security_solution/package.json
#	x-pack/plugins/security_solution/public/alerts/components/no_write_alerts_callout/translations.ts
#	x-pack/plugins/security_solution/public/cases/components/callout/index.test.tsx
#	x-pack/plugins/security_solution/public/cases/components/callout/translations.ts
#	x-pack/plugins/security_solution/public/cases/components/use_push_to_service/helpers.tsx
#	x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.test.tsx
#	x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.tsx
#	x-pack/plugins/security_solution/public/cases/pages/case.tsx
#	x-pack/plugins/security_solution/public/cases/pages/case_details.tsx
#	x-pack/plugins/security_solution/public/common/mock/kibana_react.ts
#	x-pack/plugins/security_solution/public/timelines/components/timeline/header/translations.ts
#	x-pack/plugins/siem/public/containers/local_storage/use_messages_storage.test.tsx
#	x-pack/plugins/siem/public/containers/local_storage/use_messages_storage.tsx
#	x-pack/plugins/siem/public/pages/case/components/callout/callout.test.tsx
#	x-pack/plugins/siem/public/pages/case/components/callout/callout.tsx
#	x-pack/plugins/siem/public/pages/case/components/callout/helpers.test.tsx
#	x-pack/plugins/siem/public/pages/case/components/callout/types.ts
cnasikas added a commit that referenced this pull request Jun 27, 2020
# Conflicts:
#	x-pack/plugins/security_solution/package.json
#	x-pack/plugins/security_solution/public/alerts/components/no_write_alerts_callout/translations.ts
#	x-pack/plugins/security_solution/public/cases/components/callout/index.test.tsx
#	x-pack/plugins/security_solution/public/cases/components/callout/translations.ts
#	x-pack/plugins/security_solution/public/cases/components/use_push_to_service/helpers.tsx
#	x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.test.tsx
#	x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.tsx
#	x-pack/plugins/security_solution/public/cases/pages/case.tsx
#	x-pack/plugins/security_solution/public/cases/pages/case_details.tsx
#	x-pack/plugins/security_solution/public/common/mock/kibana_react.ts
#	x-pack/plugins/security_solution/public/timelines/components/timeline/header/translations.ts
#	x-pack/plugins/siem/public/containers/local_storage/use_messages_storage.test.tsx
#	x-pack/plugins/siem/public/containers/local_storage/use_messages_storage.tsx
#	x-pack/plugins/siem/public/pages/case/components/callout/callout.test.tsx
#	x-pack/plugins/siem/public/pages/case/components/callout/callout.tsx
#	x-pack/plugins/siem/public/pages/case/components/callout/helpers.test.tsx
#	x-pack/plugins/siem/public/pages/case/components/callout/types.ts
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jun 29, 2020
* master: (59 commits)
  [Lens] Fix broken test (elastic#70117)
  [SIEM] Import timeline fix (elastic#65448)
  [SECURITY SOLUTION][INGEST] UX update for ingest manager edit/create datasource for endpoint (elastic#70079)
  [Telemetry] Collector Schema (elastic#64942)
  [Endpoint] Add Endpoint empty states for onboarding (elastic#69626)
  Hide unused resolver buttons (elastic#70112)
  [Security] `Investigate in Resolver` Timeline Integration (elastic#70111)
  [Discover] Improve styling of graphs in sidebar (elastic#69440)
  [Metrics UI] Fix EuiTheme type issue (elastic#69735)
  skip failing suite (elastic#70104) (elastic#70103)
  [ENDPOINT] Hide the Timeline Flyout while on the Management Pages (elastic#69998)
  [SIEM][CASE] Persist callout when dismissed (elastic#68372)
  [SIEM][Exceptions] - Cleaned up and updated exception list item comment structure (elastic#69532)
  [Maps] remove indexing state from redux (elastic#69765)
  Add API integration test for deleting data streams. (elastic#70020)
  renames SIEM to Security Solution (elastic#70070)
  Adding saved_objects_page in OSS (elastic#69900)
  [Lens] Use accordion menus in field list for available and empty fields (elastic#68871)
  Dynamic uiActions & license support (elastic#68507)
  [SIEM] Update readme for timeline apis (elastic#67038)
  ...
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jun 29, 2020
…bana into alerting/consumer-based-rbac

* 'alerting/consumer-based-rbac' of github.com:gmmorris/kibana: (25 commits)
  [Lens] Fix broken test (elastic#70117)
  [SIEM] Import timeline fix (elastic#65448)
  [SECURITY SOLUTION][INGEST] UX update for ingest manager edit/create datasource for endpoint (elastic#70079)
  [Telemetry] Collector Schema (elastic#64942)
  [Endpoint] Add Endpoint empty states for onboarding (elastic#69626)
  Hide unused resolver buttons (elastic#70112)
  [Security] `Investigate in Resolver` Timeline Integration (elastic#70111)
  [Discover] Improve styling of graphs in sidebar (elastic#69440)
  [Metrics UI] Fix EuiTheme type issue (elastic#69735)
  skip failing suite (elastic#70104) (elastic#70103)
  [ENDPOINT] Hide the Timeline Flyout while on the Management Pages (elastic#69998)
  [SIEM][CASE] Persist callout when dismissed (elastic#68372)
  [SIEM][Exceptions] - Cleaned up and updated exception list item comment structure (elastic#69532)
  [Maps] remove indexing state from redux (elastic#69765)
  Add API integration test for deleting data streams. (elastic#70020)
  renames SIEM to Security Solution (elastic#70070)
  Adding saved_objects_page in OSS (elastic#69900)
  [Lens] Use accordion menus in field list for available and empty fields (elastic#68871)
  Dynamic uiActions & license support (elastic#68507)
  [SIEM] Update readme for timeline apis (elastic#67038)
  ...
@MindyRS MindyRS added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label Sep 23, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:SIEM v7.8.1 v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants