Commit graph

83655 commits

Author SHA1 Message Date
Nick Partridge
a93aaeee97
[Lens][Datatable] Fix color mapping of transposed datatables (#208623)
## Summary

In #189895 we added logic to the `getColorCategories` util function to
handle transpose columns. This mistakenly assumed the first row of the
datatable would include all transposed column ids (i.e.
`${value}---${columnId}`). After closer analysis this case is only
present the in datatable rendering (i.e. `table_basic.tsx`), but in this
context we also have the original non-transposed datatable.

So to simplify this we revert this logic to not care about transposed
datatables. Now the color mappings are correctly assigned across **split
by** columns.

<img width="720" alt="image"
src="https://github.com/user-attachments/assets/c588930e-53b9-409f-a257-2c5be35aaa38"
/>

Fixes #208555

### 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
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

## Release note

Fixes an issue in Lens (#208555) Table where a split-by metric on a
terms rendered incorrect colors in table cells.

---------

Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
2025-02-05 07:07:26 +01:00
Ryland Herrick
39ec0a012f
[Security Solution][Detection Engine] EUI Tech Debt - Removes references to static EuiTheme variables (#208820)
## Summary

This PR is a followup to #205990, which removed references to all of the
deprecated/renamed EUI vars in preparation for 9.0. Here, we address
some of the non-critical tech debt related to the EUI refresh, namely
the [removal of static EUI
tokens](https://github.com/elastic/kibana/issues/199715#json-tokens)
from our codebase.

I made every attempt not to change any styles in this PR, except to
simplify CSS to produce an equivalent design. A common example of this
was removing a static `margin` or `padding` declaration referencing
`euiThemeVars.size*`, and swapping it with an equivalent `gutterSize`
prop on the `EuiFlexGroup` container, or with an `align-self` or other
equivalent flexbox directive.

## Screenshots of Areas Affected
The majority of changes here involved the Exception List/Item pages.
I've attached screenshots of their current layout for comparison/review:


<details>
  <summary>
    <h3>Rule Exceptions Tab</h3>
  </summary>
  <kbd>
    <h3>Before</h3>
<img width="1395" alt="Rule exceptions tab - before"
src="https://github.com/user-attachments/assets/db7a5487-7df3-4a5f-b88e-90ab34784970"
/>

  </kbd>
  <kbd>
    <h3>After</h3>
<img width="1421" alt="Rule exceptions tab - after"
src="https://github.com/user-attachments/assets/77cbdefc-cbec-4b9e-8436-197f2f2f6677"
/>

  </kbd>
</details>

<details>
  <summary>
    <h3>Shared Exception Lists</h3>
  </summary>
  <kbd>
<img width="1517" alt="Shared Exception Lists"
src="https://github.com/user-attachments/assets/5448dd65-60f7-470c-bf7a-7af75bb914fa"
/>

  </kbd>
</details>

<details>
  <summary>
    <h3>Shared Exception List Details</h3>
  </summary>
  <kbd>
<img width="1517" alt="Shared Exception List Details"
src="https://github.com/user-attachments/assets/6e03fef6-af58-40bb-98c5-188651a584cc"
/>

  </kbd>
</details>

<details>
  <summary>
    <h3>Threshold Input</h3>
  </summary>
  <kbd>
<img width="1046" alt="Threshold Input"
src="https://github.com/user-attachments/assets/28738857-6bdf-404f-a790-a9f4e66ff27a"
/>

  </kbd>
</details>



### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.


- [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] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-04 19:58:26 -06:00
Philippe Oberti
99aa76d7bc
[Timelines] remove ColumnToggle, Overflow and LoadingPanel deprecated and unused code (#206323)
## Summary

While working on replacing all `styled-components`with `@emotion/react`
I realized that there is some dead code in the Timelines plugin. Both
the `Overflow` and `ColumnToggle` components used in the `HoverActions`
code exported to other plugins are not used anywhere.

Moreover that `HoverConfig` logic has been deprecated for years now...

I thought about removing all the other hover action components
(`AddToTimeline`, `Copy`, `FilterIn` and `FilterOut`) but these are
currently in used in other plugins (`threat_intelligence` and
`kubernetes_security`) so the effort to replace these are a bit more
involved and will be done in a separate PR

This PR also removes an unused LoadingPanel component.

**No changes to the application are introduced in this PR!**
2025-02-04 16:46:24 -06:00
Tiago Costa
3efb101622
skip flaky suite (#208415) 2025-02-04 21:35:53 +00:00
Tiago Costa
1afe5ce2dd
skip flaky suite (#209010) 2025-02-04 21:32:30 +00:00
Tiago Costa
7c3f074e45
skip flaky suite (#208459) 2025-02-04 21:22:01 +00:00
Kibana Machine
7389b05690 skip failing test suite (#209008) 2025-02-05 08:18:32 +11:00
Kibana Machine
3e147d5908 skip failing test suite (#196462) 2025-02-05 08:17:31 +11:00
Nathan L Smith
6552b08638
Remove APM team from cypress ownership (#209666)
...in renovate.json
2025-02-04 21:05:32 +00:00
Bena Kansara
551d31b0ff
[Custom threshold/Metric threshold] Display No Data in Threshold breached component (#209561)
Resolves https://github.com/elastic/kibana/issues/196062
Fixes https://github.com/elastic/kibana/issues/209515

Displays "Alert when No Data" in Threshold breached component for no
data alerts

- ### Custom threshold alert details page
<img width="1643" alt="Screenshot 2025-02-04 at 3 55 32 PM"
src="https://github.com/user-attachments/assets/5fbf27d2-dcb5-40d1-b466-c8bcc2d700c9"
/>

- ### Metric threshold alert details page
<img width="1645" alt="Screenshot 2025-02-04 at 3 54 58 PM"
src="https://github.com/user-attachments/assets/8968c803-ff73-4f7d-8501-f6a1e7e16e8c"
/>
2025-02-04 21:03:48 +01:00
Julia
07557b686c
[ResponseOps] Move custom threshold rule params to the package (#208686)
Fixes: https://github.com/elastic/kibana/issues/195191

Move log threshold rule type params to the new package.

P.S.: I've moved function `validateKQLStringFilter` and test for it in
my previous PR: https://github.com/elastic/kibana/pull/205507

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-04 21:01:05 +01:00
Matthew Scherer
3d7ccc5544
Added max_file_size_bytes advanced option to malware for all OSs. (#209541)
## Summary

This adds an advanced option 

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] 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/src/platform/packages/shared/kbn-i18n/README.md)
- [x]
[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
- [ ] 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 was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks
This is an advanced option. No risks. 


### Release notes
[os].advanced.malware.max_file_size_bytes key was added to control the
maximum file size the endpoint will scan for malware.

---------

Co-authored-by: Daniel Ferullo <56368752+ferullo@users.noreply.github.com>
2025-02-04 14:49:35 -05:00
Davis Plumlee
6f55501a75
[Security Solution] Fixes threat field appearing as modified when reset to base version value (#208530)
**Fixes https://github.com/elastic/kibana/issues/208251**

## Summary

This bug was caused by the local generated MITRE data we have stored in
`x-pack/solutions/security/plugins/security_solution/public/detections/mitre/mitre_tactics_techniques.ts`
having an inconsistency in the way its reference urls were written
compared to the TRADE team's prebuilt rule packages. The trailing
backslash was present in the prebuilt rule packages (and added by
browsers) but not in the url field from the `.json` file we scrape the
MITRE data from in our script.

For example, this is the url from the script: 

```
https://attack.mitre.org/techniques/T1078/004
```

and this is the url directly from the rule package:

```
https://attack.mitre.org/techniques/T1078/004/
```

This PR adds a normalization function that adds a trailing backslash to
the comparison string for the diff algorithm if it doesn't already
exist.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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
2025-02-04 20:32:42 +01:00
Rodney Norris
5a18f66ed6
search: remove test log from indices plugin setup (#209342)
## Summary

remove test log from indices plugin setup
2025-02-04 14:23:25 -05:00
Nick Partridge
595406176f
[Charts] Fix borealis theme overrides (#209595)
## Summary

This removes an override that was applied to the charts theme prior to
updating the `Theme` in `@elastic/charts`. This is no longer needed and
is now using the wrong color.

## Release note

Fixes issue with `Amsterdam` theme where charts render with the
incorrect background color.
2025-02-04 19:54:19 +01:00
Christiane (Tina) Heiligers
bdc3470658
[UA] Update UI copy for batch reindex API (#209403)
fix https://github.com/elastic/kibana/issues/209081

Updates UI copy for the batch reindexing API only supporting indices.

Note to reviewers: There wasn't an entry for the translation id for
French.

---------

Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-04 18:27:55 +00:00
Alexi Doak
64936f504d
[Response Ops][Alerting] Get summary alert query returns hard-coded 100 alerts (#209025)
Resolves https://github.com/elastic/kibana/issues/208750

## Summary

Removes the hard-coded value in the summarized alerts query, and uses
the max alerts config instead.

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

### To verify

1. Set `xpack.alerting.rules.run.alerts.max` in kibana.yml and start
Kibana
2. Create a summary alerting rule
3. Verify that the size in the summary alert query is the same value as
the max alerts config
2025-02-04 09:57:29 -08:00
Julia Rechkunova
c53140036a
[Discover] Unskip Edit field flyout tests (#209271)
- Closes https://github.com/elastic/kibana/issues/193102

### Checklist

- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
2025-02-04 18:32:49 +01:00
Miriam
8fee85d841
[ObsUX] Skip flaky tests (#209500)
## Summary

Processes and Logs tabs test has been flaky for some time, after
different and numerous attempts to fix them we want to consider removing
them and convert them to component test.

This PR skips Processes tab as Logs tab was already skipped, and we
opened an issue make them component tests.
https://github.com/elastic/kibana/issues/209497

Closes: https://github.com/elastic/kibana/issues/192891 &
https://github.com/elastic/kibana/issues/203656
2025-02-04 17:26:10 +00:00
jennypavlova
eed02b930a
[Infra] Node details tests fix: wait for chart loading (#209544)
Closes #209227 

## Summary

This PR fixes a failed test: It was not possible to reproduce it locally
but I saw in the failed build that the page (chart) was still loading
when it failed so I added `waitForChartsToLoad` in the places where we
check the charts in the Overview tab.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-04 17:39:21 +01:00
Stratoula Kalafateli
48ed125d63
[ES|QL][Lens] Loads only one panel when the associated variables change (#208897)
## Summary

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


![meow](https://github.com/user-attachments/assets/a61c6f1e-fc13-4324-adc7-1a9b30d29df4)

### 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
2025-02-04 17:34:39 +01:00
Dima Arnautov
878ab41525
[ML] Fix flaky tests for cases attachments (#209143)
## Summary

Increases the timeout for the Cases model assertion to prevent flaky
behavior. The flaky tests runner passed 200/200 —hopefully, it is
stable now.

Closes https://github.com/elastic/kibana/issues/203675
Closes https://github.com/elastic/kibana/issues/202342
Closes https://github.com/elastic/kibana/issues/200836
Closes https://github.com/elastic/kibana/issues/196307
Closes https://github.com/elastic/kibana/issues/194168

### Checklist

- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
2025-02-04 16:58:07 +01:00
Jean-Louis Leysens
b8742125f5
[main] [UA] Preserve hidden status of original index during reindexing (#209512) (#209540)
Close https://github.com/elastic/kibana/issues/209471

# Backport

This will backport the following commits from `8.18` to `main`:
- [[UA] Preserve hidden status of original index during reindexing
(#209512)](https://github.com/elastic/kibana/pull/209512)

<!--- Backport version: 9.6.4 -->

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

<!--BACKPORT [{"author":{"name":"Jean-Louis
Leysens","email":"jeanlouis.leysens@elastic.co"},"sourceCommit":{"committedDate":"2025-02-04T13:20:51Z","message":"[UA]
Preserve hidden status of original index during reindexing
(#209512)","sha":"ed5b521cb491ccb4e1491190f221209de1c2a90f","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","Feature:Upgrade
Assistant","backport:skip"],"title":"[UA] Preserve hidden status of
original index during
reindexing","number":209512,"url":"https://github.com/elastic/kibana/pull/209512","mergeCommit":{"message":"[UA]
Preserve hidden status of original index during reindexing
(#209512)","sha":"ed5b521cb491ccb4e1491190f221209de1c2a90f"}},"sourceBranch":"8.18","suggestedTargetBranches":[],"targetPullRequestStates":[]}]
BACKPORT-->
2025-02-04 16:34:50 +01:00
Sergi Romeu
23d926f096
[Performance] Track performance telemetry in APM (#208561)
## Summary

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

This PR adds performance telemetry to the missing APM pages
2025-02-04 16:30:47 +01:00
Bailey Cash
df573d7596
[SLO]: require instance id in slo details schema (#209020)
## Summary

Resolves #180590

Since SLO instanceId is provided in all APIs, it will be made required
for sloWithDataResponseSchema and the SLOWithSummaryResponse type.
Checks for the existence of instanceId have either been removed or
changed to check for ALL_VALUE (`*`)

---------

Co-authored-by: Kevin Delemme <kevin.delemme@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-04 10:20:03 -05:00
Marco Liberati
f332644698
[Lens][Embeddable] Restore show missing dataView error message in case of missing datasource (#208363)
## Summary

Fixes #207428 

This PR restores the `Could not find data view xxxx` message when a
dataView referenced by the visualization is missing.
<img width="764" alt="Screenshot 2025-01-27 at 14 18 19"
src="https://github.com/user-attachments/assets/14ed86fc-f6db-4056-8517-2a14fe491541"
/>

### Checklist

Check the PR satisfies following conditions. 

- [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
2025-02-04 15:34:13 +01:00
Julian Gernun
771a080ffa
[Response Ops][Alerting] Feature flag for alert deletion settings (#209380)
## Summary

Closes https://github.com/elastic/kibana/issues/209256
2025-02-04 14:38:42 +01:00
Davis Plumlee
a5b4570cd8
[Security Solution] Normalizes filters field before rule diff comparison (#206344)
**Fixes: https://github.com/elastic/kibana/issues/202966**
**Fixes: https://github.com/elastic/kibana/issues/206527**

## Summary

The issue that causes the overarching problem mentioned in the ticket is
that we add an extra `alias: null` property to the filter via the kibana
filter utils instead of keeping the `alias` field unset. This is
functionally the same rule but since the prebuilt rule objects are
technically different (`alias` is set to `undefined` instead of `null`),
we mark these rules as customized and causes the query fields to show as
a modified field on update.

To address this, since changing the kibana util filter would be very
invasive and touching a lot of code, we instead normalize the field on
our side before version comparison. This fixes the bug reported and
improves resiliency of rule upgrades in the future.

### Testing (copied from ticket) 

- Ensure the `prebuiltRulesCustomizationEnabled` feature flag is enabled
- Allow internal APIs via adding `server.restrictInternalApis: false` to
`kibana.dev.yaml`
- Clear Elasticsearch data
- Run Elasticsearch and Kibana locally (do not open Kibana in a web
browser)
- Install an outdated version of the `security_detection_engine` Fleet
package
```bash
curl -X POST --user elastic:changeme  -H 'Content-Type: application/json' -H 'kbn-xsrf: 123' -H "elastic-api-version: 2023-10-31" -d '{"force":true}' http://localhost:5601/kbn/api/fleet/epm/packages/security_detection_engine/8.14.1
```

- Install prebuilt rules
```bash
curl -X POST --user elastic:changeme  -H 'Content-Type: application/json' -H 'kbn-xsrf: 123' -H "elastic-api-version: 1" -d '{"mode":"ALL_RULES"}' http://localhost:5601/kbn/internal/detection_engine/prebuilt_rules/installation/_perform
```

- Open a `threat_match` rule for editing. For example `Threat Intel Hash
Indicator Match` with rule_id `aab184d3-72b3-4639-b242-6597c99d8bca`.

With this fix, users should **NOT** see any extra fields in the rule
upgrade flyout, nor should the rule be marked as "Modified" if opened
and saved with no other modifications

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-04 13:40:52 +01:00
Kibana Machine
d9d6f52303
[ES|QL] Update grammars (#209230)
This PR updates the ES|QL grammars (lexer and parser) to match the
latest version in Elasticsearch.

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2025-02-04 13:29:26 +01:00
Faisal Kanout
ed333de757
[OBX-UX-MGMT][BUG] Fix chart in Custom Threshold rule when the field name has slashes (#209263)
## Summary

It fixes #201511

<img width="680" alt="Screenshot 2025-02-03 at 12 51 56"
src="https://github.com/user-attachments/assets/fe3fa780-c50d-4906-8c5b-6758fea5fe9c"
/>

### Release notes:
Fix the preview chart in the Custom Threshold rule creation form when
the field name has slashes
2025-02-04 13:18:27 +01:00
Achyut Jhunjhunwala
7e6fb93819
[Logs Explorer] Add redirect for old logs settings page (#209452)
## Summary

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

Added a redirect from old deprecated Logs Settings Page to Kibana
Advance Settings page

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-04 12:27:18 +01:00
Dima Arnautov
aa701fea85
[Inference] Add provider settings for Jina AI (#209275)
## Summary

Follow-up for https://github.com/elastic/kibana/pull/208227

Adds provider settings for Jina AI.

<img width="684" alt="image"
src="https://github.com/user-attachments/assets/06c8a8c7-95de-4129-a622-015aa1ad0820"
/>

### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-04 12:11:07 +01:00
Sebastián Zaffarano
e15d089b36
[Telemetry][Security Solution] Send new Endpoint field (#209149)
## Summary

Make the Security Solution `endpoint-meta-telemetry` task send the new
Endpoint field `Endpoint.metrics.top_process_trees`

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-04 11:49:25 +01:00
Elena Shostak
7adc337c5f
[Roles] Improved handling for operator-defined role mappings (#208710)
## Summary

Improved handling for operator-defined role mappings:

- Detail page with operator-defined role mappings is now marked with
lock icon and tooltip
- Operator-defined role mappings have a read-only experience.

<img width="1256" alt="Screenshot 2025-01-29 at 11 45 27"
src="https://github.com/user-attachments/assets/911dd2cd-4fe8-4141-8d8a-ffde974884d7"
/>
<img width="1234" alt="Screenshot 2025-01-28 at 15 21 44"
src="https://github.com/user-attachments/assets/d9a03431-f8da-471e-8c94-f504aa00623d"
/>

### How to test
1. Create a `settings.json` file in
`$ES_HOME/config/operator/settings.json`, and define some role mappings
there. Here's an example that will create 2 operator mappings:
```json
{
  "metadata": {
    "version": "1",
    "compatibility": "8.4.0"
  },
  "state": {
    "role_mappings": {
      "operator_role_mapping_1": {
        "enabled": true,
        "roles": [
          "kibana_user"
        ],
        "metadata": {
          "from_file": true
        },
        "rules": {
          "field": {
            "username": "role-mapping-test-user"
          }
        }
      },
      "operator_role_mapping_2": {
        "enabled": true,
        "roles": [
          "fleet_user"
        ],
        "metadata": {
          "from_file": true
        },
        "rules": {
          "field": {
            "username": "role-mapping-test-user"
          }
        }
      }
    }
  }
}
```
2. Navigate to `Role Mappings` page and check the UI has a read only
view.
3. Navigate to `Role Mappings Details` page and check the UI has a read
only view.

### 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/src/platform/packages/shared/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] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

__Closes: https://github.com/elastic/kibana/issues/194635__

### Release Notes
Improved handling for operator-defined role mappings

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-04 11:23:28 +01:00
Milosz Marcinkowski
2fd10dbabe
[APM] Fix missing exception stack trace (#208577)
Closes #203359

## Summary

Fix the incorrect condition that prevents an exception stack trace from
being displayed.

| before | after |
|-|-|
| <img width="2560" alt="Screenshot 2025-01-31 at 10 06 00"
src="https://github.com/user-attachments/assets/88656d5e-0964-4686-8a03-a07ab8459709"
/> | <img width="2560" alt="Screenshot 2025-01-31 at 10 06 38"
src="https://github.com/user-attachments/assets/037cbb98-d7cf-4388-8d94-80c32eb5b17f"
/> |

## AC:

- [x] Exception stack trace is displayed in APM,
- [x] Tested with native Otel collector,
- [x] ~~Wait until data ingestion is fixed and changes can be tested
with v8.16 and higher~~ (not applicable anymore).
2025-02-04 11:19:07 +01:00
Chris Cowan
2092c3d4ca
[Streams 🌊] Introduce GroupStreams (#208126)
## 🍒  Summary
 
This PR adds support to `/api/streams` endpoints for the
`GroupStreamDefinition` type. Group streams are simply a list of member
streams along with dashboards. An example of the definition looks like:

```JSON
{
  "name": "nginx-logs",
  "stream": {
    "grouped": {
      "description": "A collection of streams for Nginx",
      "members": [
        "logs",
        "logs.nginx"
      ]
    }
  },
  "dashboards": []
}
```
The following APIs support `GroupStreamDefinition`:

- `GET /api/streams`
- `GET /api/streams/{id}`
- `PUT /api/streams/{id}`
- `DELETE /api/streams/{id}`
- `GET /api/streams/{id}/_details`

This PR only includes the support to the APIs, I will submit a follow PR
for the UI.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
2025-02-04 11:12:35 +01:00
Maria Iriarte
bdf496b2e1
[lens][datatable] Remove eui datagrid styles (#204057)
## Summary

Removes additional styles to make table background transparent, as it
was directly removed in EUI v98.2.1-borealis.1.1
https://github.com/elastic/kibana/pull/204783.


### Checklist

<!--

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] 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
- [ ] 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 was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

-->

- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
2025-02-04 11:05:35 +01:00
Achyut Jhunjhunwala
032337332c
[Synthtrace] Fix synthtrace to work with 7.x clusters (#209447)
## Summary

While working on 9.x Upgrade testing, i found that when running
synthtrace scenarios pointing to a 7.x cluster, it tries to fetch the
latest version of the APM package. In 7.x, the `latestVersion` item was
present under a different node in the API response. Hence adding this
fix.
2025-02-04 10:25:00 +01:00
Gerard Soldevila
433fd8c799
SKA: Flag @kbn/observability-synthetics-test-data as devOnly (#209252)
## Summary

This package relies on devOnly packages, thus it must be devOnly too.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-04 09:50:36 +01:00
Ania Kowalska
fce8a27ed9
[DataDiscovery] Replace useEuiBackgroundColor with color tokens (#209336)
## Summary

Closes #208912 
All Data Discovery usages of deprecated useEuiBackgroundColor removed in
favor of color tokens


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

~~- [ ] 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/src/platform/packages/shared/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~~
~~- [ ] 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 was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.~~
~~- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed~~
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
2025-02-04 09:31:55 +01:00
jennypavlova
1f52febb1c
[Infra] Running processes missing from processes table (#209076)
Closes #184582

## Summary

This PR fixes an issue with processes missing from the processes table
and not being searchable.

- Additional fixes: The chart size was not set correctly and they were
not visible so it is fixed now:

| Before | After |
| ---- | ------ |
|
![image](https://github.com/user-attachments/assets/3bd0788d-a89e-4cac-84af-40f6cf101613)
|
![image](https://github.com/user-attachments/assets/21ebbdc0-fcfa-4de5-a7f4-cbe855eceb7a)
|

⚠️ _UPDATE_ I also updated the archive used in the API test with the one
we have for the e2e name (and matched the name with the old one) so we
have consistent results and also the correct fields / mappings

### Solution details

After some digging into the fields I ended up **not** using the
suggested `process.name` because it gave us too generic information for
the table (we should still use the command there) also tried the process
id but then the search by command won't work properly. So I found a
field that is not ignored and contains the same information called
`process.command_line`and used it:
<img width="538" alt="image"
src="https://github.com/user-attachments/assets/ce4d35a6-e912-4656-bee1-8137d5635432"
/>

## Testing

- Follow the steps in the issue inside `How to reproduce` to create the
two processes
- Note: in order to see the process summary, you need to enable it in
the config ( ⚠️ for the oblt hosts I checked it is not enabled and the
summary section showed N/A ) :

![image](https://github.com/user-attachments/assets/ffd5fa1c-d909-4ec1-ab35-99186fc8b5e3)


https://github.com/user-attachments/assets/41bdcc8d-6b87-4351-b866-2e706dd11dfd

 - The metrics charts should be visible
 - The search should work as expected:
   - And the missing.... process should be visible
2025-02-04 09:25:36 +01:00
Ignacio Rivas
7da9717dce
[Console] Fix typo in generated PR title (#209255) 2025-02-04 09:21:09 +01:00
Sonia Sanz Vivas
cd71daa560
[Ingest Pipelines] Avoid show empty object in error message (#209093)
Fixes: https://github.com/elastic/kibana/issues/206989

## Summary

It seems that for some error responses, ES returns a string with an
empty object instead of a message. This is happening, for instance, when
the error is `Not found`. This PR ensures that some message is shown, if
message is present, it shows the message. Otherwise it shows the error
cause.

### Screenshots
| With message | Without message |
| --- | --- |
| <img width="1264" alt="Screenshot 2025-01-31 at 12 57 23"
src="https://github.com/user-attachments/assets/5fd9dd08-393d-4f00-9194-e9d359199684"
/> | <img width="1268" alt="Screenshot 2025-01-31 at 12 54 11"
src="https://github.com/user-attachments/assets/ad2cbf5d-5e78-4e68-b4d3-1a16c9a3d009"
/> |
| <img width="1260" alt="Screenshot 2025-01-31 at 12 58 31"
src="https://github.com/user-attachments/assets/fe355b78-e3c8-43fb-a2bb-aaa900232df7"
/> | <img width="1258" alt="Screenshot 2025-01-31 at 12 30 15"
src="https://github.com/user-attachments/assets/477e9267-f684-4233-92b5-bba1743de00c"
/>|
<img width="637" alt="Screenshot 2025-01-31 at 12 58 42"
src="https://github.com/user-attachments/assets/fd217688-3735-4147-ba11-84d7ac5062af"
/> | <img width="1260" alt="Screenshot 2025-01-31 at 12 29 39"
src="https://github.com/user-attachments/assets/12034a08-a3a0-4ab8-bfd1-99e657c7bd68"
/> |
<img width="909" alt="Screenshot 2025-01-31 at 12 58 48"
src="https://github.com/user-attachments/assets/ce24ad2c-7076-4f33-9e16-2cd9c782ef4f"
/> | <img width="1264" alt="Screenshot 2025-01-31 at 12 59 07"
src="https://github.com/user-attachments/assets/f3ffee16-7307-4362-bcbd-0d8661ffb8f0"
/> |




### How to test it:
* Navigate to the edit form for a non-existing pipeline
`app/management/ingest/ingest_pipelines/edit/non-existin-pipeline`
* Navigate to the clone form for a non-existing pipeline
`app/management/ingest/ingest_pipelines/create/non-existin-pipeline`
2025-02-04 08:41:35 +01:00
Sonia Sanz Vivas
8d46aff46b
[Snapshot and restore] Avoid duplicated error messages (#209316)
Fixes https://github.com/elastic/kibana/issues/187065

## Summary
In the repository creation endpoint, when the validation failed, we were
showing duplicated errors. This was caused by how the validation schema
was build. This PR refactors the duplication schema so it doesn't
duplicate the nama field.

### How to test

* RunES with yarn es snapshot --license=trial -E
path.repo=/tmp/es-backups
* Navigate to repos list and try creating a new repo
* Fill the name input with an string longer than 1000 chars.
* Verify the error message when saving the repo is not duplicated

### Screenshot
<img width="1032" alt="Screenshot 2025-02-03 at 15 24 27"
src="https://github.com/user-attachments/assets/75231f68-a13e-44bf-8d8a-be488c9f25e5"
/>
2025-02-04 08:26:08 +01:00
Clint Andrew Hall
1f53a8484e
[chore][serverless] Remove dev-mode Project Switcher (#209144)
As titled. The Project Switcher was created in #155582 as a means of
allowing a developer to switch between project types without having to
restart Kibana. Since that first PR, Kibana *must* be started with a
particular project configuration in mind-- the switcher now does
nothing. This PR removes it and deprecates the config keys.
2025-02-04 05:55:21 +01:00
Elena Stoeva
2a56791b2c
[Index Management] Fix templates API integration tests (#209322)
Closes https://github.com/elastic/kibana/issues/209027

## Summary

This PR unskips and updates the Templates API integration tests to
reflect the recent changes to Elasticsearch
(https://github.com/elastic/elasticsearch/pull/121049). Previously, the
`cluster.logsdb.enabled` setting was always false by default in stateful
Kibana. With the new changes, it is true by default if the
`logsdb.prior_logs_usage` setting is false (which is the case for new
test clusters, hence the test failure), and true otherwise. Therefore,
we need to update the tests so that we test both cases.

Flaky test runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7829
2025-02-03 22:19:31 -06:00
elastic-renovate-prod[bot]
ff22f800f3
Update dependency react-reverse-portal to ^2.2.0 (main) (#209299)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[react-reverse-portal](https://togithub.com/httptoolkit/react-reverse-portal)
| dependencies | minor | [`^2.1.2` ->
`^2.2.0`](https://renovatebot.com/diffs/npm/react-reverse-portal/2.1.2/2.2.0)
|

---

### Release Notes

<details>
<summary>httptoolkit/react-reverse-portal
(react-reverse-portal)</summary>

###
[`v2.2.0`](https://togithub.com/httptoolkit/react-reverse-portal/compare/v2.1.2...v2.2.0)

[Compare
Source](https://togithub.com/httptoolkit/react-reverse-portal/compare/v2.1.2...v2.2.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOkRhdGFEaXNjb3ZlcnkiLCJiYWNrcG9ydDphbGwtb3BlbiIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2025-02-03 23:01:42 -04:00
Nathan Reese
0fee502ffc
[links] lazy load links actions (#208100)
Page load bundle is reduced by
* lazy load add panel action
* avoid importing `deserialize_from_library.ts` in page load bundle
* avoid loading `links_strings.ts` in page load bundle

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-03 19:40:26 -07:00
Alexi Doak
8bf657ec9d
[ResponseOps][mget] Poll for tasks less frequently when the task load doesn't need it (#200260)
Resolves https://github.com/elastic/kibana/issues/196584

## Summary

This PR updates the task poll interval logic for projects using the mget
strategy to optimize request loads to Elasticsearch, particularly for
smaller projects with low utilization. When task manager (TM)
utilization is below 25%, the poll interval will be set to 3 seconds
instead of the current 500 milliseconds. This change does not affect
projects utilizing `update_by_query`.

The existing backpressure logic remains unchanged for handling errors.
The only adjustment occurs in scenarios where there are no errors, the
TM utilization is below 25%, and the poll interval is less than 3
seconds. In such cases, the poll interval will increase to 3 seconds,
even if the backpressure logic has not fully reset the interval to its
original value.

I just chose 25%, but I am definitely open to other ideas.


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


### To verify

- Start Kibana and go to
`http://localhost:5601/api/task_manager/_health` and verify the poll
interval is 3s
- Create some alerting rules scheduled to run every second, and let them
run. I created 4 rules.
- Check `http://localhost:5601/api/task_manager/_health` again to verify
that with rules running the poll interval is back to 500ms. (It may take
a couple refreshes for the health api to reflect the changes)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-03 14:56:27 -08:00
Kenneth Kreindler
572e6656d1
[Security Solution] [AI Assistant] security assistant content references tour (#208775)
## Summary
Follow up to : https://github.com/elastic/kibana/pull/206683

This PR adds a tour that tells the user how to toggle citations on and
off and how to show and hide anonymized values.

### How to test:
- Enable feature flag: 
```yaml
# kibana.dev.yml
xpack.securitySolution.enableExperimental: ['contentReferencesEnabled']
```
- Launch the security AI assistant
- Now we need to get the assistant to reply with a message that contains
either anonymized values or citations. This is what triggers the tour.
To do this ask it a question about one of your KB documents or an alert
that contains anonymized properties or returns a citation.
- Once the assistant stream ends, the tour should appear 1 second later
(unless the knowledge base tour is open).

The tour will only appear one time per browser. To make it appear again,
clear the key
`elasticAssistant.anonymizedValuesAndCitationsTourCompleted` from local
storage.

Also fixes a
[typo](https://github.com/elastic/kibana/pull/208775/files#diff-e6ed566edfccebe7592cb2491ae0a601c2c54da879114e6100602b8b08099ca6R69).


https://github.com/user-attachments/assets/97fca992-d39d-43e7-8e73-a11daf7549ca


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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/src/platform/packages/shared/kbn-i18n/README.md)
- [x]
[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] 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 was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
2025-02-03 22:47:41 +00:00