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

[D4C] additional error handling for 'block' action added + policy editor UI fixes #156629

Merged

Conversation

mitodrummer
Copy link
Contributor

@mitodrummer mitodrummer commented May 3, 2023

Summary

This PR addresses adding safeguards to the 'block' action around FIM capabilities in D4C (cloud_defend)
see: https://github.com/elastic/cloud-defend/issues/337

It also fixes a few bugs:

  1. updates not being reflected in the yaml editor side when changed on the UI side (after yaml editor viewed for first time).
  2. the yaml -> json conversion function was mutating the original selector/response when deleting the type property. which would cause the item to dissapear under certain situations.

Screenshots

image
image

Checklist

Delete any items that are not applicable to this PR.

…ness in the yaml -> json conversion, and general -> yaml view switching
@mitodrummer mitodrummer added bug Fixes for quality problems that affect the customer experience backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Team: Cloud Native Integrations v8.8.0 labels May 3, 2023
@mitodrummer mitodrummer requested a review from a team May 3, 2023 22:43
@mitodrummer mitodrummer added the release_note:skip Skip the PR/issue when compiling release notes label May 4, 2023
@@ -99,28 +99,6 @@ describe('<ControlGeneralView />', () => {
}
});

it('should prevent user from adding a process response if no there are no process selectors', async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed as this was done to avoid a deeper issue which is now fixed.

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #11 / apis saved_objects find wildcard namespace should return 200 with individual responses from the all namespaces

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
cloudDefend 256.9KB 258.6KB +1.8KB
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 398 401 +3
total +5

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 478 481 +3
total +5

History

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

@learhy
Copy link

learhy commented May 4, 2023

LGTM! Thanks @mitodrummer !

@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.8

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 4, 2023
…tor UI fixes (elastic#156629)

## Summary

This PR addresses adding safeguards to the 'block' action around FIM
capabilities in D4C (cloud_defend)
see: https://github.com/elastic/cloud-defend/issues/337

It also fixes a few bugs:
1. updates not being reflected in the yaml editor side when changed on
the UI side (after yaml editor viewed for first time).
2. the yaml -> json conversion function was mutating the original
selector/response when deleting the type property. which would cause the
item to dissapear under certain situations.

### Screenshots

![image](https://user-images.githubusercontent.com/16198204/236331957-65fa0a5b-cab7-427c-998d-a3eea77a2820.png)

![image](https://user-images.githubusercontent.com/16198204/236334888-c72f1725-e428-45d8-b514-2ed0a072a687.png)

### 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

(cherry picked from commit 587cca4)
kibanamachine added a commit that referenced this pull request May 5, 2023
…cy editor UI fixes (#156629) (#156763)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[D4C] additional error handling for 'block' action added + policy
editor UI fixes
(#156629)](#156629)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Karl
Godard","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-05-04T23:03:26Z","message":"[D4C]
additional error handling for 'block' action added + policy editor UI
fixes (#156629)\n\n## Summary\r\n\r\nThis PR addresses adding safeguards
to the 'block' action around FIM\r\ncapabilities in D4C
(cloud_defend)\r\nsee:
https://github.com/elastic/cloud-defend/issues/337\r\n\r\nIt also fixes
a few bugs:\r\n1. updates not being reflected in the yaml editor side
when changed on\r\nthe UI side (after yaml editor viewed for first
time).\r\n2. the yaml -> json conversion function was mutating the
original\r\nselector/response when deleting the type property. which
would cause the\r\nitem to dissapear under certain
situations.\r\n\r\n###
Screenshots\r\n\r\n![image](https://user-images.githubusercontent.com/16198204/236331957-65fa0a5b-cab7-427c-998d-a3eea77a2820.png)\r\n\r\n![image](https://user-images.githubusercontent.com/16198204/236334888-c72f1725-e428-45d8-b514-2ed0a072a687.png)\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"587cca49eed701951428684ce2c80e0554d2207d","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","backport:prev-minor","Team:
Cloud Native
Integrations","v8.8.0","v8.9.0"],"number":156629,"url":"https://github.com/elastic/kibana/pull/156629","mergeCommit":{"message":"[D4C]
additional error handling for 'block' action added + policy editor UI
fixes (#156629)\n\n## Summary\r\n\r\nThis PR addresses adding safeguards
to the 'block' action around FIM\r\ncapabilities in D4C
(cloud_defend)\r\nsee:
https://github.com/elastic/cloud-defend/issues/337\r\n\r\nIt also fixes
a few bugs:\r\n1. updates not being reflected in the yaml editor side
when changed on\r\nthe UI side (after yaml editor viewed for first
time).\r\n2. the yaml -> json conversion function was mutating the
original\r\nselector/response when deleting the type property. which
would cause the\r\nitem to dissapear under certain
situations.\r\n\r\n###
Screenshots\r\n\r\n![image](https://user-images.githubusercontent.com/16198204/236331957-65fa0a5b-cab7-427c-998d-a3eea77a2820.png)\r\n\r\n![image](https://user-images.githubusercontent.com/16198204/236334888-c72f1725-e428-45d8-b514-2ed0a072a687.png)\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"587cca49eed701951428684ce2c80e0554d2207d"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/156629","number":156629,"mergeCommit":{"message":"[D4C]
additional error handling for 'block' action added + policy editor UI
fixes (#156629)\n\n## Summary\r\n\r\nThis PR addresses adding safeguards
to the 'block' action around FIM\r\ncapabilities in D4C
(cloud_defend)\r\nsee:
https://github.com/elastic/cloud-defend/issues/337\r\n\r\nIt also fixes
a few bugs:\r\n1. updates not being reflected in the yaml editor side
when changed on\r\nthe UI side (after yaml editor viewed for first
time).\r\n2. the yaml -> json conversion function was mutating the
original\r\nselector/response when deleting the type property. which
would cause the\r\nitem to dissapear under certain
situations.\r\n\r\n###
Screenshots\r\n\r\n![image](https://user-images.githubusercontent.com/16198204/236331957-65fa0a5b-cab7-427c-998d-a3eea77a2820.png)\r\n\r\n![image](https://user-images.githubusercontent.com/16198204/236334888-c72f1725-e428-45d8-b514-2ed0a072a687.png)\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"587cca49eed701951428684ce2c80e0554d2207d"}}]}]
BACKPORT-->

Co-authored-by: Karl Godard <[email protected]>
jloleysens added a commit that referenced this pull request May 5, 2023
* main: (153 commits)
  [Security Solution] {{state.signals_count}} Object not working (#156472) (#156707)
  [Synthetics] refresh data on visualization scrubbing (#156777)
  [RAM] Docs for slack improvements (#153885)
  [RAM] Alert search bar only KQL (#155947)
  [ML] Functional tests - stabilize export job tests (#156586)
  [Saved Search] Update saved search schema to allow empty `sort` arrays (#156769)
  [ML] Rename `curated` model type to `elastic` (#156684)
  [Discover] Enable sharing for text based languages (#156652)
  [api-docs] 2023-05-05 Daily api_docs build (#156781)
  Upgrade EUI to v77.2.2 (#155208)
  [RAM][Maintenance Window][8.8]Fix window maintenance workflow (#156427)
  [DOCS] Case file attachments (#156459)
  [D4C] additional error handling for 'block' action added + policy editor UI fixes (#156629)
  [Enterprise Search] refactor(SearchApplications): rename telemetry ids (#156733)
  [Enterprise Search] Add telemetry to ELSER deployment buttons + error (#156545)
  [Security Solution] fixes Data Quality dashboard errors when a `basePath` is configured (#156233)
  [Logs onboarding] StepsFooter outside of main panel (#156686)
  [Security Solution] Add a migration to unmute custom Security Solution rules (#156593)
  [Enterprise Search][Behavioral Analytics] Update formulas (#156704)
  Add API Events to Endpoint Security Advanced Policy (#156718)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes v8.8.0 v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants