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

[SecuritySolutions] Create Asset Criticality CSV upload page #179891

Merged
merged 23 commits into from
Apr 12, 2024

Conversation

machadoum
Copy link
Member

@machadoum machadoum commented Apr 3, 2024

Summary

Create a new Asset Criticality page for updating asset criticality by file upload.
Flaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5665
Server side PR: #179930

asset.criticality.upload.recording.mov

The new page has three steps. You can access the page by going to Security -> Manage -> Asset Criticality.

File picker Step:

File validation step

Result step

Checklist

Delete any items that are not applicable to this PR.

How to test it?

  • Open the page
  • Upload a valid CSV file
  • Check if everything is ok on the validation step
  • Click Assign
  • Check if the success message is displayed
  • Open the alert flyout for an updated asset and check if it has the new value

What is not included?

  • Serverless
  • Disable the feature when asset criticality advanced setting is disabled

Code owners files:

elastic/docs
  • packages/kbn-doc-links/src/get_doc_links.ts
  • packages/kbn-doc-links/src/types.ts
elastic/security-defend-workflows
  • x-pack/plugins/security_solution/public/management/links.ts
elastic/security-detection-engine
  • x-pack/test/security_solution_cypress/cypress/urls/navigation.ts
elastic/security-detections-response
  • x-pack/test/security_solution_cypress/cypress/fixtures/asset_criticality.csv
elastic/security-engineering-productivity
  • x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/asset_criticality_upload_page.cy.ts
  • x-pack/test/security_solution_cypress/cypress/fixtures/asset_criticality.csv
  • x-pack/test/security_solution_cypress/cypress/screens/asset_criticality.ts
  • x-pack/test/security_solution_cypress/cypress/tasks/asset_criticality.ts
  • x-pack/test/security_solution_cypress/cypress/urls/navigation.ts
elastic/security-threat-hunting
  • x-pack/test/security_solution_cypress/cypress/fixtures/asset_criticality.csv
elastic/security-threat-hunting-investigations
  • x-pack/plugins/security_solution/public/resolver/view/panels/node_list.tsx
  • x-pack/test/security_solution_cypress/cypress/urls/navigation.ts

@machadoum machadoum self-assigned this Apr 8, 2024
@machadoum machadoum added the ci:cloud-deploy Create or update a Cloud deployment label Apr 8, 2024
@machadoum
Copy link
Member Author

/ci

@machadoum
Copy link
Member Author

/ci

@machadoum machadoum added the ci:cloud-persist-deployment Persist cloud deployment indefinitely label Apr 9, 2024
@machadoum machadoum changed the title Siem ea 9047 [SecuritySolutions] Create Asset Criticality CSV upload page Apr 11, 2024
@machadoum
Copy link
Member Author

/ci

@machadoum machadoum marked this pull request as ready for review April 11, 2024 13:37
@machadoum machadoum requested review from a team as code owners April 11, 2024 13:37
@machadoum machadoum added the Team:Entity Analytics Security Entity Analytics Team label Apr 11, 2024
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-entity-analytics (Team:Entity Analytics)

@pzl pzl requested review from paul-tavares and removed request for pzl April 11, 2024 13:38
Copy link
Contributor

@tomsonpl tomsonpl left a comment

Choose a reason for hiding this comment

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

Defend workflows review, lgtm 👍 left one question

Copy link
Contributor

@paul-tavares paul-tavares left a comment

Choose a reason for hiding this comment

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

Changes to x-pack/plugins/security_solution/public/management/links.ts looks good 👍

Copy link
Contributor

@hop-dev hop-dev left a comment

Choose a reason for hiding this comment

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

Great work 🚀

Copy link
Contributor

@tiansivive tiansivive left a comment

Choose a reason for hiding this comment

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

LGTM

Just a few small comments/thoughts

Copy link
Contributor

@michaelolo24 michaelolo24 left a comment

Choose a reason for hiding this comment

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

Investigations changes! Mostly telemetry changes on our side. Nice work!

Copy link
Contributor

@e40pud e40pud left a comment

Choose a reason for hiding this comment

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

DE changes LGTM

@kibana-ci
Copy link
Collaborator

kibana-ci commented Apr 12, 2024

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 5374 5387 +13

Async chunks

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

id before after diff
lists 139.0KB 139.0KB +46.0B
securitySolution 17.2MB 17.2MB +42.3KB
total +42.3KB

Page load bundle

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

id before after diff
core 405.5KB 405.6KB +46.0B
securitySolution 75.4KB 77.3KB +1.9KB
securitySolutionEss 15.2KB 15.3KB +77.0B
securitySolutionServerless 18.8KB 18.9KB +77.0B
total +2.1KB

History

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

cc @machadoum

Copy link
Contributor

@benironside benironside left a comment

Choose a reason for hiding this comment

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

UI copy looks good

@machadoum machadoum merged commit 79096be into elastic:main Apr 12, 2024
39 checks passed
@kibanamachine kibanamachine added v8.14.0 backport:skip This commit does not require backporting labels Apr 12, 2024
machadoum added a commit that referenced this pull request Apr 16, 2024
…nd permissions (#180771)

## Summary

Related to #179891

* Display error message in case user doesn't have write access to asset
criticality index
![Screenshot 2024-04-15 at 14 34
17](https://github.com/elastic/kibana/assets/1490444/9d92fe32-26cd-4c22-be0f-951f2a719c2b)

* Display error message if the user navigates to the page when the user
advanced (UI) setting is disabled
![Screenshot 2024-04-15 at 14 32
35](https://github.com/elastic/kibana/assets/1490444/1ef5a079-de19-40c7-b378-30f707483e99)

* Remove links from menus and global search if advanced (UI) setting is
disabled
![Screenshot 2024-04-15 at 14 40
35](https://github.com/elastic/kibana/assets/1490444/0342aeba-8a45-457e-958d-0e65bcc7cd80)


Recoding of what happens when you don't refresh the page:



https://github.com/elastic/kibana/assets/1490444/2b67403c-d58e-4d92-b12d-9f9de4c9a213





### Expected behaviour:
* After the setting is enabled, the user needs to refresh the browser to
find the page
* If users disable the setting on a different browser/tab and navigate
to the page without refreshing, they will see an error message on the
page.
* If users disable the flag while the page is already rendered and try
to upload the file, it will display an error on the last step.


### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting ci:cloud-deploy Create or update a Cloud deployment ci:cloud-persist-deployment Persist cloud deployment indefinitely Feature:Entity Analytics Security Solution Entity Analytics features release_note:feature Makes this part of the condensed release notes Team:Entity Analytics Security Entity Analytics Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Theme: entity_analytics v8.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.