Commit graph

81890 commits

Author SHA1 Message Date
Peter Pisljar
168e67d50d
[ES|QL] Supports custom formatters in charts (#201540) 2024-12-11 05:45:05 +01:00
Dima Arnautov
e3ec4771d1
[ML] Trained Models: Add a tech preview lable for rerank model (#203587)
## Summary

Adds a tech preview lable for the`.rerank-v1` model 

<img width="1365" alt="image"
src="https://github.com/user-attachments/assets/dd179f4b-f482-4b1d-beac-74ac3d374446">
2024-12-10 17:06:26 -06:00
Devin W. Hurley
35aeac1043
[Security Solution] Fixes exception item comment validation on newline chars \n (#202063)
## Summary

Fixes: https://github.com/elastic/kibana/issues/201820

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-10 17:19:32 -05:00
Nathan Reese
fb885eaeff
remove redux tools from presentation_utils plugin (#197891)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-10 15:08:01 -07:00
christineweng
5b6887dd3d
[Security Solution][Expandable flyout] Introducing Flyout history in document flyout (#184970)
## Summary

This PR introduced flyout history in expandable flyouts to keep tracked
of previously opened flyouts. The history button is available when
feature flag `newExpandableFlyoutNavigationEnabled` is enabled.

Flag is currently default `False` 

### Changes in
[kbn-expandable-flyout](https://github.com/elastic/kibana/tree/main/packages/kbn-expandable-flyout)
package

- When `openFlyout` is called, the **right** panel will be appended to
the `history` slice in redux.
- History can be accessed via `useExpandableFlyoutHistory` API


![image](https://github.com/user-attachments/assets/081d6d6f-3c10-40f0-8882-73bc8c275e68)


### Changes to expandable flyouts in security solution

- When feature flag is on, opening more than 1 flyout will show a
history icon. Currently max at 10 entries
- When user clicks a flyout from the history, it does not add on top on
history, instead the position will be moved up. There is no duplicate
entries.


![image](https://github.com/user-attachments/assets/3bc68519-5eea-4fb7-9386-f6688b28b525)

**To illustrate how ordering works:**
-> History: [host1, user1, alert1]
-> clicks alert1 
-> History: [alert1, host1, user1] 
Keep in mind this is slightly different in the actual implementation, as
we do not display the current entry (i.e. alert1 in this example)

### Other changes in order to support flyout history
- Added a preview panel for network. Previously we reused the panel for
both network flyout and network preview. A dedicated network preview
with out history is now available
- Replaced `openRightPanel` with `openFlyout` in applicable places
- Added `isPreview` and `isPreviewMode` checks in EA flyouts

## How to test
- Enable feature flag `newExpandableFlyoutNavigationEnabled`

<details>
<summary>  Alerts page</summary>
Available for alert, host, user, rule name and ip's
<img
src="https://github.com/user-attachments/assets/e74a6444-763f-4e18-8370-f6c0c83e0d4c"
/>
</details>

<details>
<summary>  Explore pages (event table)</summary>
Available for events, host, user, rule name and ip's
<img
src="https://github.com/user-attachments/assets/d2b9f0b9-a788-4174-bc80-8ac9c51fb16a"
/>
</details>

<details>
<summary>  Cases</summary>
Note: the rule and entity link still go to a page, this will be
addressed in a separate PR
<img
src="https://github.com/user-attachments/assets/fa7a5c86-d1e3-4dad-80ed-405c52efc486"
/>
</details>


<details>
<summary>  Discover in severless</summary>
- enable `discover.experimental.enabledProfiles:
['security-root-profile']`
<img
src="https://github.com/user-attachments/assets/ebd5de5d-1ed3-42ad-bb6f-1beccdc48e62"
/>
</details>

<details>
<summary> Disabled in alert preview </summary>
<img
src="https://github.com/user-attachments/assets/53e82ded-0db8-4639-afa1-c5cf224cf193"
/>
</details>

<details>
<summary> Disabled in preview mode </summary>
<img
src="https://github.com/user-attachments/assets/a12b741f-2558-4fb5-852f-282af6e10f93"
/>
</details>


## WIP
- [x] Investigate performance with process history
- [ ] Final ui of the entries - pending UIUX team


### 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)
- [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
2024-12-10 15:43:28 -06:00
Samiul Monir
a5c9ed7bb8
Support incoming Preconfigured Endpoints (#203473)
## Summary

Currently, the FTR tests are written to expect only two preconfigured
endpoints. However, there might be more incoming, and this PR
generalizes these tests so they do not depend on the number of
preconfigured endpoints in the future.



### 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/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: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-10 16:09:31 -05:00
Nathan Reese
d67681d519
[dashboard] remove legacy embeddable client migrations (#203669)
Part of https://github.com/elastic/kibana/issues/203250
2024-12-10 13:41:18 -07:00
Lukas Olson
5acba9678a
Add error handling/retry logic for search source alert tests (#196443)
## Summary

Resolves https://github.com/elastic/kibana/issues/193842.

Adds error handling & retry logic for search source alerts that are
causing failures on MKI.

### Checklist

- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
2024-12-10 13:27:36 -07:00
Jeramy Soucy
75760bbb13
Upgrade express 4.21.1→ 4.21.2 (#203504)
## Summary

Upgrade `express` from v4.21.1 to v4.21.2
2024-12-10 14:42:27 -05:00
Tiago Costa
b211bfd6c7
skip flaky suite (#187932) 2024-12-10 19:03:56 +00:00
Tiago Costa
53d0ad2b6c
skip flaky suite (#203656) 2024-12-10 19:02:25 +00:00
Alejandro Fernández Haro
15f453bc4e
[l10n] Fix codeowners (#203650)
## Summary

Updating codeowners to ensure that we don't trigger code reviews from
`@elastic/kibana-localization` when labels are updated.
2024-12-10 12:55:32 -06:00
Tiago Costa
c787e4192a
skip flaky suite (#192891) 2024-12-10 18:22:14 +00:00
Nathan Reese
8ee4b49728
remove reactEmbeddableRegistryHasKey usage from observability_solution plugins (#203249)
Part of https://github.com/elastic/kibana/issues/203250

All embeddables have been converted to new embeddable system. Now its
time to clean-up the legacy embeddable system. Part of that clean up
involves removing usage of `reactEmbeddableRegistryHasKey`.

This PR removes `reactEmbeddableRegistryHasKey` from
observability_solution plugins

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-10 11:19:09 -07:00
Joe Reuter
1e29e6caff
🌊 Streams: Fix redirect bug (#203640)
As discussed here:
https://github.com/elastic/kibana/pull/202372#discussion_r1875857095

There is a bug redirecting the user away from any management tab but
`route`. This was happening because while loading the definition it
would behave as if the stream is unmanaged. This fixes this problem.
2024-12-10 12:07:55 -06:00
Saikat Sarkar
7ca3b8e857
[Ent Search Deprecation] Remove permission check for capabilities catalogue (#202060)
This change is related to removing the permission check for capabilities
catalogue in enterprise search.

This PR resolves this
[issue](https://github.com/elastic/search-team/issues/8521).

### Description
Currently, this
[line](01de887060/x-pack/plugins/enterprise_search/server/plugin.ts (L234))
is registering kibana capabilities for app search and workplace search.
Enterprise search has it's own RBAC and this registration is an
extension of kibana's RBAC. Once we get rid of enterprisesearch nodes,
we do not need this any more.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-10 11:51:28 -06:00
Nathan Reese
80f915f9e3
[embeddable] remove EmbeddableRenderer and embeddable stories (#203007)
PR starts cleaning up legacy embeddable components by removing
EmbeddableRenderer, EmbedddableRoot, and embeddable story books.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Anton Dosov <dosantappdev@gmail.com>
2024-12-10 10:38:28 -07:00
Kurt
4d9a70f48e
Skipping readonly/no access test for FIPS pipeline since the overrides cause it to fail (#202719)
## Summary

The FIPS pipeline runs all tests as a privileged superuser, some tests
that check privileges fail and should be skipped for this pipeline

The FIPS pipeline runs all test with a trial license, some tests that
verify premium functionality vs basic should be skipped for this
pipeline

## FIPS Pipeline run for this branch
https://buildkite.com/elastic/kibana-fips/builds/304
2024-12-10 11:32:11 -06:00
Nathan Reese
da93119780
remove reactEmbeddableRegistryHasKey usage from canvas (#203256)
Part of https://github.com/elastic/kibana/issues/203250

Removes `reactEmbeddableRegistryHasKey` usage from canvas

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-10 10:26:45 -07:00
Tre
e706b6689d
[Ownership] Print owner match also, not just owner (#202704)
## Summary

Resolves: https://github.com/elastic/kibana/issues/202666

## For reviewers
To see the change, run this:
`node scripts/get_owners_for_file.js --file
test/functional/apps/console/_autocomplete.ts`
### Results:
#### Before
```
 succ elastic/kibana-management
```
#### After
```
 succ Found matching entry in .github/CODEOWNERS:
      test/functional/apps/console/*.ts elastic/kibana-management
```

---------

Co-authored-by: Robert Oskamp <traeluki@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: David Olaru <dolaru@elastic.co>
2024-12-10 11:15:13 -06:00
Hannah Mudge
2a76fe3ee4
[Dashboard] [Collapsable Panels] Add embeddable support (#198413)
Closes https://github.com/elastic/kibana/issues/190379

## Summary

This PR switches the example grid layout app to render embeddables as
panels rather than the simplified mock panel we were using previously.
In doing so, I had to add the ability for custom panels to add a custom
drag handle via the `renderPanelContents` callback - this required
adding a `setDragHandles` callback to the `ReactEmbeddableRenderer` that
could be passed down to the `PresentationPanel` component.




https://github.com/user-attachments/assets/9e2c68f9-34af-4360-a978-9113701a5ea2



#### New scroll behaviour

In https://github.com/elastic/kibana/pull/201867, I introduced a small
"ease" to the auto-scroll effect that happens when you drag a panel to
the top or bottom of the window. However, in that PR, I was using the
`smooth` scrolling behaviour, which unfortunately became **very**
jittery once I switched to embeddables rather than simple panels
(specifically in Chrome - it worked fine in Firefox).

The only way to prevent this jittery scroll was to switch to the default
scroll behaviour, but this lead to a very **abrupt** stop when the
scrollbar reached the top and/or bottom of the page - so, to give the
same "gentle" stop that the `smooth` scroll had, I decided to recreate
this effect by adding a slow down "ease" when close to the top or bottom
of the page:


https://github.com/user-attachments/assets/cb7bf03f-4a9e-4446-be4f-8f54c0bc88ac

This effect is accomplished via the parabola formula `y = a(x-h)2 + k`
and can be roughly visualized with the following, which shows that the
"speed up" ease happens at a much slower pace than the "slow down" ease:


![image](https://github.com/user-attachments/assets/02b4389c-fe78-448d-9c02-c4ec5e722d5e)




#### Notes about parent changes
As I investigated improving the efficiency of the grid layout with
embeddables, one of the main things I noticed was that the grid panel
was **always** remounted when moving a panel from one collapsible
section to another. This lead me (and @ThomThomson) down a rabbit hole
of React-reparenting, and we explored a few different options to see if
we could change the parent of a component **without** having it remount.

In summary, after various experiments and a whole bunch of research, we
determined that, due to the reconciliation of the React tree, this is
unfortunately impossible. So our priorities will instead have to move to
making the remount of `ReactEmbeddableRenderer` **as efficient as
possible** via caching, since the remount is inevitable.

### Checklist

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

There are no risks to this PR, since the most significant work is
contained in the `examples` plugin. Some changes were made to the
presentation panel to allow for custom drag handles, but this isn't
actually used in Dashboard - so for now, this code is only called in the
example plugin, as well.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-10 11:14:31 -06:00
Rodney Norris
91337c74a3
[Search] Basic RBAC for Search Applications & Behavioral Analytics (#203335)
## Summary

Moved Search Applications & Behavioral Analytics from the base
KibanaFeature to their own so that they can be controlled independently
from other parts of the search solution.

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-10 11:12:29 -06:00
Walter Rafelsberger
2fb9ef4ba0
[ML] Borealis theme fixes (success colors) (#202430)
## Summary

All usages of "success" colors have been updated to "accentSecondary"
and "textAccentSecondary" as needed.

Recommend to review with white-space changes skipped:
https://github.com/elastic/kibana/pull/202430/files?w=1

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

### Identify risks

- Risk of some visual glitches because of oversights
2024-12-10 17:55:13 +01:00
Carlos Crespo
cc6dc2ac2b
[APM][Profiling] Add x-elastic-internal-origin: Kibana header to agentless axios (#203590)
closes [203571](https://github.com/elastic/kibana/issues/203571)

## Summary

Kibana 9.0 requires all request made with `axios` have the request
header `x-elastic-internal-origin` set to `Kibana` to avoid appearing as
an “external” integration. Any [requests without it will be blocked in
Kibana
9.0](https://docs.google.com/document/d/1W7csjn6QYjrBjmbXMzSz_JUD4KcmWz8jTTtAWFwgUJM/edit?tab=t.0#heading=h.brxkig5phxcz)
2024-12-10 17:52:33 +01:00
Giorgos Bamparopoulos
7e2f67ebc5
[Stack Monitoring] Remove 'observability' and 'observabilityShared' plugin dependencies (#203492)
### Summary
A recent [bug](https://github.com/elastic/kibana/issues/199902) that
affected some of the pages in Stack Monitoring was caused by changes
related to the locators of the logs-related apps.

The goal of this PR is to reduce the number of Observability
dependencies that could potentially cause issues in the app by removing
the `observability` and `observabilityShared` plugin dependencies from
the `monitoring` plugin.

Currently, the `monitoring` plugin is [categorised as
observability](https://github.com/elastic/kibana/blob/main/x-pack/plugins/monitoring/kibana.jsonc#L7)
but when the dependency on the `infra` plugin is removed, it can be
marked as a `platform` plugin.

### Notes for reviewers
- The components used to render the header menu as well as the
[use_track_metric](https://github.com/elastic/kibana/pull/203492/files#diff-7e39fc60ca80ee551d824ca97f9f879e3364a368a5736cf9178b5943a12ca7a7)
hook were copied from the `observabilityShared` plugin
- There should be no UX and functionality changes in the stack
monitoring header
- Usage collection could be verified by searching for UI counters sent
by the cluster created for this PR, once telemetry has been sent

### Testing
The stateful environment deployed by this PR includes logs and metrics
for stack monitoring. Please make sure to select a larger time range
(e.g. last 14 days).

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-10 16:43:49 +00:00
Gonçalo Rica Pais da Silva
305bb1b887
[Infra][ObsUX] Hosts & Container Logs only overview (#202992)
## Summary

Enables a logs only overview for hosts & containers. Disables the
metrics tab as there's no data incoming for metrics, and provides Logs
charts on the overview page detailing the Log Rate (all logs generated)
and Log Error Rate (all recorded errors).


https://github.com/user-attachments/assets/ced14b6d-dd08-4514-9066-6c02c62d5ff8

Closes #201752

## How to test

This is tested using synthtrace data, loading the scenario below:

```
node scripts/synthtrace traces_logs_entities.ts --live
```

This loads a logs-only host, though if other scenarios contain logs only
containers, feel free to use those as well.

* Go to Inventory page. Click on a host or container.
* If it is a logs only host/container, no metrics tab should be shown.
Metrics KPI charts should be replaced with Logs KPI charts (Log Rate and
Log Error Rate).
* If the host/container contains metrics, the metrics tab should be
visible and the normal Metrics KPI charts should be present.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-10 17:38:19 +01:00
Rodney Norris
65b00793d5
[Search] fix: ensure App Search is used for classic nav link name (#203490)
## Summary

Ensure "App Search" is the name for the app search nav link in classic
mode over "Engines" which is the label for the navLink (deepLink)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-10 10:31:08 -06:00
Georgiana-Andreea Onoleață
5a67a033a3
[ResponseOps][Serverless]Maintenance window page displays dead breadcrumb for management (#201147)
Closes https://github.com/elastic/kibana/issues/189318

## Summary

- the issue was resolved by using
useKibana.services.serverless.setBreadcrumbs instead of
chrome.setBreadcrumbs, this ensures that breadcrumb functionality is
correctly handled within serverless observability.



https://github.com/user-attachments/assets/d805b54f-74b4-424f-8304-dced09718ebb
2024-12-10 18:13:43 +02:00
Faisal Kanout
1c6b356fc5
[OBS-UX-MGTM][Uptime] Change API access to new authz authorization paradigm (#203415)
## Summary

It fixes #203319
And mostly covered by https://github.com/elastic/kibana/pull/198374
2024-12-10 17:00:43 +01:00
Saikat Sarkar
a3d9fe34b4
[Ent Search Deprecation] Update enterprise_search URLs for Elasticsearch->Build (#202371)
This change is related to this
[issue](https://github.com/elastic/search-team/issues/7961). This PR
replaces 'enterprise_search' with 'elasticsearch' in all urls for
Elasticsearch->Build. In the PR, we replaced the following URLs.

| Old URL | New URL |
| :------------------------------------- |
:------------------------------------- |
| app/enterprise_search/applications/search_applications |
app/elasticsearch/applications/search_applications |
| app/enterprise_search/analytics | app/elasticsearch/analytics |



https://github.com/user-attachments/assets/e7b6ba66-e47b-4d99-8edc-37a9d30edc69

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-10 08:55:15 -07:00
Saikat Sarkar
9df6f37654
[Ent Search Deprecation] Update enterprise_search URLs for elasticsearch -> getting_started (#203177)
This PR resolves this
https://github.com/elastic/search-team/issues/7961. In this PR, we
changed the following Urls by replacing 'enterprise_search' with
'elasticsearch'.


| Old URL | New URL |
| :------------------------------------- |
:------------------------------------- |
| app/enterprise_search/elasticsearch | app/elasticsearch/elasticsearch
|
| app/enterprise_search/vector_search | app/elasticsearch/vector_search
|
| app/enterprise_search/semantic_search |
app/elasticsearch/semantic_search |
| app/enterprise_search/ai_search | app/elasticsearch/ai_search |

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-10 08:54:43 -07:00
Saarika Bhasi
4b0c0e9269
[Index management] Fix a11y focus order in index mappings page (#203361)
## Summary

Fix a11y focus order in index mappings page. When new field is in
pending state and after closing edit pending field Flyout.


https://github.com/user-attachments/assets/dbdf59e5-0ebd-47e0-9b5e-19ab1556e771

### Test instructions 
#### Adding a field
1. Add new field in index mappings page by navigating via tab 
2. Notice that type fields combo box is focused
3. Add field and click to Add field button again with in pending fields
form
4. Notice focus is on new create field form

#### Edit field in pending state
1. Add new fields via tab key
2. click on edit field 
3. Try closing, updating and cancelling in the edit field flyout form
4. Notice after edit field flyout is closed, focus is on the pending
fields form
2024-12-10 10:46:20 -05:00
Marco Vettorello
6e57a23d18
[Lens] Fix missing embeddable panel titles (#203355)
## Summary

When using the new Custom Lens embeddable component, the titles are
hidden by default due to to a regression introduced in
https://github.com/elastic/kibana/pull/186642.
This PR should fix the correct title handling of the header visibility
by hiding or showing the wrapping Panel title depending on the
`hidePanelTitles` props of the `LensRenderer` component


fix https://github.com/elastic/kibana/issues/203354
2024-12-10 09:39:15 -06:00
Nathan Reese
101e797e9d
Remove dashboard embeddable (#194892)
Closes https://github.com/elastic/kibana/issues/197281

PR replaces `DashboardContainer`, which implements legacy Container and
Embeddable interfaces, with plain old javascript object implementation
returned from `getDashboardApi`.

The following are out of scope for this PR and will be accomplished at a
later time:
1) re-factoring dashboard folder structure
2) removing all uses of Embeddable and EmbeddableInput types
3) removing legacy types like DashboardContainerInput

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>
Co-authored-by: Devon Thomson <devon.thomson@elastic.co>
2024-12-10 09:34:04 -06:00
Kibana Machine
8477dc7af4
Authorized route migration for routes owned by @elastic/security-generative-ai (#198192)
### Authz API migration for authorized routes

This PR migrates `access:<privilege>` tags used in route definitions to
new security configuration.
Please refer to the documentation for more information: [Authorization
API](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization)

### **Before migration:**
Access control tags were defined in the `options` object of the route:

```ts
router.get({
  path: '/api/path',
  options: {
    tags: ['access:<privilege_1>', 'access:<privilege_2>'],
  },
  ...
}, handler);
```

### **After migration:**
Tags have been replaced with the more robust
`security.authz.requiredPrivileges` field under `security`:

```ts
router.get({
  path: '/api/path',
  security: {
    authz: {
      requiredPrivileges: ['<privilege_1>', '<privilege_2>'],
    },
  },
  ...
}, handler);
```

### What to do next?
1. Review the changes in this PR.
2. You might need to update your tests to reflect the new security
configuration:
  - If you have tests that rely on checking `access` tags.
  - If you have snapshot tests that include the route definition.
- If you have FTR tests that rely on checking unauthorized error
message. The error message changed to also include missing privileges.

## Any questions?
If you have any questions or need help with API authorization, please
reach out to the `@elastic/kibana-security` team.

---------

Co-authored-by: Andrew Macri <andrew.macri@elastic.co>
2024-12-10 10:30:42 -05:00
Ersin Erdal
7aa80ce530
Handle cluster_block_exception during reindexing the TM index (#201297)
Resolves: https://github.com/elastic/response-ops-team/issues/249

This PR increases task claiming interval in case of
`cluster_block_exception` to avoid generating too many error during TM
index reindexing.

## To verify:

- Run your local Kibana,
- Create a user with `kibana_system` and `kibana_admin` roles
- Logout and login with your new user
- Use below request to put a write block on TM index.
   `PUT /.kibana_task_manager_9.0.0_001/_block/write`
- Observe the error messages and their occurring interval on your
terminal.
- Use below request on the Kibana console to halt write block.
```
PUT /.kibana_task_manager_9.0.0_001/_settings
{
  "index": {
    "blocks.write": false
  }
}
```
2024-12-10 16:17:27 +01:00
Pablo Machado
bd70664bd1
[SecuritySolution] Fix serviceEntityStoreEnabled experimental flag initial value (#203573)
## Summary

Fix serviceEntityStoreEnabled experimental flag initial value.
2024-12-10 09:15:19 -06:00
Khristinin Nikita
36a36b44e0
Fix list item refresh issue (#202194)
## Fix refresh issue for serverless

If use only have `write` and `read` privileges `refresh=true` don't
work, because it require at least `maintenance`

For creation it's easy to change to `wait_for` and it will work.

For delete endpoint I implement the same technique as is used in
deleting lists.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Ryland Herrick <ryalnd@gmail.com>
2024-12-10 09:02:19 -06:00
Nicolas Chaulet
ebcbb0b26e
[Fleet] Allow readonly user to access /agent_policies_spaces API (#203434) 2024-12-10 10:00:50 -05:00
Shahzad
9089dbebca
[Synthetics] Update e2e flaky test !! (#203397)
## Summary

Update e2e flaky test !!
2024-12-10 15:28:00 +01:00
Larry Gregory
561eff3bf5
Dependency ownership for Kibana Security team, part 1 (#203456)
## Summary

This updates our `renovate.json` configuration to mark the Kibana
Security team as owners of their set of dependencies.
2024-12-10 08:27:32 -06:00
Tomasz Ciecierski
9b27804a9b
[EDR Workflows] Add RunScript CS Command - UI (#202012) 2024-12-10 15:02:12 +01:00
Kenneth Kreindler
2818a7cc5a
[Security Assistant] Fix animation border color of security AI assistant (#202319)
## Summary

**Resolves: https://github.com/elastic/kibana/issues/186135**

Changes:
- Update border color of animated border of the security AI assistance
icon from `euiColorPrimary` to `euiBorderColor`.

Old border color:
<img width="182" alt="image"
src="https://github.com/user-attachments/assets/a41a7859-3f9a-488c-bd4f-2ed25a52a481">

New border color:
<img width="169" alt="image"
src="https://github.com/user-attachments/assets/c7e1fa13-adb0-4014-950f-ae643e4e1d6d">
<img width="347" alt="image"
src="https://github.com/user-attachments/assets/8fba05e2-2a5b-48b2-b367-a58162cdaa9e">

New animated:
![Nov-29-2024
13-58-11](https://github.com/user-attachments/assets/2eaaf5a0-9bc2-4d84-9625-11ed7902c2c8)


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

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

No

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

- [X] [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>
2024-12-10 13:43:13 +00:00
Carlos Crespo
1a20fda702
[Infra] Fix call to service api (#203451)
fixes [203389](https://github.com/elastic/kibana/issues/203389)
## Summary

Fix the call to `/api/infra/services` when using a relative date range


![service_api_relative_date_range](https://github.com/user-attachments/assets/772bba2c-07c8-4031-8d8a-61bdc7ab6d70)


### How to test
- Navigate to host detail view, and change the data picker to use
relative dates
- Click on Submit
2024-12-10 14:33:32 +01:00
Walter Rafelsberger
13c5722dae
[ML] Rename "Logs AIOps" panel section "Log analysis" (#203375)
## Summary

Renames the "Logs AIOps" embeddable panel section to "Log analysis".

![image](https://github.com/user-attachments/assets/ea946962-a9bf-4a7f-817d-9a6fbc6e5349)


### 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
2024-12-10 14:30:14 +01:00
Mykola Harmash
6cb14302a1
[Observability Onboarding] Show existing data callout in Firehose flow (#203072)
Closes https://github.com/elastic/kibana/issues/190795

Adds the logic to display a message to the user in case there is already
an existing Firehose data in their cluster and to show the identified
AWS services in the "Visualize Data" step right away without waiting for
the window to loose focus first.

![CleanShot 2024-12-05 at 11 50
59@2x](https://github.com/user-attachments/assets/00653bf0-f711-4029-9011-a34a160b4b9b)


## How to test

1. Open the Firehose flow
2. Make sure there is no callout and the third step is not active
3. Go to Kibana dev console and ingest some dummy data (see examples
bellow)
4. Refresh the page with the Firehose flow
5. make sure there is a callout and the third steps shows the identified
AWS service

```
POST logs-aws.apigateway_logs-default/_doc
{
  "@timestamp": "2024-11-25T13:32:01.000Z",
  "some": 111,
  "aws.kinesis.name": "Elastic-CloudwatchLogs"
}

POST metrics-aws.apigateway_metrics-default/_doc
{
    "@timestamp": "2024-11-25T13:31:01.000Z",
    "agent": {
      "type": "firehose"
    },
    "aws": {
      "cloudwatch": {
        "namespace": "AWS/ApiGateway"
      },
      "exporter": {
        "arn": "arn:aws:cloudwatch:us-west-2:975050175126:metric-stream/Elastic-CloudwatchLogsAndMetricsToFirehose-CloudWatchMetricStream-Nhb4NhzPdL4J"
      }
    },
    "cloud": {
      "account": {
        "id": "975050175126"
      },
      "provider": "aws",
      "region": "us-west-2"
    }
}
```
2024-12-10 14:07:11 +01:00
Gerard Soldevila
c609daa97c
Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-localization (#202725)
## Summary

This PR aims at relocating some of the Kibana modules (plugins and
packages) into a new folder structure, according to the _Sustainable
Kibana Architecture_ initiative.

> [!IMPORTANT]
> * We kindly ask you to:
> * Manually fix the errors in the error section below (if there are
any).
> * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the
source code (Babel and Eslint config files), and update them
appropriately.
> * Manually review
`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that
any CI pipeline customizations continue to be correctly applied after
the changed path names
> * Review all of the updated files, specially the `.ts` and `.js` files
listed in the sections below, as some of them contain relative paths
that have been updated.
> * Think of potential impact of the move, including tooling and
configuration files that can be pointing to the relocated modules. E.g.:
>     * customised eslint rules
>     * docs pointing to source code

> [!NOTE]
> This PR has been auto-generated.
> Do not attempt to push any changes unless you know what you are doing.
> Please use
[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)
Slack channel for feedback.




#### 1 plugin(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/translations-plugin` |
`x-pack/platform/plugins/private/translations` |


<details>
<summary>Updated references</summary>

```
./docs/developer/plugin-list.asciidoc
./package.json
./packages/kbn-repo-packages/package-map.json
./packages/kbn-synthetic-package-map/synthetic-packages.json
./packages/kbn-ts-projects/config-paths.json
./src/dev/i18n_tools/README.md
./tsconfig.base.json
./tsconfig.refs.json
./yarn.lock
```
</details>
<details>
<summary>Updated relative paths</summary>

```
x-pack/platform/plugins/private/translations/tsconfig.json:2
```
</details>
<details>
<summary>Script errors</summary>

```

```
</details>
2024-12-10 06:56:15 -06:00
Vitalii Dmyterko
3d46eadace
[Security Solution][Detection Engine] deprecates siem signals migration APIs (#202662)
## Summary

 - addresses part of https://github.com/elastic/kibana/issues/195523
- deprecates
https://www.elastic.co/guide/en/security/current/signals-migration-api.html
APIs according to internal 9.x readiness
[guideline](https://docs.google.com/document/d/1W7csjn6QYjrBjmbXMzSz_JUD4KcmWz8jTTtAWFwgUJM/edit?tab=t.0#heading=h.tui2zvb9gca6)
 
#### How to test deprecated APIs?

1. Run API
https://www.elastic.co/guide/en/security/current/signals-migration-api.html
2. Observe warning deprecation on Kibana Upgrade page

<img width="2540" alt="Screenshot 2024-12-03 at 10 43 59"
src="https://github.com/user-attachments/assets/24fcebb9-2d31-4ca3-a0dc-4ed7861d26a2">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-10 05:58:08 -06:00
Julia Bardi
6e145f9d4e
[Fleet] Feature to support columns when exporting agents to CSV (#203103)
## Summary

Closes https://github.com/elastic/ingest-dev/issues/4325

Added modal window with column selector table when agents are exported.

There are some differences compared to the design due to technical
limitations:
- `Filters applied` badge not included, it's not really possible to
accurately calculate the count of filters, since they are stored in a
single string. We could potentially count by splitting AND/OR
conditions, but it may not be accurate. Do we still want to include it?
- We don't have display names for these mappings coming from the agent
index, and currently I don't have a way to show display names on the
exported file. For this reason showing the original field names on the
modal too.
- Added a Description column that transforms the field name to a more
readable name, we can also hardcode the descriptions if this is not good
enough.
- After some consideration, I decided to hardcode the allowed field list
to export other than querying dynamically from the agent index mappings,
otherwise new sensitive field mappings would show up on the UI.
- Caveat: searching on columns in the modal removes the already selected
columns that do not match. This seems to be a default behaviour of the
EuiTable, I find it a little strange, didn't see a straightforward way
to change it. I can spend more time on it if needed.

To verify:
- Select a few agents, click on Export CSV action
- Verify that the modal window opens with the agent mappings visible, by
default the columns on the UI selected
- Select a few columns to export
- Submit the modal
- Wait for the report to be ready and download it
- Verify that the exported csv includes the columns selected

<img width="1301" alt="image"
src="https://github.com/user-attachments/assets/71b549a7-a316-45d4-b017-f5eedec6ea7e">


Figma design:

![image](https://github.com/user-attachments/assets/bcf347a7-a68e-4f83-8f6b-37bdf43c6b54)

<img width="2138" alt="image"
src="https://github.com/user-attachments/assets/77ffc5d7-343f-4d5c-8b65-251e1cac94d4">


### 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)
- [ ] [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
2024-12-10 12:54:51 +01:00
Joe Reuter
7f3c642c0a
🌊 Streams: Set subobjects: false (#203002)
With https://github.com/elastic/elasticsearch/issues/117544 fixed,
`subobjects: false` can be set on wired streams.

This allows to map fields as scalars even if they share the same prefix,
e.g.
* `deeply.nested.path` as `keyword`
* `deeply.nested.path.and.more` as `keyword`
2024-12-10 05:28:13 -06:00