Commit graph

62491 commits

Author SHA1 Message Date
Coen Warmer
cd90b11e97
[Observability:RulesPage] [TriggerActions:RulesList] Allow filtering of Rules via Rule Param (#154258)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-21 09:08:42 -04:00
Dima Arnautov
e41936662e
[ML] Fix indentation in the API content page template (#155498)
## Summary

Fixes indentation in the API content page template
2023-04-21 14:46:47 +02:00
Katerina Patticha
d401b44288
[APM] Add error grouping key filter in error count rule type (#155410)
part of https://github.com/elastic/kibana/issues/152329

Introduces the error grouping key filter in the error count rule type


https://user-images.githubusercontent.com/3369346/233397481-899e32e0-f26d-4335-84fe-e18c5264f3d2.mov
2023-04-21 14:41:37 +02:00
Kibana Machine
656f824a61 skip failing test suite (#155447) 2023-04-21 08:23:48 -04:00
Achyut Jhunjhunwala
60c8b8fecd
[APM] Implement Unified Search for APM (#153842)
## Summary

This PR brings Unified Search to APM
https://github.com/elastic/kibana/issues/152147

## Scope of Implementation
1. We are only adding the search capability for now.
2. Filters and Saved queries are not part of this scope

### Pending Items

- [x] Add Unit tests
- [x] Fix existing broken Unit tests
- [x] Fix existing broken Cy tests -
https://github.com/elastic/kibana/pull/154059
- [x] Replace the search bar for mobile
- [x] Work on feedback after deploying this branch
- [x] Add validation for Free Text. Awaiting -
https://github.com/elastic/kibana/issues/154239
- [x] Add logic to pass custom filters to Unified Search. Awaiting -
https://github.com/elastic/kibana/issues/154437

### Pages using Unified Search
- [x] Service Inventory
- [x] Service Map
- [x] Service Overview
- [x] Transactions Overview
- [x] Errors
- [x] Trace Overview
- [x] Dependencies Inventory
- [x] Agent Explorer
- [x] Storage Explorer

### Pages still using old Custom Implementation
- [ ] Trace Explorer - Out of scope for this PR
- [ ] Service Group - Changing this logic could take some additional
time as this would mean we allowing our SearchBar component to accept a
custom submit function which does not updates the URL, as in every other
implementation, we update the URL. I would mark this as a follow up
ticket/stretch goal - https://github.com/elastic/kibana/issues/154320
- [x] Alerts - ~~It uses a Custom Search bar built by Actionable Obs
team. Not sure if it's in this scope.~~ Seems they are already using US


## Things to consider
- [x] ~~What do we do with the old components - `KueryBar` and
`ApmDatePicker`. Should we delete them ?~~ The existing component will
stay as its still used in Certain places, see `Pages still using old
Custom Implementation` of this PR
- [x] Other implementation are supporting Free Text Search, hence this
one is too and is not checking for valid KQL. I hope my understanding is
correct here - If needed, then awaiting -
https://github.com/elastic/kibana/issues/154239
[Update] - We will add validations for free text to replicate the
previous behaviour which we had with our own custom implementation
- [ ] The UX of the search bar is a bit off when it comes to long
placeholders. May be we need a shorter text for placeholder -
@boriskirov ?
- [x] ~~When navigating from Service Inventory page to Traces or
Dependencies page, we are only persisting URL state for the selected
time range. Shouldn't KQL query be also part of it. If yes, that would a
stretch goal but good thing to consider.~~ @gbamparop @sqren - As
discussed during the demo, we will keep this functionality as it is,
which means while navigating to a different page, the search bar will be
reset, but the when navigating between tabs on the same page, search bar
will persist.
- [x] ~~On the Initial page load, the Unified Search Bar Input box does
not loads immediately. You only see the DateTimePicker and the button.
Once the component has completely loaded, only then the text box appear.
I see other pages like Log Streams brings up a Full Page loader unless
the component has loaded and then once certain things have loaded, they
remove the full page loader and start showing the search bar. Opinion
?~~ @boriskirov @gbamparop @sqren - Added a EUI Skeleton to handle this
issue.



https://user-images.githubusercontent.com/7416358/228291762-0ca55e9a-7de9-4312-aa58-f484441430ce.mov

---------

Co-authored-by: Katerina Patticha <kate@kpatticha.com>
2023-04-21 14:16:19 +02:00
Sander Philipse
9e712bb6fe
[Enterprise Search] Replace connectors ruby references with python (#155374)
## Summary

This replaces all references to the Ruby repository with references to
the Python repository for connectors.

---------

Co-authored-by: Navarone Feekery <13634519+navarone-feekery@users.noreply.github.com>
Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2023-04-21 13:57:34 +02:00
Sander Philipse
134af87114
[Enterprise Search] Add empty prompt for hidden indices (#155391)
## Summary

This adds an empty prompt to the index overview page for hidden indices.
<img width="1040" alt="Screenshot 2023-04-20 at 14 50 06"
src="https://user-images.githubusercontent.com/94373878/233371589-522888cb-39ed-4554-88fb-4a179ecd2f99.png">


### Checklist

Delete any items that are not applicable to this PR.

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2023-04-21 13:56:21 +02:00
Stratoula Kalafateli
3e3039e9c2
[Lens] Tests trendline data from inspector (#155479)
## Summary

Part of https://github.com/elastic/kibana/issues/142708

Adds more tests for trendlines depending on the inspector table. The
issue above mentions retrieving the information from EC debug data but I
think fetching the data from the inspector is a good alternative and is
used in general in our FTs.

Test runner 50 times
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2152

### Checklist

- [ ] [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
2023-04-21 14:02:03 +03:00
Pablo Machado
e6f7af3468
[Security Solutions] Add telemetry to Security Solutions Cell Actions + Anomalies count (#154830)
EPIC issue: https://github.com/elastic/kibana/issues/145276
## Summary

[Dashboard with both
events](d47a90f0-a6e4-11ed-a6e6-d32d2209b7b7?_g=(filters%3A!()%2CrefreshInterval%3A(pause%3A!t%2Cvalue%3A0)%2Ctime%3A(from%3Anow-90d%2Fd%2Cto%3Anow)))


Add 2 telemetry events.
1. Cell Action clicked
![Screenshot 2023-04-17 at 13 29
53](https://user-images.githubusercontent.com/1490444/232471951-6c0ca1a1-a81e-48d7-9a96-b750f0248e55.png)

Event: 
```json
{
    "timestamp": "2023-03-20T14:23:53.452Z",
    "event_type": "Cell Action Clicked",
    "context": {
        ...
    },
    "properties": {
      "metadata": {
        "telemetry": {
          "component": "RiskScoreTable"
        }
      },
      "fieldName": "host.name",
      "displayName": "Show top host.name",
      "actionId": "security-default-cellActions-showTopN"
    }
}
```

<hr />


2. Anomalies count click (EA page)
![Screenshot 2023-04-17 at 13 30
19](https://user-images.githubusercontent.com/1490444/232471971-4b16b28f-497b-4de8-a8ff-d98a4fbf15cf.png)

Event: 
```json
{
    "timestamp": "2023-03-20T14:23:53.452Z",
    "event_type": "Anomalies Count Clicked",
    "context": {
        ...
    },
    "properties": {
        "jobId": "suspicious_login_activity",
        "count": 134
    }
}
```



### 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
2023-04-21 11:53:14 +02:00
Paulo Henrique
e0d40b741d
[Cloud Security Posture][CNVM] UI Fixes/Enhancements (#155473)
### Summary

This PR addresses Fixes and Enhancements for Cloud Native Vulnerability
Management, such as:
- Added Billing usage Callout
- Fixed Badges Inconsistency between the Table and the Flyout
- Added support for custom placeholder in the Search Bar
- Added Filter In/Out option in the Table
- Fixed Published Date was always showing today's date
- Added filter to the table to filter out inconsistent data
- Improved types in the `useLatestVulnerabilities` hook
- Cleaned the Fix version column when there were no fixes available
- Changed score to always display in decimals for consistency
- Reduced vulnerability column default width (still resizable)

### Screenshots

Billing usage Callout


![image](https://user-images.githubusercontent.com/19270322/233539949-558763f7-f71d-4bfd-b536-7f9f0eba61d9.png)

Filters


![image](https://user-images.githubusercontent.com/19270322/233540869-aacfd6d6-d849-41c5-840e-2b27c8d7fe7f.png)

Filter In


![image](https://user-images.githubusercontent.com/19270322/233540893-2a33cc12-7471-49ef-80aa-71981450923d.png)

Filter Out


![image](https://user-images.githubusercontent.com/19270322/233541035-eb428676-b2e6-41a4-9728-1ac60ce67924.png)

Flyout


![image](https://user-images.githubusercontent.com/19270322/233541145-88f9df1a-1f79-4ed8-aca8-bd9ef1158378.png)

Score always in decimals


![image](https://user-images.githubusercontent.com/19270322/233541375-7e06ca18-d129-44f6-bc0f-3c5383393db6.png)
2023-04-21 12:21:06 +03:00
Sergi Massaneda
e9cc7a8575
[Security Solution] Use Dashboard name in the page title (#155381)
## Summary

issue: https://github.com/elastic/kibana/issues/152955
follow up of https://github.com/elastic/kibana/pull/153040

These changes make the dashboard name to be displayed in the page title,
as requested by @paulewing

## Screenshots


![example](https://user-images.githubusercontent.com/17747913/233359294-a3055aa5-5e2e-4412-93a6-bffd54d93840.png)


![not_found](https://user-images.githubusercontent.com/17747913/233359333-b0175225-99d1-41f3-b3e4-aed630531786.png)
2023-04-21 11:01:18 +02:00
Søren Louv-Jansen
ccb486c953
[APM] Synthtrace scenario fixes (#151280)
- Add filename to environment for consistency
- Use sha256 hash for `error.grouping_key`
2023-04-21 01:25:26 -07:00
Kibana Machine
3bfdefc21a
[api-docs] 2023-04-21 Daily api_docs build (#155475)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/314
2023-04-21 01:08:24 -04:00
Kibana Machine
90242065d9 skip failing test suite (#155429) 2023-04-20 18:55:47 -04:00
Kevin Logan
012d019044
[Security Solution] Update Register as AV restriction message (#154687)
## Summary

Based on user feedback, we're updating the Register as AV restriction
message to better communicate why Windows Server does not support it. In
addition, we change the icon to be more noticeable by users to view the
restrictions.


![image](https://user-images.githubusercontent.com/56395104/230986046-54b88920-e2c1-422a-b192-11fdd97c35c5.png)

### Checklist

- [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)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-04-20 18:50:33 -04:00
Xavier Mouligneau
9ac6f58ab3
[RAM] allow user to predefined their id when they create connector (#155392)
## Summary

 allow user to predefined their id when they create connector


### 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
2023-04-20 15:32:42 -07:00
Alexi Doak
1676432b61
[ResponseOps][Window Maintenance] Add the upcoming events popover to the maintenance window table (#154978)
Resolves https://github.com/elastic/kibana/issues/154815

## Summary

Adding upcoming popover
<img width="1707" alt="Screen Shot 2023-04-14 at 2 27 58 PM"
src="https://user-images.githubusercontent.com/109488926/232127308-3db07e03-7ba5-4e05-851a-b2176632c7d3.png">


### Checklist

- [ ] 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)
- [ ] [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 <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2023-04-20 17:24:34 -04:00
Alexi Doak
954d73d30a
[ResponseOps][Window Maintenance] Add timezone field to the create form (#155324)
Resolves https://github.com/elastic/kibana/issues/153977

## Summary

Adds the timezone combo box to the create form only if the Kibana
Setting is set to `'Browser'`.
When you edit a maintenance window the timezone will always be visible.

<img width="1376" alt="Screen Shot 2023-04-19 at 6 00 18 PM"
src="https://user-images.githubusercontent.com/109488926/233209410-da092529-d14f-430d-b6d5-9ac1471818a9.png">


### Checklist

- [ ] 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)
- [ ] [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 <42973632+kibanamachine@users.noreply.github.com>
2023-04-20 14:24:07 -07:00
Xavier Mouligneau
59f8635f75
[RAM] kibana.alert.url (#155309)
Add alert url as data to allow our user to go back to the details url in
kibana
2023-04-20 17:01:56 -04:00
Jeramy Soucy
45f102f0fe
Fixes security plugin capabilities switcher to handle opt-out and default behaviors (#154098)
Closes https://github.com/elastic/kibana/issues/153817

## Summary

This PR implements logical checks within the security plugin's
capabilities switcher to account for features that opt out of the Kibana
security model (e.g. Enterprise Search features). It also more
explicitly handles default cases (when a feature is neither a Kibana or
ES feature), exclusions (features handled exclusively by other plugins),
and the catalogue feature (we now qualify each catalogue feature
capability). In these cases (opt-out, default, exclusion, etc.), the
capabilities switcher will ignore the capability and neither enable nor
disable it (see detailed list below).

We are now effectively ignoring only these:
- `spaces` feature ID (handled by spaces plugin capabilities switcher)
- `fileUpload` feature ID (handled by file_upload plugin capabilities
switcher)
- `catalogue` capabilities that are not 'spaces' and are not referenced
by at least one Kibana or ES feature
- `navLinks` that are not referenced by at least one Kibana feature
- Anything that is not a global settings, management, catalogue, nav
link, Kibana, or ES feature

On the flip side we always affect everything under the `management`
feature.

This PR _should_ unblock the ability to implement parallel execution of
capabilities switchers, https://github.com/elastic/kibana/pull/152982.


### Related Tests
-
x-pack/plugins/security/server/authorization/disable_ui_capabilities.test.ts
- x-pack/test/ui_capabilities/security_and_spaces/config.ts
- x-pack/test/functional/apps/home/config.ts

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-20 16:28:06 -04:00
Lisa Cawley
e4ae398e6d
[ResponseOps] Edit snooze recurring label (#155338) 2023-04-20 13:20:52 -07:00
Yara Tercero
04f151d27c
[Security Solution][Exceptions] - Fix issue with tags in shared exception list manage rules component (#155219)
## Summary

Addresses https://github.com/elastic/kibana/issues/153077,
https://github.com/elastic/kibana/issues/153077

This PR addresses two bugs in the manage rules component for shared
exception lists:

- Fixes issue where numeric tags were getting overwritten after
selecting a tag after it
- Fixes issue where tag selection was not "exact" match, to be the same
behavior as in the manage rules table
2023-04-20 13:14:05 -07:00
Ido Cohen
f359b6ab41
[Cloud Security] first telemetry for vulnerability (#155031) 2023-04-20 14:13:47 -06:00
Ryland Herrick
2773faa05e
[Security Solution] Mapping cleanup for Signals Migration Saved Object (#154949)
## Summary

These fields are captured in schema elsewhere (and validated there as
well).

This effort is part of elastic/security-team#6268.
2023-04-20 15:13:26 -05:00
Carlos Crespo
ef218cd704
[Infrastructure UI] New Infra api (#155084)
closes: [#152103](https://github.com/elastic/kibana/issues/152103)
fixes: https://github.com/elastic/kibana/issues/151768

## Summary

This PR adds a new API to return host metrics for the Hosts View page. 

The difference between this API and Snapshot API is that this one runs a
terms aggregation and the API can return a range of 1 to 500 hosts,
preventing it from returning all data.

It uses Inventory Model aggregations, so the performance should be
similar to that of the Snapshot API. The `limit` parameter is what will
allow the client to try to get a better response time from the API.

#### Snapshot API

Returns all 500 hosts

15 minutes
<img width="317" alt="image"
src="https://user-images.githubusercontent.com/2767137/230073865-d0d98ce8-76ff-4295-be9b-94f5b342c9f7.png">

1 day
<img width="317" alt="image"
src="https://user-images.githubusercontent.com/2767137/230076350-affbad3d-a498-481e-bcba-bcec019ab739.png">

1 week
<img width="317" alt="image"
src="https://user-images.githubusercontent.com/2767137/230077049-320d90c8-4f3e-47ba-bd16-1c5878a83254.png">


#### Hosts API

100 hosts limit

15 minutes
<img width="317" alt="image"
src="https://user-images.githubusercontent.com/2767137/233349080-50acdf55-d269-49f7-be97-3fc259021020.png">

1 day
<img width="317" alt="image"
src="https://user-images.githubusercontent.com/2767137/233349614-826a791a-aef5-4e7a-b103-2900c4f64f49.png">

1 week
<img width="317" alt="image"
src="https://user-images.githubusercontent.com/2767137/233350318-388ae9b3-8b7b-4365-9f32-7dcbc2342480.png">

### How to test
```bash
curl --location -u elastic:changeme 'http://0.0.0.0:5601/ftw/api/metrics/infra' \
--header 'kbn-xsrf: xxxx' \
--header 'Content-Type: application/json' \
--data '{
    "type": "host",
    "limit": 100,
    "metrics": [
        {
            "type": "rx"
        },
        {
            "type": "tx"
        },
        {
            "type": "memory"
        },
        {
            "type": "cpu"
        },
        {
            "type": "diskLatency"
        },
        {
            "type": "memoryTotal"
        }
    ],
    "query": {
        "bool": {
            "must": [],
            "filter": [],
            "should": [],
            "must_not": []
        }
    },
    "range": {
        "from": "2023-04-18T11:15:31.407Z",
        "to":   "2023-04-18T11:30:31.407Z"
    },
    "sourceId": "default"
}'
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-20 16:31:27 -03:00
Jiawei Wu
d44eaaa3cb
[RAM] Fix maintenance window status not archived when there are no events, but past expiration date (#155433)
## Summary

Fix a small bug when the user archives a maintenance window with no
events, the maintenance window is considered finished, but it should be
archived.

### 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
2023-04-20 12:28:02 -07:00
Christiane (Tina) Heiligers
45449acc01
[Saved Objects] Add a root level managed property to all saved object documents (#154515)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-04-20 12:14:48 -07:00
Melissa Alvarez
d6aba14b26
[ML] Data Frame Analytics/Anomaly Detection: Custom URLs - entity dropdown reflects Data View update (#155096)
## Summary

Related meta issue: https://github.com/elastic/kibana/issues/150375

This PR ensures that when data view is changed, the query entity
dropdown values update to reflect the fields for the newly chosen data
view. This makes it easier for example to build a link to Discover to
view documents in a data view which contains useful contextual data, and
has fields of the same name as those used in the job but which was not
used to create the job e.g. data views which share a common `host.name`
field.

<img width="448" alt="image"
src="https://user-images.githubusercontent.com/7405507/233050903-d423ab1f-b5c7-479e-98a8-c49761eebe3d.png">


### 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 <42973632+kibanamachine@users.noreply.github.com>
2023-04-20 13:07:26 -06:00
Jiawei Wu
de69782531
[RAM] Fix maintenance window update not updating removal of fields (#155431)
## Summary

Fix a bug where when we remove fields from `rRule` during a maintenance
window update, the removed fields are not removed because of how ES does
partial updates.

Due to the complexity of the `rRule` schema, we decided to simply delete
and re-create the maintenance window with the same ID, otherwise, we
would have to diff and null each of the removed fields specifically.

### 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
2023-04-20 11:44:49 -07:00
Jordan
48aa064268
[Cloud Security] Vuln Mgmt - Copy and UX changes (#155376)
## Summary

Copy changes according to [this
issue](https://github.com/elastic/security-team/issues/6410)

Section 1:
- empty state component text changes
- new learn more button instead of text link

Section 5:
- scanning in progress prompt text changes

---------

Co-authored-by: Paulo Henrique <paulo.scape@gmail.com>
2023-04-20 11:24:40 -07:00
Yara Tercero
afced9d47f
[Security Solution][Exceptions] - Fix empty selection showing for exception item field selection (#155221)
## Summary

Addresses https://github.com/elastic/kibana/issues/145540

- blank space no longer shows as selection option for exception item
field dropdown
2023-04-20 11:24:26 -07:00
Yara Tercero
ada91f9a5e
[Security Solution][Exceptions] - Fix stale linked rules count on manage rules save (#155108)
## Summary

Addresses https://github.com/elastic/kibana/issues/153195
2023-04-20 11:23:15 -07:00
Quynh Nguyen (Quinn)
dd46350cac
[ML] Add option to Reauthorize transform in Management page (#154736)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-04-20 13:16:18 -05:00
Kevin Delemme
2f8a729093
feat(slo): Add overview and alerts tab on slo details page (#155413) 2023-04-20 14:13:51 -04:00
Quynh Nguyen (Quinn)
1fe26f3fba
[ML] Adds secondary authorization header to Transforms in Fleet (#154665)
## Summary

The PR updates how credentials are created and managed for packages
including Transforms. Previously, everything will be installed as
`kibana_system` user, which has limited permissions to a specific set of
indices defined internally. This PR changes so that a secondary
authorization is passed to the creation of Transforms, making the
permissions/privileges dependent on the logged-in user.

### Installing a package containing transforms
- If the package has transforms assets to be installed, it will show
warning/info call out message indicating that the transforms will be
created and started with the current user's credentials/roles.
<img width="1226" alt="Screen Shot 2023-04-11 at 17 45 58"
src="https://user-images.githubusercontent.com/43350163/231305549-ad4c981c-e186-4431-8229-5083e9ed6fc3.png">
<img width="1226" alt="Screen Shot 2023-04-11 at 17 46 03"
src="https://user-images.githubusercontent.com/43350163/231305550-7b47e95d-f876-456a-beb4-d71336a3f2cf.png">

-It will parse the authorization header (schema and credentials) from
the Kibana request to the package handlers.
- If the package contains transforms, and if **run_as_kibana_system:
false in the any of the transform yml config** , then generate an API
key from the above credential (as that Kibana user with the roles and
permissions at the time of generation), and use it in `transform/_put`
requests.
- If user has **sufficient permissions**:
- Transforms will be successfully created and started. They will be
marked in the saved object reference with `deferred: false`
  - Transform `_meta` will have `installed_by: {username}`
<img width="582" alt="Screen Shot 2023-04-11 at 14 11 43"
src="https://user-images.githubusercontent.com/43350163/231305101-20a63860-6d0c-4324-ba49-bea116de1f96.png">

  - Package will be successfully installed
- If user has **insufficient permissions**:
- Transforms will be successfully created, but fail to start. They will
be marked in the saved object reference with `deferred: true`
- Package will still be successfully installed. It will show warning
that the package has some deferred installations.


### Deferred installations

If a package has deferred installations (a.k.a assets that were included
in the package, but require additional permissions to operate
correctly), it will:

- Show a warning on the `Installed integrations` page:
<img width="1216" alt="Screen Shot 2023-04-06 at 15 59 46"
src="https://user-images.githubusercontent.com/43350163/230955445-fcb575af-d02b-4b0f-96f7-7506fa4a8f02.png">


- Show a warning badge with explanation on the tab:
<img width="750" alt="Screen Shot 2023-04-10 at 12 17 26"
src="https://user-images.githubusercontent.com/43350163/230955055-2fa85f1f-b7f8-4473-997a-1e4fec5453b9.png">

- Show a new `Deferred installations` section as well as call out
message to prompt user to re-authorize inside the `Assets` tab:
<img width="1216" alt="Screen Shot 2023-04-06 at 15 59 09"
src="https://user-images.githubusercontent.com/43350163/230955326-457074da-9f04-4aa6-aa15-f2c7ff14c6f1.png">

If the currently logged-in user has sufficient permissions
(`manage_transform` ES cluster privilege/`transform_admin` Kibana role),
the Reauthorize buttons will be enabled:

<img width="1054" alt="Screen Shot 2023-04-10 at 12 24 18"
src="https://user-images.githubusercontent.com/43350163/230960881-aa122119-c408-41c9-ab0c-90c18f65205e.png">

### Reauthorizing installations

- For transforms:
- Clicking the `Reauthorize` button will send an `_transform/_update`
API request with a `headers: {es-secondary-authorization: 'ApiKey
{encoded_api}'` and then a `_transform/_start` to start operations.
- Transform `_meta` will be updated with addition of
`last_authorized_by: {username}`
<img width="593" alt="Screen Shot 2023-04-11 at 14 12 38"
src="https://user-images.githubusercontent.com/43350163/231305257-eb79cf47-dbc1-4d93-b47f-0ff698ba8e6d.png">

- If `order` is specified in `_meta` of the transform, they will be
updated and started sequentially. Else, they will be executed
concurrently.

## Reviewers note:
-For **kibana-core**: saved object for Fleet's EsAsset was extended with
`deferred: boolean`, thus changing the hash.

### Checklist

Delete any items that are not applicable to this PR.

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-20 13:07:42 -05:00
Jordan
a33b6d0731
[Cloud Security] Fix broken dashboard UI and ComplianceScoreBar (#155428) 2023-04-20 10:59:33 -07:00
Alexi Doak
f315e808a4
[ResponseOps][Window Maintenance] Add technical preview (#155403)
Resolves https://github.com/elastic/kibana/issues/153976

## Summary

Adds the technical preview pill and popover to the headings of the
maintenance windows pages.

<img width="1435" alt="Screen Shot 2023-04-20 at 9 29 51 AM"
src="https://user-images.githubusercontent.com/109488926/233382847-575ef849-7eca-43d8-b305-9e31e0586685.png">

<img width="1432" alt="Screen Shot 2023-04-20 at 9 30 04 AM"
src="https://user-images.githubusercontent.com/109488926/233382864-dbe8d228-3f52-4f4c-99f4-24ab5bb6caa4.png">


### Checklist

- [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)
2023-04-20 13:54:05 -04:00
Ersin Erdal
00dfae4312
Make rule type param validation required (#154257)
Resolves: #153755

This PR intends to make rule type param validation function required.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-20 19:23:47 +02:00
Shahzad
08a68dbe73
[Synthetics] Fix performance breakdown link from error details page (#155393) 2023-04-20 18:23:36 +02:00
Lisa Cawley
5120d692c8
[DOCS] Remove or move book-scoped attributes (#155210) 2023-04-20 09:12:09 -07:00
Ashokaditya
241f71b346
[Security Solution][Endpoint][Response Actions] Add automated tests for execute response action test cases (#155128) 2023-04-20 08:56:31 -07:00
Kfir Peled
92ce25d7c8
[Cloud Security] [CNVM] Showing the same prompt when not deployed and not installed (#155211) 2023-04-20 08:51:10 -07:00
Lisa Cawley
fd20b84ff1
[ResponseOps][Window Maintenance] Edit button text (#155335) 2023-04-20 08:37:13 -07:00
Pablo Machado
df8c29e64d
[Security Solutions] Add EBT telemetry to ML jobs status updates (#155233)
EPIC issue: https://github.com/elastic/kibana/issues/145276
## Summary

[Dashboard with
events](d47a90f0-a6e4-11ed-a6e6-d32d2209b7b7?_g=(filters%3A!()%2CrefreshInterval%3A(pause%3A!t%2Cvalue%3A0)%2Ctime%3A(from%3Anow-90d%2Fd%2Cto%3Anow)))


Add ML Job Update telemetry events. Jobs can be updated from the Entity
analytics page, ML widget, and rules pages.

![Screenshot 2023-04-19 at 11 25
51](https://user-images.githubusercontent.com/1490444/233032320-be24b4a8-39a7-458e-8f32-89e639708b15.png)
![Screenshot 2023-04-19 at 11 26
15](https://user-images.githubusercontent.com/1490444/233032326-40c99750-ed86-4b80-a0b6-e0ac1944e340.png)
<img width="1521" alt="Screenshot 2023-04-19 at 11 26 37"
src="https://user-images.githubusercontent.com/1490444/233032333-53a6d210-4f40-409b-bccb-992cb09919fd.png">
<img width="1514" alt="Screenshot 2023-04-19 at 11 26 55"
src="https://user-images.githubusercontent.com/1490444/233032342-dc5f9d2c-eb65-4f22-9ad3-01d0d854f558.png">



Event: 
```json
{
    "timestamp": "2023-03-20T14:23:53.452Z",
    "event_type": "ML Job Update",
    "context": {
        ...
    },
    "properties": {
        "jobId": "auth_rare_source_ip_for_a_user",
        "isElasticJob": true,
        "moduleId": "security_auth",
        "status": "module_installed"
    }
}
```
The status could be one of the following options:
`
    | 'module_installed'
    | 'installation_error'
    | 'started'
    | 'start_error'
    | 'stopped'
    | 'stop_error'
`
### 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
2023-04-20 17:30:41 +02:00
Alejandro Fernández Haro
031bc369bd
[Cloud] Add deploymentId to the EBT context (#155182) 2023-04-20 17:22:31 +02:00
Melissa Alvarez
4c79ef4009
[ML] Add search links for AIOps Labs pages (#155202)
## Summary

Related meta issue: https://github.com/elastic/kibana/issues/146065

Added deep search links into the top search bar for the AIOps Labs pages
- change point detection, log pattern analysis, and explain log rate
spikes

<img width="759" alt="image"
src="https://user-images.githubusercontent.com/6446462/233172173-70a6283a-603f-4793-993e-e67c38214508.png">

Created deep link for 'Notifications'.

<img width="819" alt="image"
src="https://user-images.githubusercontent.com/6446462/233172258-8117011e-227b-4ba1-8497-c59510eaa62f.png">

Moved 'Memory Usage' deep link out of model management into its own
link.

<img width="777" alt="image"
src="https://user-images.githubusercontent.com/6446462/233172425-48ac1dd1-2b1c-4ebf-a80a-ba7328bf34c5.png">

<img width="697" alt="image"
src="https://user-images.githubusercontent.com/6446462/233172483-b1405f39-01a3-48f4-8cbe-faba00773b02.png">





### Checklist

Delete any items that are not applicable to this PR.

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
2023-04-20 09:02:52 -06:00
Elastic Machine
783d1c0092
[main] Sync bundled packages with Package Storage (#155404)
Automated by
https://internal-ci.elastic.co/job/package_storage/job/sync-bundled-packages-job/job/main/3241/

Co-authored-by: apmmachine <infra-root+apmmachine@elastic.co>
2023-04-20 07:55:49 -07:00
Dominique Clarke
0b71c7458d
[Synthetics] add default email recovery message (#154862)
## Summary

Resolves https://github.com/elastic/kibana/issues/153891
<img width="1334" alt="Screen Shot 2023-04-18 at 7 50 20 PM"
src="https://user-images.githubusercontent.com/11356435/232928889-09de824f-14ef-426d-8732-6da7fc12eb37.png">

Down email

Recovered email
<img width="1339" alt="Screen Shot 2023-04-18 at 7 50 30 PM"
src="https://user-images.githubusercontent.com/11356435/232928874-4e7c0cbb-b7ec-4684-b0d2-88ec993697df.png">

Please note the `recoverd` typo in the screenshot has been addressed in
commits
[7c4040f](7c4040fda3)
and
[56f637b](56f637b82e)

### Testing
This PR is extremely tricky to test. I have deployed this branch to my
own cloud account. This ensures that I can control the allowlist setting
for emails on cloud. If you want, I can give you the cloud cluster where
this branch is hosted and if you give me your email I can add you to my
allowlist settings for you to test.

The cloud cluster is current on commit
[f889500](f889500dc2)
2023-04-20 10:51:04 -04:00
Alexi Doak
c68dfd7f9a
[ResponseOps][Window Maintenance] Add the edit action to the maintenance window table (#154669)
Resolves https://github.com/elastic/kibana/issues/154559

## Summary

Adds an edit action to the maintance windows table. When a user clicks
edit we retrieve the maintenance window and open the edit form.

### Checklist

- [ ] 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)
- [ ] [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 <42973632+kibanamachine@users.noreply.github.com>
2023-04-20 10:32:05 -04:00
Dario Gieselaar
60c8276577
Enable APM for ES when running performance journeys (#155195)
Enables APM instrumentation for Elasticsearch when running performance
journeys, for a more complete understanding of where time is being
spent:

<img width="1418" alt="CleanShot 2023-04-18 at 20 30 32@2x"
src="https://user-images.githubusercontent.com/352732/232870884-151aed23-347b-485e-8490-4b56b6beaa33.png">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-20 16:26:48 +02:00