Commit graph

65752 commits

Author SHA1 Message Date
Cristina Amico
c249c30d3b
[Fleet] Use new Fleet Secrets ES APIs instead of reading/writing secrets index (#163075)
Closes https://github.com/elastic/kibana/issues/162915

## Summary
Replace direct calls to Fleet Secrets index with new API calls
introduced with https://github.com/elastic/elasticsearch/pull/97728

### New ES secrets APIs:
```
POST /_fleet/secret/
{
  "value": "<secret value>"
}

// Returns the id of the created secret
{
  "id": "<secret_id>"
}

DELETE /_fleet/secret/<secret_id>

// returns 
{
  "deleted": true
}
```

NOTE: I tried running the secrets integration tests in
https://github.com/elastic/kibana/issues/162732 but there is some ES
error that I'm not sure how to address. I think that the test can be
worked on separately

### Testing

Testing steps are the exact same as
https://github.com/elastic/kibana/pull/157176:
- Start EPR locally loading the `Secrets` test package from Kibana:

```
docker run -p 8080:8080 -v /Users/<YOUR_PATH>/kibana/x-pack/test/fleet_api_integration/apis/fixtures/test_packages:/packages/test-packages -v /Users/<YOUR_PATH>/kibana/x-pack/test/fleet_api_integration/apis/fixtures/package_registry_config.yml:/package-registry/config.yml docker.elastic.co/package-registry/package-registry:main
```
- Point `kibana.dev.yml` to local EPR:
```
  xpack.fleet.registryUrl: http://localhost:8080
```
- Enable the secrets feature flag `secretsStorage`
- Start kibana and navigate to `integrations`, install `Secrets`
package.
- It should create and edit the package policy successfully

<img width="1800" alt="Screenshot 2023-08-08 at 16 26 52"
src="5e2b77d9-71a9-4c5f-8b3b-5fc6546d562f">

- The yml policy should have the redacted secrets and secrets ids:

<img width="771" alt="Screenshot 2023-08-08 at 15 43 22"
src="7db22c6b-b0db-4eb6-bc68-7174374c9c74">

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-08-08 18:05:31 +02:00
Paul Tavares
0ba941ac2a
[Security Solution][Endpoint] Display "Data Collection" only on Policy Create form when Serverless does include Endpoint PLIs (#163198)
## Summary

Changes in support of serverless:

- When the serverless project is not running with the Endpoint addon
(Endpoint Essentials or Endpoint Complete), the Create Policy preset
options should only display the "Data Collection" option
2023-08-08 11:59:24 -04:00
Shahzad
56ccc691c9
[Synthetics] Refactor usage of alerting apis (#163403) 2023-08-08 17:53:45 +02:00
Elastic Machine
1922d73558
[main] Sync bundled packages with Package Storage (#163413)
Automated by
https://internal-ci.elastic.co/job/package_storage/job/sync-bundled-packages-job/job/main/6212/

Co-authored-by: apmmachine <infra-root+apmmachine@elastic.co>
Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
2023-08-08 08:04:23 -07:00
Ignacio Rivas
49eadc5bff
[Watcher] Retain query in watcher list (#163297) 2023-08-08 17:56:08 +03:00
GitStart
793c961a4a
[Ingest Pipelines] Migrate all usages of EuiPage*_Deprecated (#163134) 2023-08-08 10:55:53 -04:00
Vadim Kibana
c52327492f
Updates deprecated EUI components in locators example plugins (#163405)
## Summary

Partially addresses https://github.com/elastic/kibana/issues/161425

New look:

<img width="2017" alt="image"
src="313fe761-2060-4b7b-b5d3-3f655d2cec02">
2023-08-08 07:55:38 -07:00
Anton Dosov
7025a7bdab
[Files] Make download route public (#163408)
## Summary

fix https://github.com/elastic/kibana/issues/163364 in serverless
Similar to https://github.com/elastic/kibana/pull/162707/, the the
endpoint is used by `<img src=""/>` and should work without any special
headers
2023-08-08 15:47:48 +01:00
Vadim Kibana
c13dcf47c5
Update EUI deprecated components in sample screenshot plugin (#163409)
## Summary

Closes https://github.com/elastic/kibana/issues/161425
2023-08-08 07:45:45 -07:00
Dima Arnautov
b62747e085
[ML] AIOps: Adds change point detection charts embeddable (#162796)
## Summary

Part of #161248 

- Adds Change point charts as an embeddable component 
- Allows attachment of selected partitions to a new / existing dashboard
![Aug-01-2023
14-46-49](cba12d6e-7e2b-481e-a788-18435a0a9840)
- Allows attachment of top N change points (with an ascending sorting by
`p_value`)
![Aug-01-2023
14-55-10](d99e119d-c428-49d0-bc76-7a33a3ce4ffd)
- Allows applying a persistent time range 
- Attachment to a case of a single change point / selected partitions
and applied time range
![Aug-01-2023
15-07-33](1c4cc131-0897-4fc4-8f45-e8118ab1f941)
- Exposes `EmbeddableChangePointChart` embeddable component as part of
the plugin start contract


### 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)
- [ ]
[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
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] 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)
- [x] 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))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
2023-08-08 17:33:51 +03:00
Lisa Cawley
bc9d601feb
[OAS] Clarify rule action descriptions (#162199) 2023-08-08 07:31:46 -07:00
Faisal Kanout
03303940f2
[AO][BUG] Disable view rule details when the rule is deleted (#163183)
## Summary

Fixes #163084

<img width="1397" alt="Screenshot 2023-08-04 at 17 33 34"
src="8075da4d-633d-4916-b6db-491f7c87c363">

### Release note
Disable the "View rule details" option from the Alert Details' Actions
list when the rule is deleted.
2023-08-08 16:04:54 +02:00
Nathan Reese
69579014a3
[share] hide 'Embed code' share option when buildFlavor is 'serverless' (#163104)
Closes https://github.com/elastic/kibana/issues/161266

### Overview
PR hides 'Embed code' share option in serverless

### Test
* Start kibana with `yarn start --serverless=es`
* verify 'Embed code' is not displayed in Dashboard share option

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-08 08:00:22 -06:00
Pablo Machado
739b98bf6a
[Security Solutions] Upselling hook improvement (#162956)
## Summary

Update useUpselling hooks to avoid unnecessary re-renders by providing
an initial value.


### Checklist

Delete any items that are not applicable to this PR.

- [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-08-08 15:56:24 +02:00
Antonio
108b387ede
[Cases] Flaky test UserActions pagination (#163344)
Fixes #156748

## Summary

[There is already a functional test that covers the same
functionality.](https://github.com/elastic/kibana/blob/main/x-pack/test/functional_with_es_ssl/apps/cases/group1/view_case.ts#L727)

| Old Test  | Scenario | Where it is covered now |
| -------------   |  -------------   | ------------- |
| hasNext page is true | there are 2 `user-actions-list` | functional
test creates 24 UAs, displays too columns initially |
| hasNext page is true | `cases-show-more-user-actions` in document |
functional test creates 24 UAs clicks `cases-show-more-user-actions` |
2023-08-08 15:51:15 +02:00
Angela Chuang
b68e476918
[SecuritySolution] Get started page update (#162470)
## Summary



1. Update get started page according to 

https://www.figma.com/file/1eOeaxZobHpw2pq5Rmubc1/Get-started-Prototype?node-id=76%3A183730&mode=dev

https://docs.google.com/document/d/1Am4sJ9pE6JmElUdUx00I-o7DRt7qcqpVuGgW0wDJORw/edit

2. Add `Mark as done` and `Undo 'Mark as done button'`

![localhost_5601_app_security_get_started_
(1)](08f0b580-4a9d-4b40-9269-fe5220349d20)




- When no product active or when you land on this page the first time,
it enables the product according to your `serverless.security.yml`
settings
- If you have landed on this page before and have some products active,
it renders the cards and steps according to your previous status from
local storage. It should keep track of which cards and steps are
expanded and which steps are finished.



### 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 <42973632+kibanamachine@users.noreply.github.com>
2023-08-08 05:57:38 -07:00
Ievgen Sorokopud
a5979a0aa6
[Security Solution] Unskip "use_fetch_or_create_rule_exception_list.test.tsx" tests (#163169)
## Summary

Original ticket: https://github.com/elastic/kibana/issues/145749

This PR un-skips tests which were disabled due to [upgrade to Jest 29
here](https://github.com/elastic/kibana/pull/143319).

Fixes:
1. Restructured test which checks the `isLoading` state returned by the
`useFetchOrCreateRuleExceptionList` hook
2. Make sure we call `await waitForNextUpdate();` right amount of times

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-08 14:49:56 +02:00
Stratoula Kalafateli
d673fa4b78
[Lens] Improvement of the discard changes modal (#163384)
## Summary

Closes https://github.com/elastic/kibana/issues/161493

Leaving the editor with unsaved changes
<img width="690" alt="image"
src="1587b8dc-83a1-4d89-993d-3150dea17836">

Go back to TSVB modal
<img width="742" alt="image"
src="a49667a1-927b-4aa8-aa1a-765a14ebd925">
2023-08-08 15:36:12 +03:00
Stratoula Kalafateli
5c619d74a0
[Textbased] Fetch correctly the types of the query fields (#162982)
## Summary

This PR is solving the following wrong behavior in text based languages.

When we are trying to depict a SQL/ESQL suggestion in Discover it is
necessary to know the type of the field. What we did so far was sending
from Discover to Lens only the column names and we were trying in Lens
to fetch the type from the dataview fields. But this doesnt cover all
the cases as both SQL (and ESQL) can create fields which cant be found
in a dataview. For example:

- Use of as `SELECT bytes, geo.dest as random_name FROM
"kibana_sample_data_logs"` in SQL
- Use rename (in ESQL)
- Create an aggregation, this will create a new variable in both
languages
- Using eval in ESQL
- ....

This PR solves the problem by passing the entire datatableColumn in the
Lens api and not only the name of the column. The types of the fields
are returned by sql, esql apis so we already have the information. We
just need to pass it in Lens.

**Fetching the correct types is very important as better suggestions
will be suggested from Lens.**

### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-08 05:15:45 -07:00
Pablo Machado
0b4ce7c168
[Security Solutions] Revert the revert of cases connector PLI + import fix (#163277)
## Summary

Unfortunately, cases connector PR broke the main branch and was
reverted.
The problem happened because another PR updated an import while the
cases PR was getting merged.

I deleted the old import and now it should work fine.
2023-08-08 13:00:02 +01:00
Dario Gieselaar
e47152d8fd
[Observability AI Assistant]: Chat & function calling (#162906)
Implements chat & function calling for the Observability AI Assistant.
The APM related changes are due to a correction in the `toBooleanRt`
type.

Code in `x-pack/observability_ai_assistant` has been reviewed via
feature branches.

---------

Co-authored-by: Coen Warmer <coen.warmer@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Clint Andrew Hall <clint@clintandrewhall.com>
2023-08-08 13:48:05 +02:00
Anton Dosov
304cb256cf
Make SavedObjectFinder backward compatible (#162904)
## Summary

close https://github.com/elastic/kibana/issues/161545
close https://github.com/elastic/kibana/issues/153257

This PR makes `SavedObjectFinder` component backward compatible. It is
achieved by going through content- management layer, more technical
details
[here](https://docs.google.com/document/d/1ssYmqSEUPrsuCR4iz8DohkEWekoYrm2yL4QR_fVxXLg/edit)

### Testing

`SavedObjectFinder` is this component that allows to pick a saved object
(supports: `search` `index-pattern` `map` `visualization` `lens`
`event-annotation-group`:

![Screenshot 2023-08-07 at 16 53
32](5c283ea5-3682-4dc8-a8ff-422e6f4f3195)


It is used in the following places: 

- Dashboard 
  - Add panel
  - Replace panel 
- Discover - Open Search 
- Visualization - Select search as a source for new viz
- Graph - select source
- Cases - markdown editor add lens 
- ML (3 places) 
- Canvas - select embeddable panel 
- Transform 
- Lens > select event annotation 




### Risks / Follow up 

The `SavedObjectFinder` should stay mostly the same, the only notable
functional change is that now `SavedObjectFinder` doesn't support
`includeFields` which allowed partial saved object returns, this was
done to make the call backward-compatible without making the system even
more complicated as otherwise we'll need a way to abstract
`includeFields` from so attributes and allow to run migrations on it
before making a search. follow up issue to bring it back
https://github.com/elastic/kibana/issues/163043

The risk with that is that some client that have a lot of large objects
might run into performance issues when using `SavedObjectFinder`. This
can be mitigated by changing listing limit in advanced setting from
default 1000 to something lower
2023-08-08 13:10:29 +02:00
Miriam
863ea15bde
[APM] Add storage summary stats to report (#163309)
Closes https://github.com/elastic/kibana/issues/160013
2023-08-08 11:46:46 +01:00
Pete Harverson
f4e62c1c74
[ML] Unskips data frame analytics functional tests (#163377)
## Summary

Unskips the data frame analytics tests that were fixed in
https://github.com/elastic/kibana/pull/163343 and skipped in
https://github.com/elastic/kibana/issues/163220 and
https://github.com/elastic/kibana/issues/163338

### 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-08-08 10:46:56 +01:00
Philippe Oberti
c8a82b22ad
[Security Solution] expandable flyout - move share alert and chat buttons up to improve header UI (#162895) 2023-08-08 11:44:44 +02:00
Walter Rafelsberger
b8bb4ee34b
[ML] AIOps: Improve table hovering for log rate analysis. (#162941)
Improves the table hovering behavior for log rate analysis:
- When no row is hovered, it falls back to set the first row of the
current page to a hovered state. The result is that users will always
see a comparison view in the main document count chart.
- When a row gets pinned, the hovering of the other rows will be
disabled, so the comparison view in the main document count chart gets
locked on the pinned row.
2023-08-08 10:31:32 +02:00
Maxim Kholod
9b087e080b
[Cloud Security] refetch status and dashboard data until data is indexed (#163005)
## Summary

This PR enables the Compliance Dashboard page (CSP dashboards) to
self-recover from different "no findings" states so that the user
doesn't need to reload the page to see the changes after they perform
onboarding steps (install integration, deploy agent, index data, etc.)

fixes 
- https://github.com/elastic/kibana/issues/156616 

### Recording

d0201ebb-b8f8-4bce-b72e-3fdd85ab79fb

### Checklist

Delete any items that are not applicable to this PR.

- [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 <42973632+kibanamachine@users.noreply.github.com>
2023-08-08 09:48:44 +02:00
Tomasz Ciecierski
1696b864a3
[EDR Workflows] Enable PLI for Osquery Response Actions (#163057) 2023-08-08 09:41:55 +02:00
Miriam
adb9573cb2
Revert "[APM] Add index.fast_refresh to .apm-custom-link" (#163142)
Reverts elastic/kibana#159674

The Elasticsearch team has changed their guidance about `fast_refresh`
and want this setting to be applied from within an Elasticsearch plugin
2023-08-08 08:34:48 +01:00
Tiago Costa
0d49c8a214
chore(NA): skip failing suite on osquery/cypress/e2e/all/alerts.cy.ts (#163366)
Recreation of https://github.com/elastic/kibana/pull/163360

This PR intends to skip a failing suite to unblock the unsupported FTRs
pipeline along the same lines of what was done at
https://github.com/elastic/kibana/pull/163322
2023-08-08 09:33:31 +02:00
Nicolas Chaulet
5a6c5fb4d3
[Fleet] Make API routes public by default (#163345)
## Summary

Kibana API will not be public by default in serverless, this mean Fleet
API will not be accessible.

That PR fix that by changing the Fleet router to make Fleet API routes
public unless they specify `options.access` in their config, the only
route that I found that should be internal is the
/internal/fleet/reset_preconfiguration`

## Test

- [x] Added unit test to our router

manual test run Kibana in serverless and check Fleet API are still
publicly available

Before that change 

<img width="1003" alt="Screenshot 2023-08-07 at 1 36 29 PM"
src="8e2fb113-f5e8-45e8-9892-f25bd9e722ad">


After that change 

<img width="679" alt="Screenshot 2023-08-07 at 1 36 55 PM"
src="3cade239-5b13-4caf-bd1a-1bc8e2495c31">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-08 08:29:45 +02:00
Kibana Machine
67927d98c0
[api-docs] 2023-08-08 Daily api_docs build (#163374)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/423
2023-08-08 00:55:12 -04:00
Kevin Qualters
ca5f093153
[Security Solution] [RAC] [Timeline] Fix exceptions in investigate in timeline (#162190)
## Summary
Fixes investigate in timeline by using the new fields api like format
from the trigger actions ui alerts table. Previously, the timeline
search strategies that powered the alerts table before the move to
trigger_actions_ui plugin were doing a lot of munging of fields on the
api side, this seems like it wasn't ever really necessary, but it
exists. The investigate in timeline action expected the data to be in
this format:
https://github.com/elastic/kibana/blob/main/x-pack/plugins/timelines/server/search_strategy/timeline/factory/helpers/format_timeline_data.ts#L82
however it's done now in a much simpler way:
https://github.com/elastic/kibana/blob/main/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_fetch_alerts.tsx#L222
and is much more like the fields api. I think this is a cleaner approach
moving forward, however alerts viewed in timeline can still go through
this code path, and so both are supported.

![alert_table_exceptions](bbe8264c-2ebb-42a8-a4da-80aed2ff6a06)




### 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-08-07 20:07:33 -07:00
Davis Plumlee
f4d8c07010
[Security Solution] Coverage Overview Dashboard (#161556) 2023-08-07 20:03:52 -07:00
Tiago Costa
852489950b
Revert "chore(NA): skip failing suite on osquery/cypress/e2e/all/alerts.cy.ts"
This reverts commit b2b4358d6a.
2023-08-08 00:22:21 +01:00
Tiago Costa
4ccfb84e1e
skip failing es promotion suites (#163365) 2023-08-08 00:19:40 +01:00
Tiago Costa
c73bce5e31
Merge remote-tracking branch 'upstream/main' 2023-08-08 00:18:24 +01:00
Catherine Liu
dbe8852e57
[Dashboard][Content Editor] Edit title, description, and tags from dashboard listing page (#161399)
## Summary

Closes #144481.
Closes #160256.

This enables content editor in dashboard to allow users to edit the
title, description, and tags from the listing page.


c2212882-43e3-45cb-83fc-493860857019

The only validation added to this flyout is the duplicate title check. I
used the same warning message as the visualize listing page.

<img width="600" alt="Screenshot 2023-07-06 at 2 11 38 PM"
src="42f7244a-1c4d-47ec-8f66-a98a63eff473">

### 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-08-07 15:47:32 -07:00
Michael Olorunnisola
dbdba583c1
[Security Solution][Investigations] - skip one more test (#163362)
## Summary

One more suite missing from:
https://github.com/elastic/kibana/pull/163322
Per this comment:
https://github.com/elastic/kibana/pull/163322#issuecomment-1668330825


### 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)
2023-08-07 17:38:19 -05:00
Nathan Reese
36f260593e
unskip Failing test: Dashboard Elements - Controls tests.test/functional/apps/dashboard_elements/controls/common/control_group_chaining·ts - Controls Dashboard control group hierarchical chaining Creating "does not exist" query from first control filters the second and third controls (#163350)
Closes https://github.com/elastic/kibana/issues/162777

flaky test runner
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2811

Failure image shows options list is still open. PR updates
optionsListEnsurePopoverIsClosed with logic to prevent 2 possible issues
1) retry added to ensure missed click will attempt to close options list
again
2) check options list is open before clicking. This will resolve issue
where options list is closed and clicking actually opens it again


![image](06a6673c-e92f-4a45-8910-8a0a1a7c5776)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-08-07 15:57:37 -06:00
Tiago Costa
b2b4358d6a
chore(NA): skip failing suite on osquery/cypress/e2e/all/alerts.cy.ts 2023-08-07 22:08:19 +01:00
Thomas Watson
7ff43da226
[docs] Improve Node.js upgrade docs (#163268) 2023-08-07 22:08:18 +02:00
mohamedhamed-ahmed
a42df25d4a
[Logs+] End onboarding wizard in default discover (#163218)
closes [#163080](https://github.com/elastic/kibana/issues/163080)


## 📝  Summary

This PR navigates to default discover at the end of the onboarding flow
for both custom and system workflows.
It also adds `logs-*` as the default dataview along with a preset filter
for the intended dataset during the onboarding flow.

##   Testing

1. Navigate to the onboarding flow `/app/observabilityOnboarding/`
2. Choose either System logs or Stream log files
3. Go through the onboarding wizard
4. Click the Explore logs button at the end
5. Observe the DataView and Preset Filter after being navigated to
Discover

## 🎥 Demo


5eff74e4-c12a-46e7-968a-6efa34a6a7a9

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-07 21:00:15 +02:00
Melissa Alvarez
25c78523f6
[ML] Data Frame Analytics functional tests: remove unnecessary version check (#163343)
## Summary

Fixes https://github.com/elastic/kibana/issues/163220
Fixes https://github.com/elastic/kibana/issues/163338

Flaky test run
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2808


### Checklist

Delete any items that are not applicable to this PR.

- [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-08-07 14:56:30 -04:00
Catherine Liu
f64ba2a4fc
[Canvas] Fix embeddables not rendering (#163013)
## Summary

Closes #158948.

This removes the debounce on a redux action that was causing the
embeddables to not load in Canvas. It was introduced in #132831 which
fixed https://github.com/elastic/kibana/issues/123557 where changes to
the datasource settings weren't synced with the expression properly.

After extensive testing with this debounce removed, I was still unable
to reproduce the datasource/expression sync issues, so this change
shouldn't cause any regression there.

I added a smoke test that checks that embeddables render correctly after
a page change, and I added debounces to the handlers for any settings
changes in the sidebar both in the `display` tab and the `data` tab to
prevent too many updates.

While I was in here, I noticed that the corners of the dashed border
were slightly showing after switching from `border` to `outline` styles
on the embeddable panel, so I fixed the CSS here to hide them correctly
again.


### 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-08-07 11:19:30 -07:00
Dario Gieselaar
0627686500
[Observability AI Assistant] Feature controls (#163232)
This adds feature controls for the AI Assistant feature.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-07 19:53:18 +02:00
Drew Tate
c6df737a7b
[Lens] Add lens editor performance metrics (#163089)
## Summary
This PR instruments the code to track a few key editor performance
metrics. This is to prepare for adding a Lens editor performance
journey.

Metrics
- initial load of main chart
  - time to load data
  - time to render
- time to initially load and render all suggestions

For this PR, each metric is reported to the console (commented out to
pass the linter). When the journey is added, the console statements will
be converted to analytics service calls so that they show up as metrics
in the journey dashboard.

I made a few changes to increase the accuracy of the metrics.
- wrapping render-complete callbacks in `requestAnimationFrame` calls as
a temporary solution to
https://github.com/elastic/elastic-charts/issues/2124
- fixing a multiple-subscription issue in the workspace panel

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2023-08-07 18:45:51 +01:00
Thom Heymann
2240c718ad
Manage Cross-Cluster API keys (#162363)
Resolves https://github.com/elastic/kibana/issues/142400

## Release notes

Added ability to manage Cross-Cluster API keys. 

## Summary

- Redesigned API keys page to cater for different API key types: 
- **Personal API Key** - Allows external services to access the Elastic
Stack on behalf of a user.
- **Cross-Cluster API key** - Allows remote clusters to connect to your
local cluster.
- **Managed API key** - Created and managed by Kibana to correctly run
background tasks. (e.g. alerting / fleet)
- Redesigned Create/Update API key popup to allow adding Cross-Cluster
API keys.
- Redesigned View API key popup showing more information and added
feedback when API keys cannot be edited.

## Technical notes

- Refactored API key schemas and types throughout all API key related
routes, services and clients to create a single source of truth and stop
types going out of sync.
- Consolidated internal endpoints to simplify usage and reduce
unnecessary HTTP roundtrips.
- Migrated API Key form to Formik to more reliably manage state and to
simplify validation logic when toggling visibility of form elements.
- Broke out API key table and related primitives into separate reusable
components for a more cohesive design.

## Screenshots

### API keys page

<details>
  <summary>Before</summary>

<img width="1249" alt="Screenshot 2023-07-24 at 10 25 04"
src="eb122597-f138-4658-9141-fd76b3291751">
</details>

<details open>
  <summary>After</summary>

<img width="1159" alt="Screenshot 2023-07-23 at 17 01 24"
src="42be5002-235e-4785-83e3-eb4063ca75ba">
</details>

### Create Cross-Cluster API key flyover

<details>
  <summary>Before</summary>

<img width="1261" alt="Screenshot 2023-07-24 at 10 25 21"
src="9e3ddffc-e6ec-4c9a-aaa4-a20b0ecf4d51">
</details>

<details open>
  <summary>After</summary>

<img width="1172" alt="Screenshot 2023-07-23 at 17 06 41"
src="e6823c07-2154-4777-820f-a3bab9cabe0f">
</details>

### API key details flyover

<details>
  <summary>Before</summary>

<img width="1262" alt="Screenshot 2023-07-24 at 10 25 35"
src="212293f3-355b-40d3-a1d6-5eea9c61c1cf">
</details>

<details open>
  <summary>After</summary>

<img width="1260" alt="Screenshot 2023-07-24 at 10 34 01"
src="a5f561af-e415-49dd-9f3f-70250eb32ef7">
</details>

## Testing

### Conditions of satisfaction

1) The API Key management screen should be updated to allow the
different API Key types to be distinguished from one another.
2) Users with the elevated `manage_security` cluster privilege shall
have the ability to create & update RCS API Keys, as described in the
technical document provided by ES. This is a different privilege than
what the rest of the screen requires today.
3) API Key Invalidation will require the existing `manage_api_keys`
cluster privilege.
4) RCS API Keys are not available in the serverless offering, so these
changes should only be visible for the current offering.

Note: This functionality requires a true serverless ES instance - The
feature will not be hidden simply by running Kibana using serverless
flag

5) RCS API Keys require an `enterprise` license, and should not be
available for deployments with a lesser license level.
6) Any new APIs introduced on the Kibana side should be marked as
`internal`, for consistency with the rest of our API Key endpoints.
7) These RCS API Key changes must not be visible in the UI until support
for this is enabled in ES.
2023-08-07 18:24:00 +01:00
Giorgos Bamparopoulos
3a9deee959
[APM] Remove EuiPageTemplate from failure prompt (#162552)
Removes `EuiPageTemplate_Deprecated` from the failure prompt in infra
tab which is displayed if the fetch request for the infra attributes
fails.

### Before
<img width="1508" alt="image"
src="b1a51640-8c65-4f55-bfa2-6878357cd6ba">

### After
<img width="1521" alt="image"
src="b502b68e-28ca-44b8-a293-4173ae4eadbb">

### No data screen
<img width="1523" alt="image"
src="510102a2-89d9-4114-b5f7-92c2e536be31">

Closes https://github.com/elastic/kibana/issues/161415
2023-08-07 17:58:38 +01:00
Tiago Costa
ec3c7a4568
skip flaky suite (#90578) 2023-08-07 17:50:55 +01:00