Commit graph

65505 commits

Author SHA1 Message Date
Rudolf Meijering
fd1f1cb380 Merge branch 'main' into zdt-dynamic-batch-size 2023-08-01 15:44:06 +02:00
Jean-Louis Leysens
87ff936b34
Turn on internal API restriction for serverless tests (#162636)
## Summary

Since we already have some E2E tests running for serverless, this PR
turns on the internal API restriction flag to test whether our UI
functions _as such_ under these tests.

An alternative could be to have a specific smoke test for this, but it
seems this is thoroughly covered by piggy-backing off the existing set
of tests.

Blocks: https://github.com/elastic/kibana/pull/162149
2023-08-01 10:19:57 +02:00
Bree Hall
8c7c621205
[Cases] Replace EditableTitle component with EuiInlineEdit component (#162095)
Included in https://github.com/elastic/eui/issues/6778

Hi team! EUI recently released the EuiInlineEdit component and the Cases
page title was identified as a good candidate for the new component.
This PR is replaces the inner workings of the EditableTitle component
and replaces it with the new EuiInlineEdit component.

## Summary
Replace inner component within `EditableTitle` to use to the new
`EuiInlineEdit` component.


**Read Mode**
<img width="1116" alt="image"
src="c3aef300-7d7f-44cd-b0a2-da72ef8bedf9">

---

**Edit Mode**
<img width="1093" alt="image"
src="0567ea9b-29e4-4443-bcbe-7a45f09738ff">

---

**Insufficient Permissions**
<img width="1090" alt="image"
src="7a83ebc6-7319-415d-a4a8-015fd6f6893b">

---

**Error States**
<img width="1093" alt="image"
src="1e5360b0-4fe8-4a25-a5e2-d3b235fc6242">

<img width="1108" alt="image"
src="ecfdcdc5-9360-4d25-8a4b-7132ec2caa67">

---

**Release Phases**
<img width="1096" alt="image"
src="cb0ac70b-1ba2-4f3a-8966-25b38043c4a1">

<img width="1096" alt="image"
src="23597578-0a36-4190-8e84-804cecbbdf78">

---


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

### For maintainers

- [x] 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: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-08-01 10:07:25 +02:00
Nicolas Chaulet
8683621a65
[Fleet] Handle invalid old package in getPackages (#162832)
## Summary

Resolve https://github.com/elastic/kibana/issues/161768

Handle invalid old packages in the `getPackages` method, by ignoring and
logging a warning instead of crashing.

## Test

Tested by a unit test

How to manually reproduce? this can be reproduced by installing in 7.17
zscaler in version 0.1.2 then upgrade to 8.8.

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-08-01 10:02:23 +02:00
LikeTheSalad
6751324a80
Adding endpoint to upload android map files (#161252)
## Summary

We need a way to decode Android crash's stacktraces so that they can
provide meaningful insights to our customers, this is because, due to
security reasons, android apps tend to obfuscate their code before
publishing it online, making crash reports contain obfuscated names,
which don't make any sense before mapping them to the actual source code
names.

In order to help our customers deobfuscate their stacktraces, we need to
allow them to provide us with an R8 map file, which is generated by the
code obfuscation tool (R8) at compile time. This map file is needed to
later do the deobfuscation process.

So these code changes take care of adding a new endpoint that our
customers can use to upload their map files, similarly to what's
currently available to [RUM
Sourcemaps](https://www.elastic.co/guide/en/apm/guide/current/source-map-how-to.html#source-map-rum-upload),
the Android map files will be uploaded to ES, using the same index as
the one currently used to store RUM Sourcemaps.

There's a couple of reasons why a new endpoint to upload android maps is
needed instead of re-using the existing RUM Sourcemaps one:
* The Sourcemaps upload endpoint has validations in place to check the
sourcemap format, which must be a JSON with some expected keys
available. Android map files don't have a JSON format, so they are
rejected by the sourcemaps endpoint.
* Android map files tend to be large in size, just as an example, the
map file generated for our [sample
app](https://github.com/elastic/opbeans-android) has a size of ~7 MB, so
for real apps this number can be larger, which would also cause issues
with the RUM upload endpoint since it has a max file limit size of 1 MB.
* The RUM upload endpoint contains a parameter (`bundle_filepath `) that
doesn't have an equivalent for the android map use case.

This PR depends on https://github.com/elastic/kibana/pull/161152

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

### 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>
Co-authored-by: Søren Louv-Jansen <sorenlouv@gmail.com>
Co-authored-by: Brandon Morelli <bmorelli25@gmail.com>
Co-authored-by: Katerina Patticha <kate@kpatticha.com>
2023-08-01 09:06:59 +02:00
Ignacio Rivas
851f40c9fe
[Watcher] Fix search bug that crashes the app (#162687) 2023-08-01 09:04:07 +03:00
Kibana Machine
e9c0192493
[api-docs] 2023-08-01 Daily api_docs build (#162859)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/416
2023-08-01 00:56:39 -04:00
Kevin Delemme
757c881b9a
feat(slo): introduce new search capabilities (#162665) 2023-07-31 20:13:38 -04:00
Jon
1700e3e534
Bump types/tar to ^6.1.5 (#162833)
Needed for https://github.com/elastic/kibana/pull/162722 [type
fixes](https://buildkite.com/elastic/kibana-pull-request/builds/145674#01899dd0-5ec1-4e72-b6f3-92ecc6ccd51a/348-559).

7.17 is on version 4 of the types package. This upgrades to the latest
patch version on main before backporting.
2023-07-31 17:53:25 -05:00
Catherine Liu
e09da1dbf4
[Dashboard] Disables top nav actions when cloning or overlay is showing (#162091)
## Summary

Closes #162093.

This fixes a few UX bugs around top nav actions being available when
they shouldn't be. I noticed that we check for overlays in the top nav
buttons, but the dashboard container wasn't actually updating app state
when overlays were being opened and closed by nested embeddables.

Main changes:

- disables all top nav actions while cloning/save is in progress
- tracks overlay state in dashboard container when panel actions
open/close flyouts
- disables all top nav actions while flyout is open  

### 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-07-31 15:07:56 -07:00
Kurt
7770ccc19f
Removing 'showNavLinks' config option and displaying Avatar menu for serverless (#162140)
## Summary

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

The avatar menu needs to be displayed for serverless. It was previously
required to be hidden in serverless, so a config 'showNavLinks' was
added. This config is no longer needed, so it has been removed.

## Testing

Start KB with the `--serverless` flag and login as `elastic`.

The Avatar should appear in the top right coner.
2023-07-31 16:31:37 -04:00
Tiago Costa
f98172291a
chore(NA): disables FORCE_COLOR temporarily when executing node interpreter on the cloud artifacts deployment scripts (#162742)
Closes https://github.com/elastic/kibana/issues/162756

This PR fixes a problem introduced after the merge of
https://github.com/elastic/kibana/pull/160289

Looks like the behaviour of node regarding the use of the `FORCE_COLOR`
flag is now propagated differently when cashing the output of a given
node interpreter run in a bash variable which was affecting the script
and making it to fail when casting a number string to a number.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-31 20:57:21 +01:00
Jonathan Budzenski
96e6eb92f2 fix trailing comma lint error 2023-07-31 13:27:40 -05:00
Chris Cowan
b4c3ac31a9
[SLO] Applying consistent design to Histogram and Custom Metric forms (#162083)
## Summary

This PR cleans up the custom metric form by removing the EuiPanel
component and making the labels for the indicator component generic. I
also added headings and horizontal rules to distinguish between the two
different event types. For the histogram metric, I just added the
horizontal rules to provide more separation between the sub-parts of the
indicator.

### Custom metric form

<img width="652" alt="image"
src="a2aa99e5-c79c-4bd4-8d8b-3ae66d3f27c5">


### Histogram metric form

<img width="648" alt="image"
src="e2587f09-cd30-4b56-be0f-0c33e4efee42">
2023-07-31 11:05:58 -07:00
Quynh Nguyen (Quinn)
eebc0a4245
[ML] Add map view for models in Trained Models and expand support for models in Analytics map (#162443)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-07-31 11:01:09 -07:00
Ioana Tagirta
4d00959533
Search apps: Use the alias for the indices list (#162621)
## Summary

This changes the search apps UI to use the alias instead of the list of
indices that is stored in search apps.

Tested with https://github.com/elastic/elasticsearch/pull/98036

Some of the aspects of the UI can be improved, I will follow up with
@julianrosado with some ideas, but for now we are at least handling the
case where the alias is missing without having the UIs crashing, by
showing readable error messages.

When the alias is missing:
<img width="1265" alt="Screenshot 2023-07-31 at 17 02 46"
src="2aa5d3da-4dae-4eff-aff9-a38c221de673">

clicking on the list of indices when the alias is missing:

<img width="1562" alt="Screenshot 2023-07-31 at 17 07 27"
src="bb552833-f64e-4fe7-84f3-e237d40fa79b">

search preview:

<img width="1550" alt="Screenshot 2023-07-31 at 17 07 17"
src="402c8667-884d-4894-a7db-8cc1d9cf98b1">

content:

<img width="1553" alt="Screenshot 2023-07-31 at 17 03 53"
src="aa0a9261-5cab-46f3-a87d-6fa2d87d4b8f">

field capabilities (unchanged):

<img width="1557" alt="Screenshot 2023-07-31 at 17 04 00"
src="9812561f-53ec-497d-9b10-91c65271a503">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-31 13:59:03 -04:00
Kevin Logan
3efb83851f
[Security Solution] Skip file operations tests until ES permissions is fixed (#162787)
## Summary

Skip the broken File Operations tests until a permissions issue in ES is
fixed: https://github.com/elastic/kibana/issues/162760

### 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-07-31 10:18:36 -07:00
Youhei Sakurai
92db0d3936
Allow variable names with underscores (#162208)
Closes #162205

## Summary

With this PR, users will be able to define variables with names
containing underscores (`_`) like the below picture.


![image](d6aa0b4c-0c12-4fe7-ab3f-da0aa5cc8862)


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

### 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-07-31 10:14:21 -07:00
Alison Goryachev
db42331c0d
[ILM] Unskip API integration test (#162525) 2023-07-31 13:05:59 -04:00
Justin Kambic
235c6ec8cb
[Synthetics] Fix TS error for TS upgrade (#162822)
## Summary

Fixes the TS error encountered in
https://github.com/elastic/kibana/pull/162738 in the synthetics plugin.


### 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-07-31 10:02:24 -07:00
Tiago Costa
a1bc199488
skip flaky suites (#162813) 2023-07-31 17:10:42 +01:00
ruhshan
2d17d753ef
Update role mappings empty UI for consistency (#162357)
## Summary

Fixes #161137 

Update style of empty role mappings prompt to meet consistency.


![image](f419de0e-177a-4fac-aa36-1c6ec5f0d6c6)


Update icon of create api key button of empty api key  prompt.


![image](9b69e91a-9267-42d7-85f0-aca1507879af)


### Checklist

Delete any items that are not applicable to this PR.
- [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)


### 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>
Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>
2023-07-31 12:02:20 -04:00
Sander Philipse
7b2a00a712
[Serverless] Update left nav, disable ML alerts (#162728)
## Summary

This updates the left nav of Serverless Search to match the latest
designs, and disables ML alerting rules.

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-07-31 17:57:55 +02:00
Walter Rafelsberger
96de1482e0
[ML] @kbn/ml-response-stream: Fix race condition related to throttling. (#162803)
Fixes a race condition in the case where a response stream finishes and
sets `isRunning` to `false`, but `useThrottle` didn't trigger it's last
update yet within the refresh rate. In the case of log rate analysis,
`isRunning` could be set to `false` too early and the UI wouldn't
consider later throttled updates (for example, setting `loaded=1` which
would result in inconsistent UI state).

The fix in this case is to return the unthrottled raw data instead of
the throttled one as soon as the stream finished.
2023-07-31 17:39:25 +02:00
Rickyanto Ang
f0050dbc70
[Cloud Security][Onboarding]GCP Onboarding - Manual (IMPROVEMENTS) (#162434)
## Summary

Addressing PR Comments + Improvements from my previous PR
(https://github.com/elastic/kibana/pull/161913) in this PR
2023-07-31 08:38:59 -07:00
Adam Demjen
9900c0875c
[Enterprise Search] Switch ML inference config to use the multi field selector (#162657)
## Summary

Switching over to the multi field selector component for non-ELSER
pipelines.

We're also cleaning up obsolete code:
- Remove `sourceField`, `destinationField`, `inferenceConfig` references
- Remove generation of field mappings and full pipeline definition from
`sourceField` and `destinationField`


![field_config_non_elser](4f5910dc-1347-4293-8dbc-113d3c70b799)

Use cases tested manually:
- Create ELSER pipeline
- Create non-ELSER pipeline
- Create non-ELSER pipeline with custom target field name
- Attach ELSER pipeline
- Attach non-ELSER pipeline

### 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)
- ~[ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials~ - will do
in a separate 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-07-31 11:26:00 -04:00
Quynh Nguyen (Quinn)
0728003865
[ML] Add new Data comparison view (#161365)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-31 08:24:01 -07:00
Philippe Oberti
b0fbe9340c
[Security Solution] - expandable flyout - code owners (#162792) 2023-07-31 17:06:17 +02:00
Achyut Jhunjhunwala
5369eb32ab
[APM] Fix throwing appropriate error when user is missing necessary permission (#162466)
Closes https://github.com/elastic/kibana/issues/126078

Currently the 2 places where the user can create Agent Key already
handles the situation by not displaying the option to user with limited
permissions.

1. Observability - Settings
2. Stack Management -> API Keys

[Public
API](https://www.elastic.co/guide/en/kibana/current/agent-key-api.html)
is still available to create Agent Keys.

With this change the below would happen

### Request
```
curl -X POST "http://localhost:5601/{basePath}/api/apm/agent_keys" \
     -u editor:changeme \
     -H "Content-Type: application/json" \
     -H "Elastic-Api-Version: 2023-10-31" \
     -H "kbn-xsrf: true" \
     -d '{
        "name": "apm-key",
        "privileges": ["event:write", "config_agent:read"]
     }'
```
### Response
```
{
  "statusCode": 403,
  "error": "Forbidden",
  "message": "editor is missing the following requested privilege(s): config_agent:read, event:write and following cluster privileges - manage_api_key, manage_own_api_key privilege(s).    You might try with the superuser, or add the missing APM application privileges to the role of the authenticated user, eg.:\n    PUT /_security/role/my_role\n    {\n      ...\n      \"applications\": [{\n        \"application\": \"apm\",\n        \"privileges\": [\"config_agent:read\",\"event:write\"],\n        \"resources\": [*]\n      }],\n      ...\n    }",
  "attributes": {
    "data": {
      "missingPrivileges": [
        "config_agent:read",
        "event:write"
      ],
      "missingClusterPrivileges": [
        "manage_api_key",
        "manage_own_api_key"
      ]
    },
    "_inspect": [
      
    ]
  }
}
```
2023-07-31 08:01:23 -07:00
Clint Andrew Hall
832aec0a8e
[regression] Fix Storybooks after #161914 (#162757)
## Summary

As titled. This PR corrects a pair of mistakes I made before committing
#161914 that @dgieselaar identified shortly thereafter.

- I had tested Storybook extensively, but after I rebased, I changed the
render context, and I forgot to update the `decorator` in Storybook.
This meant Emotion styles worked, but the EUI styles were missing.
- In addition, when I rebased, I missed the addition of the utils cache
that had been added by EUI.
- Interestingly, #162365 missed adding the cache `meta` tag to the
template. Emotion simply added the styles to the `head`, but it's best
to reproduce what we see in Kibana. So I've corrected that, as well.
- While creating the PR, I went ahead and addressed
[feedback](https://github.com/elastic/kibana/pull/161914#discussion_r1277765276)
from @cee-chen on the original PR./

Sorry if anyone was confused by the sudden drop in styles in their
Storybooks. Should be resolved now. Thanks!

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-31 10:51:28 -04:00
Paul Tavares
90a882399a
[Security Solution][Serverless] Remove esArchive data load from Cypress test runner (#162797)
## Summary

- Remove esArchive load from Cypress runner (data should be loaded by
individual tests and not globally across all tests)
2023-07-31 07:49:40 -07:00
Ignacio Rivas
46a073f01b
Revert "[Remote Clusters] Clean up null properties depending on conection mode" (#162780)
Reverts elastic/kibana#162405
2023-07-31 17:41:40 +03:00
Saikat Sarkar
bf5c2703f9
[ELSER] Remove missing type hints related to the inference config (#162602)
This pr is related to issue:
https://github.com/elastic/enterprise-search-team/issues/4432

This change involves removing hints related to the inference_config
attribute

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-31 17:26:34 +03:00
Shahzad
fa01462487
[Synthetics] Clean up common dir (#162692) 2023-07-31 16:22:49 +02:00
Carlos Crespo
036751463d
[Infra UI] Chart load optimization (#162328)
Closes https://github.com/elastic/kibana/issues/161445

## Summary

This PR enhances the usage of the intersection observer to control the
loading behavior of charts, improving the performance, especially
noticeable during scrolling.


Before 


dfb1d7db-4ddb-41c3-b8ae-3b5bdf3fe36e



After


f348b0b9-4e6f-4163-9eb4-99daea91bbef


Besides, the intersection observer threshold has been set to 0, allowing
charts to start loading as soon as they begin to enter the viewport.


### How to test

- Start a local Kibana instance
- Navigate to `Infrastructure > Hosts`
- Scroll down and confirm that it's not laggy (same for the flyout)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-07-31 16:19:11 +02:00
Sandra G
0cc81d73f7
[Logs Shared] remove observability dependency (#162733)
After the obs ai assistant [moved to its own
plugin](https://github.com/elastic/kibana/pull/162243) outside the
observability plugin, logs_shared shouldn't need to depend on
observability

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-07-31 10:09:30 -04:00
Julia Rechkunova
770c4a2b53
[Discover] Fix grid styles to enable better wrapping (#162325)
Closes https://github.com/elastic/kibana/issues/162304

## Summary

This PR fixes the issue with cell content wrapping. Before it was just
cut off. Now it falls to the next line.

Please check that there is no regression for
https://github.com/elastic/kibana/pull/139449

Before:
<img width="600" alt="Screenshot 2023-07-20 at 15 03 16"
src="c91e0922-33a2-4008-a797-8f04f1b0b758">

After:
<img width="600" alt="Screenshot 2023-07-20 at 15 02 34"
src="754ee9f3-b33c-4c31-b27d-801e3fe89c78">


### Checklist

- [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-07-31 06:54:47 -07:00
Shahzad
4eac242818
[Synthetics] Implement private location run once (#162582)
## Summary

Implement private location run once mode , user will be able to do run
once or test now for private locations as well.

This implemented a task manager which will clean up temporarily created
package policies created for the purpose of run once and test now mode.


<img width="1718" alt="image"
src="e5ac3a52-516f-48eb-953f-fa573d825a57">
2023-07-31 15:53:40 +02:00
Aleh Zasypkin
2279dcec87
Re-enable security related tests related to the concurrent access token refresh. (#162693)
## Summary

Since https://github.com/elastic/elasticsearch/pull/98011 is merged, we
can re-enable our tests as soon as ES snapshot is promoted.

I run a few of these tests locally against Elasticsearch built from
source and they were passing.

__Fixes: https://github.com/elastic/kibana/issues/162581__
__Fixes: https://github.com/elastic/kibana/issues/162583__
__Fixes: https://github.com/elastic/kibana/issues/162584__
__Fixes: https://github.com/elastic/kibana/issues/162586__
2023-07-31 15:48:36 +02:00
Patryk Kopyciński
02a43a1dd0
Adjust cypress jobs config (#162729)
## Summary

Adjust cypress buildkite job configs

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-07-31 15:42:45 +02:00
Jean-Louis Leysens
1a30dfa526
[files] make download URL access: public (#162707)
This endpoint is used in `href`s and should continue to work without
require any special headers.
2023-07-31 15:32:01 +02:00
Achyut Jhunjhunwala
6b44fff5ac
[APM] Implementing Journey for APM (#162721)
## Summary

Closes - https://github.com/elastic/kibana/issues/153844

As part of this PR, as its just the stepping stone, we will only cover a
basic navigation flow and analyze the result obtained from Steps
Dashboard and data collected by the APM Agents for this journey

## Scope

- Generating a data set using Synthtrace instead of Archives
- Capturing the flow from Service Inventory to Trace Waterfall loading
on Transaction page
- Capturing Event loop utilisation metrics enabled for APM Journey

## How to run it

```
node scripts/run_performance.js --journey-path x-pack/performance/journeys/apm_service_inventory.ts --skip-warmup
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-31 14:27:12 +02:00
Alexi Doak
d5761dc0ea
[ResponseOps][Alerting] Flaky test x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/telemetry/index·ts (#161096)
Resolves https://github.com/elastic/kibana/issues/140973
Resolves https://github.com/elastic/kibana/issues/136153

## Summary

Fixes a telemetry bug and a flaky telemetry test

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


https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2717
x 250

https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2718
x 250
2023-07-31 08:09:49 -04:00
Alexi Doak
e66d949198
[ResponseOps][Alerting] Flaky test x-pack/plugins/event_log/server/es (#162558)
https://github.com/elastic/kibana/issues/156061

## Summary

Fixes flaky test by adding ceil(). When it fails the time elapsed is
close to the `MOCK_RETRY_DELAY` of 20 (like 19.7), so rounding up helps
with the flakiness
2023-07-31 08:08:21 -04:00
Yngrid Coello
d74d33f757
[APM] Improving overflow buckets documentation (#162774) 2023-07-31 14:01:44 +02:00
Anton Dosov
41af3d6c4d
Skip Serverless Observability Tests / serverless observability UI navigation active sidenav section is auto opened on load (#162782)
## Summary

skip https://github.com/elastic/kibana/issues/162781
2023-07-31 04:38:05 -07:00
amyjtechwriter
7ef303eb36
[DOCS]Adding ESS icon to xpack.security.session.сoncurrentSessions.maxSessi… (#162493)
`xpack.security.session.сoncurrentSessions.maxSessons` in Kibana docs.

## Summary

Adding the Elastic Cloud icon to
`xpack.security.session.сoncurrentSessions.maxSessons` security setting
on [docs
page](https://www.elastic.co/guide/en/kibana/current/security-settings-kb.html).
Need to raise another PR from cloud repo to add security setting to
[cloud docs
page](https://www.elastic.co/guide/en/cloud/current/ec-manage-kibana-settings.html#ec-kibana-config).

Relates to: #160958
2023-07-31 12:26:23 +01:00
Ievgen Sorokopud
8ca90fbfc3
[Security Solution] Legacy actions are deleted when user tries to save a rule and the run action interval is slower than rule run interval (#160798)
## Summary

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

With these changes we fix the legacy actions data loss (on migration)
issue. One of the first steps of the migration we retrieve legacy
actions and immediately delete them. Then we do validation which might
throw an exception and all legacy actions will be lost in this case.

As a solution we will do legacy actions validation before deleting them
and throwing exception in case those are broken. This means that in case
legacy action is broken user will need to export the rule, fix it
manually and import it again. Or just re-create it from scratch.


a23f5d43-3758-4ab7-8e63-bd93016e338d
2023-07-31 11:51:38 +02:00
Ievgen Sorokopud
9036b15be0
Flaky test: Detection rule telemetry #162407 (#162681)
## Summary

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

It looks like flakiness happens due to another rule from previous test
case being scheduled by alerting framework and running even after we
deleted it (since we called delete rule after it was scheduled). That
rule scheduled earlier produces some unexpected artifacts in metrics,
specifically `stats.detection_rules.detection_rule_status` where
occasionally see

<img width="1255" alt="Screenshot 2023-07-25 at 15 13 29"
src="5d1cc334-25b5-4bf2-8822-c9858a0b72bf">

Since, in this test case the rule is disabled, we should not see this
data.

As a fix, we decided to test against specific metrics attributes
`stats.detection_rules.detection_rule_usage` which we expect being
updated.
2023-07-31 11:43:54 +02:00
Thomas Watson
0e081d84f2
Upgrade eslint-plugin-jest from v24.5.0 to v27.2.3 (#162689) 2023-07-31 10:34:49 +02:00