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 Solutions] Fix security page title #6

Open
wants to merge 27 commits into
base: 157847_security_unified_ia_assets
Choose a base branch
from

Conversation

machadoum
Copy link

@machadoum machadoum commented Aug 14, 2023

Summary

Refactor useUpdateBrowserTitle to use pathname instead of SpyRoute

Checklist

@machadoum machadoum force-pushed the 157847_fix_page_title branch 2 times, most recently from faf9639 to ab38394 Compare August 14, 2023 13:36
dplumlee and others added 27 commits August 14, 2023 13:41
…lastic#163823)

<img width="1493" alt="Screenshot 2023-08-14 at 3 11 13 PM"
src="https://github.com/elastic/kibana/assets/55978943/6bafa1e3-7075-4779-92ae-35ab30436255">

When Profiling is initiated but feature flag is not enabled:
<img width="381" alt="Screenshot 2023-08-14 at 3 17 14 PM"
src="https://github.com/elastic/kibana/assets/55978943/fb4821b9-2bcc-4a7d-bd77-b200e3d43892">

When Profiling is initiated and feature flag is enabled:
<img width="369" alt="Screenshot 2023-08-14 at 3 18 59 PM"
src="https://github.com/elastic/kibana/assets/55978943/cf8ed7c6-77ee-48e7-bf82-7fc2a7101d6b">
## Summary

While working to extract various portions of the `advancedSettings`
plugin into packages, I found the `ComponentRegistry` in the plugin to
have a number of issues that contributed to a fairly bad UX:

- the API allows for adding/overriding the title, subtitle and footer of
the Advanced Settings page, but only the footer is rendered.
- the API is available to all plugins, but only renders a single
entry... so depending on the plugin load order, the render is not
guaranteed.
- filtering the footer in or out of the display is delegated to the
component itself, so:
  - it only takes effect on render.
- the count is only updated if you click on the page that contains it,
but that logic is currently broken.
  - the error message is inaccurate.

![Aug-09-2023
11-19-06](https://github.com/elastic/kibana/assets/297604/494aba14-f2c0-4ce7-b3f0-1910824aeb0e)

This PR fixes those issues and more:

- extracts the registry into its own package.
- changes the API to allow for multiple sections from multiple plugins.
- changes the API to filter these sections from the plugin, rather than
from each individual component.
- fixes state management to show sections, keep counts accurate, etc.

![Aug-09-2023
11-02-11](https://github.com/elastic/kibana/assets/297604/d8e8033c-f9ed-4615-b954-b5c23fda4d7a)

---------

Co-authored-by: Vadim Kibana <[email protected]>
Closes elastic#162976.

### Changes:
- `installAgentPlatformOptions` now have options for disabling the steps
and rendering a custom children.
- `WindowsInstallStep` component was created and used in customLogs and
systemLogs.
- Small fix where systemLogs was occupying the whole screen instead of
the content space.
- Return proper path depending on the platform selected.

#### Before changes 
##### system onboarding
<img width="2063" alt="image"
src="https://github.com/elastic/kibana/assets/1313018/52c4b842-f70a-4328-87b3-88f6bf6f959a">

##### customLogs onboarding
<img width="2052" alt="image"
src="https://github.com/elastic/kibana/assets/1313018/68c4cb28-cd10-44b2-bcc4-bb10e0f19e47">


#### After changes 
##### system onboarding


https://github.com/elastic/kibana/assets/1313018/6e566618-a790-4ffd-ac39-041678f8d362

##### customLogs onboarding


https://github.com/elastic/kibana/assets/1313018/bf908caf-e1d7-4273-8944-2923b9d0ec42

---------

Co-authored-by: kibanamachine <[email protected]>
…c#163785)

**Relates to:** elastic#158246

## Summary

If activity filter contains both allowed values `enabled` and `disabled` simultaneously Coverage Overview endpoint returns the response filtered by the first value only.

This PR fixes wrong behavior os if `enabled` and `disabled` values are set simultaneously the response contains combined results for both `enabled` and `disabled` activity filter values.

For example a request like below

```sh
curl -X POST --user elastic:changeme -H 'Content-Type: application/json' -H 'kbn-xsrf: 123' -d '{"filter":{"activity": ["enabled","disabled"]}}' http://localhost:5601/kbn/internal/detection_engine/rules/_coverage_overview --verbose
```

would produce the same response as the following request

```sh
curl -X POST --user elastic:changeme -H 'Content-Type: application/json' -H 'kbn-xsrf: 123' http://localhost:5601/kbn/internal/detection_engine/rules/_coverage_overview --verbose
```

### Checklist

- [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
`85.1.0` ➡️ `86.0.0`

⚠️ The biggest change in this PR is migrating the `react-beautiful-dnd`
dependency to it's open-source forked successor, `@hello-pangea/dnd`.
This new fork has better typescript support and additionally supports
both React 17 and React 18.

## [`86.0.0`](https://github.com/elastic/eui/tree/v86.0.0)

- Added React 18 support (StrictMode not yet supported).
([elastic#7012](elastic/eui#7012))

**Deprecations**

- Deprecated `euiPaletteComplimentary`; Use `euiPaletteComplementary`
instead. ([elastic#6992](elastic/eui#6992))

**Breaking changes**

- Replaced the underlying drag-and-drop library from
`react-beautiful-dnd` to its fork `@hello-pangea/dnd`
([elastic#7012](elastic/eui#7012))
([elastic#7012](elastic/eui#7012))
- No code updates are needed if using only `<EuiDragDropContext>`,
`<EuiDroppable>` and `<EuiDraggable>` with no direct imports from
`react-beautiful-dnd`. In case you were importing things from
`react-beautiful-dnd` and using them together with EUI components, you
need to switch to `@hello-pangea/dnd` which has cross-compatible API.

---------

Co-authored-by: Tomasz Kajtoch <[email protected]>
Co-authored-by: Tomasz Kajtoch <[email protected]>
Co-authored-by: Cee Chen <[email protected]>
Co-authored-by: Drew Tate <[email protected]>
…3892)

## Summary

Skipping this test as it is broken, currently.

Skip ticket: elastic#160274


### Checklist
- [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: Kibana Machine <[email protected]>
…nt (elastic#163840)

## Summary

Originally I made a PR to add the icon into eui Library, however they
told me that they no longer support adding 3rd party logo into eui
library as such we will need to add it to Kibana instead.
This Changes includes changing the GCP logo on 
- Findings flyout
- Benchmark flyout
- Dashboard
- CSPM and CNVM onboarding page (GCP tab)
<img width="795" alt="Screenshot 2023-08-14 at 9 47 25 AM"
src="https://github.com/elastic/kibana/assets/8703149/53e3aafa-7f3d-4c8f-b20c-ec365693ed88">

<img width="1223" alt="Screenshot 2023-08-14 at 9 33 58 AM"
src="https://github.com/elastic/kibana/assets/8703149/2fcdf9ad-8088-42c4-bb32-d6cdf12d02bc">
<img width="563" alt="Screenshot 2023-08-14 at 9 35 36 AM"
src="https://github.com/elastic/kibana/assets/8703149/5c63d03a-f929-4e5c-80e7-04d8327c7acb">
<img width="754" alt="Screenshot 2023-08-14 at 9 37 40 AM"
src="https://github.com/elastic/kibana/assets/8703149/cd5bc65b-3118-4d1c-a943-7a12518ad5e6">

---------

Co-authored-by: kibanamachine <[email protected]>
…solated host in serverless tiers where Response Actions are not available (elastic#163616)

## Summary

- Fixes the loading of the Host Isolation sub-feature control into
kibana - should always be loaded and includes only the `release`
privilege in it
- Fixes the "Take action" menu items for Host Isolation (displayed in
alert details) to ensure `release` is displayed when host is isolated
and user has `release` privilege only
- Endpoint Response console will now NOT be available to users who only
have `release` response action (this is a downgrade scenario where the
user is still allowed to `release` isolated hosts)
…ic#163102)

## Summary

closes: elastic#157847

The new links and pages in Security Solution for Serverless:

- `Investigations`
   - `Timelines`
   - `Osquery`

- `Assets`
   - `Fleet` (and all its sub-links)
   - `Endpoints` (and all its sub-links)
   - `Cloud defend` (and all its sub-links)
   - Callout with button linking `Integrations` in Project Setting

-  `Project settings`
   - `Users & roles` (Cloud UI)   
   - `Billing & consumption` (Cloud UI)
- `Integrations` (link to integrations with _/browse/security_ path
parameter)
- `Entity risk score` (link currently under the
`riskScoringRoutesEnabled` experimental flag)
- `Management` accordion with a set of (stack) management categories and
pages links

Sections updated:

(ESS & Serverless) `Rules` links have been updated according to new
specs.
(ESS) The `Settings` page was renamed back to `Manage`.
(Serverless) The `Dev tools` link was moved to the bottom of the side
navigation.

#### Cypress tests for serverless:

They will be implemented in a follow-up PR when the infrastructure is
ready elastic#162698

## Screenshots

### Serverless

Investigations:


![investigations](https://github.com/elastic/kibana/assets/17747913/19b602ab-53bb-4280-b0c3-dc69255ea3ab)

![investigations_panel](https://github.com/elastic/kibana/assets/17747913/8be036fc-6095-4234-8b07-1a7149c8a92b)

Assets:


![assets](https://github.com/elastic/kibana/assets/17747913/963723d5-16da-45dd-955c-a7d7b61099e6)

![assets_panel](https://github.com/elastic/kibana/assets/17747913/977c0716-7cc3-4369-acdf-0787e264a912)

Rules:


![rules](https://github.com/elastic/kibana/assets/17747913/5bafbd08-508c-4b50-bd28-dc052371e76a)

![rules_panel](https://github.com/elastic/kibana/assets/17747913/ea47f8d9-4b68-44f3-8a42-6f795d05b982)

Project Settings:


![project_settings](https://github.com/elastic/kibana/assets/17747913/36dbb446-3354-4519-b59c-e8b5005fbb71)

![project_settings_panel](https://github.com/elastic/kibana/assets/17747913/1315b54b-4423-41a2-b0ed-997ee77c1f6d)

## ESS

Side Navigation:

![ess_side_nav](https://github.com/elastic/kibana/assets/17747913/a3687a47-3ccb-4ce8-aa53-9e962a6ef1cf)

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Tomasz Ciecierski <[email protected]>
Co-authored-by: Tomasz Ciecierski <[email protected]>
@machadoum machadoum force-pushed the 157847_fix_page_title branch from c44705c to a34e9e6 Compare August 15, 2023 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.