Commit graph

992 commits

Author SHA1 Message Date
James Gowdy
51ab081e94
[ML] Fixing permission to view ML nodes (#215503)
When setting the `canViewMlNodes`, we were assuming a serverless
environment based on whether all ML features (ad, dfa, nlp) were
enabled. When this was originally implemented no serverless project had
all three features enabled.
Since then the security project has
[changed](https://github.com/elastic/kibana/pull/175358) to include all
three features.

This PR add an explicit check for serverless and disables
`canViewMlNodes` if it is true.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-24 23:07:02 +02:00
Marshall Main
58190211b8
[Security Solution][Detection Engine] Remove experimentalFeatures, bulkCreateFactory, enrichEvents factory (#214856)
## Summary

Another follow up to https://github.com/elastic/kibana/pull/212694

- Removes `alertWithSuppression` from `sharedParams` since it's already
available on `services`
- Updates the type of `services` throughout DE executor logic to
properly represent that it has `alertWithSuppression`
- Removes `experimentalFeatures` as a param from functions that no
longer need it
- Converts `bulkCreate` from a factory to a const function
- Converts `enrichAlerts` from a factory to a const function - but
enrichment logic is still passed to the persistence functions as a
function. Now it's just one layer of factories instead of two.
- Renames types related to `enrichAlerts` to match the function
names/responsibilities better

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-24 16:08:45 -04:00
Drew Tate
19f6a20e27
[ES|QL] Remove command signatures (#215541)
## Summary

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

This removes the final deprecated property from the command definitions:
the signature.

Most of the work was moving validation logic out of the generic paths
into command-specific validation methods. This exercise confirmed the
fact that many of the properties on the command signatures were added to
support something in one or two commands and did not apply to the vast
majority. Now, it is clearer what code applies to what commands.


### 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: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-24 19:05:17 +02:00
Viduni Wickramarachchi
1c738f6e13
[Obs AI Assistant] Update EIS Elastic LLM naming (#215659)
Closes https://github.com/elastic/obs-ai-assistant-team/issues/236

## Summary

1. Renames name of model in model settings in search playground from
`Elastic LLM (AI Connector)` to `Elastic LLM`.

<img width="1616" alt="image"
src="https://github.com/user-attachments/assets/0be2ac02-1fcf-4167-b06e-de2e5af2f529"
/>

2. Renames the description of the Elastic LLM in the stack connector
flyout to `Use the Elastic LLM for your chat and RAG usecases.`

<img width="1620" alt="image"
src="https://github.com/user-attachments/assets/15ad52de-c916-4653-bf06-ccf4adeff170"
/>

### 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)
2025-03-24 21:41:19 +05:30
Julia Bardi
33db17768f
[Fleet] Use fleet error in cspm plugin (#215625)
## Summary

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

Changed Error to FleetError in CSPM so that the error response code is
400 instead of 500.
500 is not appropriate, it triggers alerts in our serverless SLOs.

<img width="1777" alt="image"
src="https://github.com/user-attachments/assets/b9b0e8cf-db54-427a-bc45-db0b806a150f"
/>
2025-03-24 17:05:38 +01:00
Andreana Malama
a3fe0cd460
[Lens] Fix inline dimension button label (#215476)
## Summary

Fix for #209696. 

<img width="368" alt="Screenshot 2025-03-21 at 1 49 14 PM"
src="https://github.com/user-attachments/assets/69052665-a194-459b-9c2a-835f4230a99b"
/>
<img width="381" alt="Screenshot 2025-03-21 at 1 49 53 PM"
src="https://github.com/user-attachments/assets/7cf6b7eb-4d1e-40fc-a28f-597634441eb1"
/>

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
2025-03-24 16:35:47 +02:00
Aleh Zasypkin
6bbc4b67a5
fix(security): topologically sort composable feature privileges before composing actions (#211035)
## Summary

This PR changes the privilege's actions merging logic for the composable
and deprecated Kibana features. The change makes it possible to have any
number of composable and deprecated features chained by `replaceBy`,
`composedOf`, or a combination of the two.

Under the hood, the privileges factory sorts all deprecated and
composable privileges using Kahn's algorithm for topological sorting,
similar to what is used to sort Kibana plugin dependencies. This allows
us to not only detect cyclical dependencies but also sort privileges in
the proper order depending on their dependency chain.

The use cases addressed by this change are best illustrated by the
`actions should respect composedOf when specified with replaceBy at the
privilege` test in `privileges.test.ts`.
2025-03-24 15:09:36 +02:00
Robert Jaszczurek
ab780500f6
[ML] Anomaly Explorer: Fix Anomalies Table pagination (#214714)
Includes a fix for https://github.com/elastic/kibana/issues/213424 and a
follow up to
https://github.com/elastic/kibana/pull/203224#discussion_r1875926261

* Rewrites anomalies_table in typescript
* Decouples anomalies table state into an individual service
* Fixes an issue where anomalies table pagination wouldn't reset to 0
after changing significant properties of the view, causing the table
data to refetch
2025-03-24 12:39:23 +01:00
Dzmitry Lemechko
4dc27ba4aa
[scout] Remove perf stats validation for Discover (#215130)
## Summary

With #212397 we added 2 tests for Discover app (loading `/app/discover`)
to track:
- js bundles loaded on page
- perf metrics like CPU time, Layout time and Script time fetched with
CDP Performance Domain API

While the first test for bundles _didn't report any failures_, second
test to validate Perf metrics fails periodically:


https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34729#0195a4de-6cd5-4d1e-be11-5d02be6de2b0
```
Error: CPU time (seconds) usage during page navigation should not exceed 1.5 seconds

expect(received).toBeLessThan(expected)

Expected: < 1.5
Received:   1.591343
```


https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34877
```
Error: Additional time spent executing JS scripts should not exceed 0.5 second

expect(received).toBeLessThan(expected)

Expected: < 0.5
Received:   0.601434
```


https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34899
```
Error: Total layout computation time should not exceed 0.06 second

expect(received).toBeLessThan(expected)

Expected: < 0.06
Received:   0.061723
```


https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34912#0195adb8-4536-42b7-ab4d-524535fdad9a
```
Error: Additional time spent executing JS scripts should not exceed 0.5 second

expect(received).toBeLessThan(expected)

Expected: < 0.5
Received:   0.561259
```

It was worth an experiment, but due to flakiness we decided to keep only
bundles limits validation for now and see if it is stable in the long
run.

If Data-Discovery team has interest in collecting Perf metrics without
strict validation in PRs, we can discuss the options. Alternatively we
can wait for Scout GA and you can deep dive into your own performance
testing with Playwright/CDP.
2025-03-22 20:31:54 +02:00
Sid
960caf9e2f
[Platform security] Replace SCSS with CSS in JS (Part 1 - Spaces plugin) (#214798)
## Summary

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

Removed most SASS files from the Spaces plugin. (Full checklist on
parent issue)

Remaining file: 

`x-pack/platform/plugins/shared/spaces/public/space_selector/space_selector.scss`
This file requires a custom mixin that we'll need to migrate once this
PR: https://github.com/elastic/kibana/pull/214729/files lands. It
introduces a `cssUtils` file to ensure consistency in Kibana specific
mixins.

### How to test
Testing visual regression isn't super straightforward here. For my local
testing, i started two instances of Kibana (main and this branch)

On main:

- Start es:
```
yarn es snapshot --license=trial -E http.port=9400
```

- Start kibana with the following config (CLI or kibana.dev.yml)
``` 
server.port: 5602
elasticsearch.hosts: ["http://localhost:9400"]
```
Once started, in a private browsing window, you should have access to
Kibana on main on `localhost:5602`

On this PR:
Start ES and Kibana normally (Kibana should be available on
localhost:5601)

This PR contains changes to the following parts of the Spaces plugin:
- Copy Saved Objects to Space flyout
- Share Saved Objects to Space flyout
- Space selector screen
- Space editing screen
- Space selector drop down menu in Nav Bar

Ideally, you should see no visual regression between the two versions. 


## Screenshots

| Component | Main | PR |
|--------|--------|--------|
| Space Edit | <img width="300" alt="space_edit_main"
src="https://github.com/user-attachments/assets/786feeb7-5047-443c-bb63-41e90e31a82b"
/> | <img width="300" alt="space_edit_pr"
src="https://github.com/user-attachments/assets/975cc096-25d7-4bd5-804d-f82f65a908bf"
/> |
| Space selector nav bar | <img width="300"
alt="space_selector_nav_bar_main"
src="https://github.com/user-attachments/assets/c6c05d28-3dfa-43c2-9586-b66a24f990d6"
/> | <img width="317" alt="Screenshot 2025-03-20 at 09 11 50"
src="https://github.com/user-attachments/assets/277d3094-640b-4604-adc7-5c8465aeb21c"
/> |
| Share to space | <img width="300" alt="share_to_space_main"
src="https://github.com/user-attachments/assets/5782a314-66f7-4780-bcfb-b0a85cece035"
/> | <img width="300" alt="share_to_space_pr"
src="https://github.com/user-attachments/assets/73a48305-7fa7-4637-9856-60461cbad770"
/> |
| Copy to Space flyout | <img width="300" alt="copy_to_space_pr"
src="https://github.com/user-attachments/assets/54342ca2-b2e1-4844-a66f-fae512ff8910"
/> | <img width="300" alt="copy_to_space_main"
src="https://github.com/user-attachments/assets/a629f12a-75c4-4ba6-a7cf-cdeca1310ef3"
/> |
| Copy to Space confirmation | <img width="300"
alt="copy_to_space_confirmed_main"
src="https://github.com/user-attachments/assets/78f93d73-e789-487f-94c1-eebcef7ce183"
/> | <img width="300" alt="copy_to_space_confirmed_pr"
src="https://github.com/user-attachments/assets/2020e71a-88b4-4107-9b05-ae90bf7d39f1"
/> |
| Space selector | <img width="300" alt="Space_selector_before"
src="https://github.com/user-attachments/assets/b8ed7269-e6f6-4bc0-bb24-1c53ac451083"
/> | <img width="300" alt="Space_selector_after"
src="https://github.com/user-attachments/assets/770d2141-8642-483f-b72c-bce6d5ebd282"
/> |

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

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

- [x] The risk of inexact conversion: verifying this PR requires manual
checks to ensure that the conversion has not created any regressions in
the style.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-22 01:38:47 +01:00
Alexi Doak
1dd1ec5870
[ResponseOps] Adding back recovered alert optimization for the task state (#215344)
## Summary

I refactored the flapping code on ON week in PR
https://github.com/elastic/kibana/pull/213825 , and I removed an
optimization for removing recovered alerts from the task state that we
don't need to track for flapping. This PR adds it back.


### 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. Create an rule let it be active for a little and then let it recover.
2. Verify that once the flapping array doesn't have any `true` values
changes
2025-03-22 02:21:16 +02:00
Marta Bondyra
42e57990cf
[Lens] fix drag and drop failing test (#215439)
## Summary

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

For some reason this PR https://github.com/elastic/kibana/pull/213928
didn't catch that the changes make the test fail. This PR fixes it.
After this, we'll be able to backport the original PR.
(The pattern of using `data-attr-field` is already used in Discover so I
think it's a good opportunity to align)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Nick Partridge <nicholas.partridge@elastic.co>
2025-03-21 18:21:35 -05:00
Ania Kowalska
d7d690c44b
[Discover] SCSS to Emotions migration part 2/4 (#214729) 2025-03-21 19:46:40 +02:00
Ahmad Bamieh
f83612f4e0
[Core][UA] Forward-port 8.18 changes into main (#214996)
## Summary

We've done a lot of UA changes against 8.18 and 8.x but we did not port
them to `main`. The reason we did not do the active development against
`main` is because UA is disabled on main and we need those features in
8.last not on `9.0` initially. This port is to keep the codebase
consistent and to be able to use these new UA features in the future
post `9.0`.

Any issues that that are caused from this port we should wrap them in a
config and disabled them on main and enable this new flag on `8.x`.

What is being ported?
- [x] Upgrade assistant plugin
(`x-pack/platform/plugins/private/upgrade_assistant`)
- [x] Integration test changes
(`x-pack/test/upgrade_assistant_integration`)
- [x] new UA doc links
(`src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts`)
- [x] localization files sync
(`x-pack/platform/plugins/private/translations/translations/*.json`)
- [x] Unfreeze is no longer supported after `8.x`. So removed it from
data streams readonly migration step and throw an error for regular
indices migration.

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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-21 18:46:46 +02:00
Philippe Oberti
11a512e735
[AI4DSOC] Alert summary landing page (#215246)
## Summary

This PR continues the work done in
https://github.com/elastic/kibana/pull/214889 and implements the landing
page for the new alert summary page. This landing page should only be
visible by users if none of the AI for SOC integrations have been
installed (more info in [the previous
PR](https://github.com/elastic/kibana/pull/214889)).

The landing page consist of 2 main sections:
- the top section with a title and an image
- the bottom section where we list the top 2 AI for SOC integrations -
Splunk and GoogleSecOps - which are clickable and will redirect the
users to the respective integration detail pages, as well as a `View all
integrations` button which will redirect the users to the integrations
page.

![Screenshot 2025-03-19 at 3 37
46 PM](https://github.com/user-attachments/assets/311bb9b9-1bd3-4c7a-bcb9-f929d459aa70)


https://github.com/user-attachments/assets/0d15a65d-7f2e-4e2d-9919-896f5532f08c

Link to mocks:
https://www.figma.com/design/DYs7j4GQdAhg7aWTLI4R69/AI4DSOC?node-id=4408-128249&t=GaxMP8OEZ9Qsjl0R-0

### Notes

- The current image is only temporary and acts as a placeholder while
the UIUX team is creating a gif or video (no ETA on when it will be
available).
- The integration links are subject to change in the future, but that
work is handled by a different team and as not being completed yet

## How to test

This needs to be ran in Serverless:
- `yarn es serverless --projectType security`
- `yarn serverless-security --no-base-path`

You also need to enable the AI for SOC tier, by adding the following to
your `serverless.security.dev.yaml` file:
```
xpack.securitySolutionServerless.productTypes:
  [
    { product_line: 'ai_soc', product_tier: 'search_ai_lake' },
  ]
```

Use one of these Serverless users:
- `platform_engineer`
- `endpoint_operations_analyst`
- `endpoint_policy_manager`
- `admin`
- `system_indices_superuser`

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

Contributes to https://github.com/elastic/security-team/issues/11979
2025-03-21 11:42:08 -05:00
Elena Shostak
2160dd1d95
Unauthorized route migration for routes owned by kibana-management (#214782)
### Authz API migration for unauthorized routes

This PR migrates last unauthorized routes owned by your team to a 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:**
```ts
router.get({
  path: '/api/path',
  ...
}, handler);
```

### **After migration:**
```ts
router.get({
  path: '/api/path',
  security: {
    authz: {
      enabled: false,
      reason: 'This route is opted out from authorization because ...',
    },
  },
  ...
}, handler);
```
2025-03-21 17:37:07 +01:00
Julia Bardi
04cc68a2cb
[Fleet] update disabled inputs (#215512)
## Summary

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

Disable `aws-s3` and `streaming` as an input type for agentless

<img width="2540" alt="image"
src="https://github.com/user-attachments/assets/9ee96838-919c-4be3-851b-51afad6b6e06"
/>
<img width="1470" alt="image"
src="https://github.com/user-attachments/assets/a6f702cf-6885-4512-ae04-7074cbfa0a40"
/>
2025-03-21 18:19:37 +02:00
Julia Bardi
dc5144d303
[Fleet] Sync custom assets to remote clusters (#215279)
## Summary

Relates https://github.com/elastic/kibana/issues/206244

Adding `custom_assets` to `fleet-synced-integrations` index, including
all component templates and ingest pipelines that has suffix `@custom`
and belong to a package.

In a follow up pr will add logic to read and install the custom assets
on the remote cluster.

To verify:
- enable feature flag `enableSyncIntegrationsOnRemote`
- add a remote es output with `sync_integrations` enabled
```
xpack.fleet.outputs:
  - name: 'Preconfiged remote output'
    type: 'remote_elasticsearch'
    id: 'remote-output2'
    hosts: ["http://192.168.64.1:9200"]
    sync_integrations: true
    kibana_url: "http://localhost:5601"
    secrets:
      service_token: token
      kibana_api_key: key
```
- visit Fleet UI to let setup run that creates
`fleet-synced-integrations` index
- add system integration and create a custom component template and
ingest pipeline
- wait 5m for the async task to run
- verify that the `fleet-synced-integrations` index contains the custom
assets populated
- delete one of the assets or uninstall the package
- wait 5m for the task to run again
- verify that the assets are marked with `is_deleted:true` and has a
`deleted_at` field set

```
GET fleet-synced-integrations/_search

{
        "_index": "fleet-synced-integrations",
        "_id": "fleet-synced-integrations",
        "_score": 1,
        "_source": {
          "remote_es_hosts": [
            {
              "hosts": [
                "http://192.168.64.1:9200"
              ],
              "name": "Preconfiged remote output",
              "sync_integrations": true
            }
          ],
          "integrations": [
            {
              "package_version": "1.67.3",
              "updated_at": "2025-03-20T07:17:55.143Z",
              "package_name": "system"
            }
          ],
          "custom_assets": {
            "component_template:logs-system.auth@custom": {
              "type": "component_template",
              "name": "logs-system.auth@custom",
              "package_name": "system",
              "package_version": "1.67.3",
              "is_deleted": false,
              "template": {
                "mappings": {
                  "properties": {
                    "new_field": {
                      "type": "text"
                    }
                  }
                }
              }
            },
            "ingest_pipeline:logs-system.auth@custom": {
              "pipeline": {
                "processors": [
                  {
                    "user_agent": {
                      "field": "user_agent"
                    }
                  }
                ],
                "version": 1
              },
              "package_version": "1.67.3",
              "is_deleted": false,
              "name": "logs-system.auth@custom",
              "package_name": "system",
              "type": "ingest_pipeline"
            }
          },
          "custom_assets_error": {}
        }
      }
```

<img width="1296" alt="image"
src="https://github.com/user-attachments/assets/35503453-ab4a-4649-a889-27dd188e3d55"
/>


### 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
2025-03-21 14:44:01 +01:00
Matthew Kime
f77e29f582
[Search Profiler] Index field no longer resets on query edit (#215420)
## Summary

Previously, editing the query would reset the index field to `_all`.
This was due to using `useState` instead of `useRef` to store the query
value.

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

How to test
1. Go to search profiler
2. Enter an index name, anything but `_all` - which is already there
3. Edit the query
4. Did the index value remain unchanged? Good! Its fixed!

ALSO - need to test to make sure this works with content in the url.
2025-03-21 15:29:33 +02:00
Paulina Shakirova
6a9a1eeb8a
Change "Close project" to "Log out" in nav menu in serverless mode (#211463)
## Summary

This PR resolves [Unify user profile menu "Log
out"option](https://github.com/elastic/kibana/issues/209278) issue.
2025-03-21 13:38:44 +01:00
Julia
8aa7d8b0a1
[ResponseOps][MW] Remove mw category selection from UI (#211793)
Fix: https://github.com/elastic/kibana/issues/197530
Fix: https://github.com/elastic/kibana/issues/212857

## Summary
I did from DOD:
- Remove the category selection from the UI when creating a MW.
- Show the section only if Filter alerts is ON.
- The terminology should change from category to Solution.
- Show a warning callout to users when editing a MW if they have
configured the categories and inform them that if upon saving the
category configuration will be removed

What'll be covered in follow up PR:
- Show only two solutions, O11y and Security. O11y will also include
Stack.


### Checklist

Check the PR satisfies following conditions. 

- [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] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
2025-03-21 13:09:32 +01:00
Drew Tate
b7854a8759
[ES|QL] Remove command option definitions (#215425)
## Summary

This PR removes the declarative objects that were meant to describe the
behavior of "options" (see details section below if you don't know what
I'm talking about). **It does not remove "options" as a concept from our
AST.** "Option" is probably the wrong name for the subcommands in the
AST but, at the moment, it is working fine how it is.

Here is a list of what these definitions were being used for and where I
ended up.

| Use | How it worked | What I did |

|---------------------------------------------------------------------|---------------|------------|
| To generate command declarations for display in suggestions menu | It
had some complex logic to try to construct a declaration string from the
information in the `signature` property | I replaced this with
statically declared declaration strings on the command definitions. I
took most of them directly from our docs. They are a better result than
the autogenerated stuff |
| To build the `METADATA` suggestion | the definition was passed into
`buildOptionDefinition` | I declared the `METADATA` suggestion
statically in the `FROM` autocomplete code. |
| To check for field correctness in `METADATA` | This logic lived in the
option definition's `validate` method | I moved it to the `FROM`
command's validate method |
| To validate the type of the value assigned to `APPEND_SEPARATOR` in
`DISSECT` | This logic lived in the option definition's `validate`
method | I moved it to the `DISSECT` command's validate method |
| To check if the left side of the equals sign in `DISSECT` is
"APPEND_SEPARATOR | In most cases, the parser catches stuff like this,
but for some reason `DISSECT`'s grammar is very loose so we have been
stepping in with our own validation (maybe we should suggest changing
this). This was the only case that was triggering the "Unknown option"
message. | I moved it to the `DISSECT` command's validate method |
| To prevent default column validation for `METADATA` | This was the
only true use of the `skipCommonValidation` property which would prevent
the validator trying to find metadata fields in the standard field list
| I inserted an option name check directly into the validation code.
It's not a good long-term solution, but it is actually an improvement
since the former code pretended to be general but was actually just for
`METADATA`. At least now it is clear what the exception is for. |
| To filter functions and operators that are available after `BY` |
Function definitions sometimes declare that they are supported in a `by`
statement. The validator checks if the function does. | This didn't
change. The option nodes in the AST are still there and we are still
relying on the `supportedCommands` and `supportedOptions` properties in
the function definitions. |

#### Pictures

<img width="859" alt="Screenshot 2025-03-20 at 1 47 36 PM"
src="https://github.com/user-attachments/assets/3bd3c3c6-6066-466e-b33b-9444ab58670a"
/>

_New, statically-defined declarations_

<img width="783" alt="Screenshot 2025-03-20 at 2 12 28 PM"
src="https://github.com/user-attachments/assets/94550b25-5da9-4c82-9586-11b3515debd7"
/>

_In cases besides `APPEND_SEPARATOR`, incorrect keywords produce syntax
errors._

<img width="700" alt="Screenshot 2025-03-20 at 2 09 05 PM"
src="https://github.com/user-attachments/assets/de1a23f4-2509-4c6e-84ec-a807e96b65a5"
/>

_Didn't break the `APPEND_SEPARATOR` datatype validation_

<img width="791" alt="Screenshot 2025-03-20 at 2 03 28 PM"
src="https://github.com/user-attachments/assets/169aaa15-52f3-4d22-ab77-26a560cd9359"
/>

_Didn't break `METADATA` fields validation_

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

### Background/details

Till now, "options" have been a concept in our code. Their definition
isn't clear, but it essentially comes down to any capitalized keyword
after the command name. For example `STATS... >BY<`, `DISSECT...
>APPEND_SEPARATOR<`. You could think of them as roughly subcommands or
substatements.

There was a hope that commands would be uniform enough that these
"options" would deserve to be their own special first-class citizen. But
they break conceptually...

For example `APPEND_SEPARATOR` is not a keyword with an expression after
it... it is a variable `APPEND_SEPARATOR=":"`... or filtering in
stats.... `STATS AVG(bytes) >WHERE<` .... so is WHERE an option now?

`FORK` will break this even further.

So, we are moving the architecture to allow for complexity and variance
among the commands. Command-specific logic will have the final say in
how autocomplete and validation work for anything with that command.
2025-03-21 05:04:33 -06:00
Julia
fdd872ada1
[ResponseOps] Snooze Scheduler UX for recurring snoozes shows incorrect summary (#214797)
Solves: https://github.com/elastic/kibana/issues/210119

## Summary

How to test:
Reproduce bug from an issue. But create a rule in Stack management.
Action is not needed. You can test it on main.
![Screenshot 2025-03-19 at 20 43
09](https://github.com/user-attachments/assets/2b311a28-c474-4883-8f75-34f9de87a493)

![Screenshot 2025-03-19 at 20 46
56](https://github.com/user-attachments/assets/894e26c6-b298-40c2-9d6a-c5fd460300d2)

When you add new schedule and save it, you should see proper date here
as well:

![Screenshot 2025-03-19 at 20 59
53](https://github.com/user-attachments/assets/28239de4-ee99-4e51-a88a-ca78e5248f5f)


### 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-03-21 11:47:28 +01:00
Umberto Pepato
4aab9d4c48
[ResponseOps][Alerts] Create embeddable alerts table plugin (#213909)
## Summary

Creates a wrapper plugin around the alerts table, that registers a basic
alerts table embeddable panel for dashboards.

> [!NOTE]
> This PR is a preparation work for the [embeddable alerts
table](https://github.com/elastic/kibana/issues/197483). The feature is
disabled for end-users while waiting for other dependent PRs to be
integrated with this, and uses a partially hard-coded table
configuration for testing purposes. The final panel will be fully
configurable by the user.

## Verification steps

1. Uncomment this line

4d49e98b4d/x-pack/platform/plugins/shared/embeddable_alerts_table/public/plugin.ts (L34)
(I'm using a comment to avoid polluting the embeddable examples app with
this panel for a short time)
2. Create one or more ES Query rules that fire alerts
3. Visit the Dashboards page and create a dashboard, then enter edit
mode
4. Click "Add panel"
5. Under "Visualizations" choose "Alerts table"
6. Check that the table panel was created correctly
6.1. Shows any alerts fired by the ES Query rule(s)
6.2. Check that the table adapts correctly to the panel when resizing,
and all normal interactions with the alerts table work correctly
(adding/removing fields, opening alerts in flyouts, using row/bulk
actions)
6.3. Check that panels respond to the global time filter (only time
filters, not KQL search or filters)
6.4. Check that panels respond to individual time filters (⛭ icon >
Apply custom time range)
11. Create a role with access to dashboards but without any alerting
capability and a user assigned to that role
12. Repeat steps 3 and 4, and verify that the "Alerts table" option
isn't available under "Visualizations"
13. Add any alerting capability to the role, such as Management > Stack
rules
14. Repeat steps 3 and 4, and verify that the "Alerts table" is
available again

## References

Closes #203611

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-21 12:02:54 +02:00
Miguel Garzón
35588ecdbb
Updates datafeeds for supplied security anomaly detection jobs to exclude Elastic Agent and Beats processes (#213927)
As described in https://github.com/elastic/security-team/issues/11532,
we have added filters to exclude any processing related to the elastic
endpoint agents.
2025-03-21 09:32:14 +00:00
Joe Reuter
184d0a32ad
🌊 Streams: Overview page redesign (#214196)
This PR overhauls the overview page.

Classic stream:
<img width="1004" alt="Screenshot 2025-03-12 at 21 00 39"
src="https://github.com/user-attachments/assets/a058da08-0ae2-48cc-abca-359b23288b32"
/>

Wired stream:
<img width="1019" alt="Screenshot 2025-03-12 at 21 01 56"
src="https://github.com/user-attachments/assets/bca04537-f79b-4814-8e31-9d3dae18ad90"
/>


## Doubts / things I changed from the design

* Quick links is just all dashboards, so I adjusted the wording
accordingly. Also, since we render all dashboards, there isn't really
value in "View all assets"
* The panel on top is already stating the count of docs, why should we
repeat that in the histogram panel?
* No search bar - in the beginning we said we don't want this page to
become discover, a search bar feels like we are going there. Also, what
should the user enter there? I don't think we want to buy deeper in KQL
* Should the count of docs be the total count of the count for the
currently selected time range? Not sure what makes more sense
* For wired streams I left the tabs in place to switch between child
streams and quick links. We can revisit this once we get closer to
actually releasing wired streams

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-20 21:48:10 +02:00
Bryce Buchanan
522f83fd25
Adds 'page reload' screen reader warning (#214822)
## Summary

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

Adds 'page reload' screen reader warning to metadata filter button on
the infrastructure host detail fly-out.


https://private-user-images.githubusercontent.com/75274611/420462482-a32e59f8-e04d-40a7-90af-1d039d4b4e67.mov?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDIyMjk5OTQsIm5iZiI6MTc0MjIyOTY5NCwicGF0aCI6Ii83NTI3NDYxMS80MjA0NjI0ODItYTMyZTU5ZjgtZTA0ZC00MGE3LTkwYWYtMWQwMzlkNGI0ZTY3Lm1vdj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAzMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMzE3VDE2NDEzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTliMjQyMmMzOWNkNDA1Y2JiZmE2MzY2YmY4N2ZmMzEwNDcxYzA1NmM2NWMzMDFhNGU3MTQ0Y2ZjZGViZDUxMjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.GbLcX-q0dpVHSicv7T25cvyUqem6sYFYj8D_AjrvRVE

### 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)
2025-03-20 21:42:47 +02:00
Paulina Shakirova
b39b8c4591
[fleet] fix overlay in integrations on mobile (#215312)
## Summary

This PR resolves [Integrations overlay
mobile-view](https://github.com/elastic/kibana/issues/214146) issue.
2025-03-20 19:50:12 +01:00
Philippe Oberti
3605a331b9
[AI4DSOC] Alert summary page routing and initialization (#214889)
## Summary

This PR is the setting the foundations for the AI for SOC Alert summary
page. It has very little UI, instead it focuses on the following:
- add routing for the `alert_summary` page
- fetches the integrations, filters them to only keep the ones related
to AI for SOC, then decides what to render depending on if some AI for
SOC packages have been installed or not

The PR also makes a small change to the `SecurityRoutePageWrapper`
component, to allow us to redirect to the Security Solution HomePage
instead of the NoPrivilegesPage. While this might not be a long term
solution, it is the easiest path forward. In the future, AI for SOC will
most likely be its own plugin (leaving outside of Security Solution)
hence this will not be needed anymore.

Here's the basic behavior of the Alert summary page:
- The `Landing page` will be shown if none of the hardcoded AI for SOC
packages are installed (these values are hardcoded as we currently do
not have a way to filter integrations for the AI for SOC ones only):
  - splunk // doesnt yet exist
  - google_secops
  - microsoft_sentinel
  - sentinel_one
  - crowdstrike
- The `Wrapper` component will only be shown if you have at least one of
the above AI for SOC packages installed.

### Very limited UI added in this PR

| Loading integrations | No installed packages | Some installed packages
|
| ------------- | ------------- | ------------- |
| ![Screenshot 2025-03-17 at 6 58
45 PM](https://github.com/user-attachments/assets/68089c33-fa40-4201-8b51-3e7236d50d5a)
| ![Screenshot 2025-03-17 at 6 59
15 PM](https://github.com/user-attachments/assets/e7e5af2d-bdab-4bef-881e-bb5e512c3545)
| ![Screenshot 2025-03-17 at 6 59
40 PM](https://github.com/user-attachments/assets/61b346bb-799f-4a0b-95cb-e3092ea58d37)
|

### Notes

We need to remove the section at the top of the page that currently
shows the `Add integrations` button. A follow PR will take care of that.
[This](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/app/home/index.tsx#L54)
is where that bar is being added. We will have to find a way to not show
that for the AI for SOC tier.

## How to test

This needs to be ran in Serverless:
- `yarn es serverless --projectType security`
- `yarn serverless-security --no-base-path`

You also need to enable the AI for SOC tier, by adding the following to
your `serverless.security.dev.yaml` file:
```
xpack.securitySolutionServerless.productTypes:
  [
    { product_line: 'ai_soc', product_tier: 'search_ai_lake' },
  ]
```

The Alert summary navigation will NOT be shown for the following
Serverless users: `viewer`, `t1_analyst`.
and `t2_analyst`. For those, the navigation entry is not present, and
navigating to the url directly will automatically re-route to the
Security home page.

Currently, retrieving the integrations (via the `fleet/epm/packages`
endpoint) is also unauthorized for the following users: `editor`,
`t3_analyst`, `threat_intelligence_analyst`, `rule_author`,
`soc_manager` and `detections_admin`.

This means that the only users that can be currently used to test this
PR are:
- `platform_engineer`
- `endpoint_operations_analyst`
- `endpoint_policy_manager`
- `admin`
- `system_indices_superuser`

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

Will help close https://github.com/elastic/security-team/issues/11954 as
well as https://github.com/elastic/security-team/issues/11979.
2025-03-20 13:42:36 -05:00
Georgiana-Andreea Onoleață
2b96a82d4f
[ResponseOps][Connectors] Add connector filter in flyout (#211874)
Closes https://github.com/elastic/kibana/issues/208001

## Summary

- Added filtering option in the `create connector` flyout: 

-  Search field: 
    - search connectors by name (or description)
    - cards dynamically update based on the input
    - includes a clear button to reset the search 


Demo: 


https://github.com/user-attachments/assets/6d38a916-ad05-41dd-867e-c37260913067

---------

Co-authored-by: Christos Nasikas <xristosnasikas@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-20 18:06:00 +02:00
Maria Iriarte
971c2056ad
[Graph/SCSS] Migrate source_modal.scss file to css in js (#215168)
## Summary

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

Replaces `source_modal.scss` files file to css-in-js.

### 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)
2025-03-20 17:33:46 +02:00
Stratoula Kalafateli
92a2efacd2
[ES|QL] Merges the controls props (#214699)
## Summary

Small change to the editor api. Groups the controls related props
together
2025-03-20 16:33:11 +01:00
Robert Jaszczurek
14c6204dca
[ML] Anomaly Explorer: Migrate Explorer from SCSS to Emotion (#215196)
Migrate remaining Anomaly Explorer styles from SCSS to Emotion:

| Before  | After |
| ------------- | ------------- |
| Anomaly Swimlane | Anomaly Swimlane | 
| <img width="983" alt="image"
src="https://github.com/user-attachments/assets/d654bf74-f04a-4f57-8891-af0c0a0d3b85"
/> | <img width="824" alt="Pasted Graphic 1"
src="https://github.com/user-attachments/assets/38e00adf-dba1-43be-a6da-6141221dc82b"
/> |
| Swimlane embeddable | Swimlane embeddable |
| <img width="573" alt="image"
src="https://github.com/user-attachments/assets/304d0073-a194-41cd-a379-5fc1fbb734a6"
/> | <img width="580" alt="Create visualization"
src="https://github.com/user-attachments/assets/28982191-16c1-437d-9955-77ca73fbe4f0"
/> |
| Anomalies charts tooltip and label | Anomalies charts tooltip and
label |
| <img width="970" alt="image"
src="https://github.com/user-attachments/assets/f6cb53f3-b79e-4eac-84c2-18d1d0a53cc0"
/> | <img width="974" alt="Pasted Graphic 3"
src="https://github.com/user-attachments/assets/2f553118-8c4f-4678-809d-f7f25816fb1c"
/> |
2025-03-20 15:50:45 +01:00
Nicolas Chaulet
28a27a71d4
[Fleet] Install kibana assets when creating package policy in a space where they are not installed (#215023) 2025-03-20 10:06:14 -04:00
Drew Tate
9073b19407
[ES|QL] Restructure validation code, remove command settings (#215056)
## Summary

Follow on to several recent efforts including
https://github.com/elastic/kibana/issues/195418 and
https://github.com/elastic/kibana/pull/213325

This PR
- reorganizes validation code to make dependencies clearer and make it
less overwhelming... it's not perfect but it's better
- removes the deprecated notion of a command "setting" which only ever
applied to `ENRICH`.

No regression in `ENRICH` mode validation:
<img width="874" alt="Screenshot 2025-03-18 at 1 04 46 PM"
src="https://github.com/user-attachments/assets/e6639d8a-d129-440f-ac30-64a2ef6ab65c"
/>

Or hover
<img width="419" alt="Screenshot 2025-03-18 at 7 43 04 PM"
src="https://github.com/user-attachments/assets/8f9c020c-dcfd-42dc-8e14-4b1c4311457b"
/>





### 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: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-20 07:16:34 -06:00
Marco Antonio Ghiani
8f65dceefc
[Streams 🌊] Enrichment - Add support for date processor (#213559)
## 📓 Summary

Part of https://github.com/elastic/streams-program/issues/38

This work adds the `date` processor along with the dissect and grok ones
in the enrichment section.
It scales well following the current folder structure, but we should
definitely polish it a bit more once more processors get added, such as
getting the right form component, improve form state derivation, etc.


https://github.com/user-attachments/assets/824d15c8-ce9d-455a-ae0b-97aeec8cf025

---------

Co-authored-by: Kerry Gallagher <kerry.gallagher@elastic.co>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Kerry Gallagher <471693+Kerry350@users.noreply.github.com>
2025-03-20 12:57:47 +00:00
Julia Bardi
592dffa3f7
[Fleet] Update serverless readme (#215271)
Document setup to start local stack in serverless mode and enroll an
agent from a multipass VM.
2025-03-20 13:21:59 +01:00
Maria Iriarte
48b286e460
[Graph/SCSS] Migrate settings _index.css, _legacy_icon.scss and _url_template_list.scss files to Emotion (#215021)
## Summary

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

Replaces `_index.css`, `_legacy_icon.scss` and `_url_template_list.scss`
files file to css-in-js.


### 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)
2025-03-20 12:29:06 +02:00
Søren Louv-Jansen
b9cd2c8040
[Obs AI Assistant] Minor cleanup api tests (#215181)
- Remove duplicated helpers
- improve log messages
- Clear intercepted requests after every test

---------

Co-authored-by: Viduni Wickramarachchi <viduni.ushanka@gmail.com>
2025-03-20 10:59:59 +01:00
Gerard Soldevila
adb4bdf8d8
SKA: Extract list of Kibana solutions into a dedicated package (#213353)
## Summary

The intent is to have a centralised place to store the list of Kibana
solutions and serverless project types.
To that end, this PR creates a `@kbn/projects-solutions-groups` package.
It also adds the new solution type `'chat'`.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-20 10:20:07 +01:00
Alexander Wert
81f69713f3
Enable editing central config for EDOT Agents / SDKs (#211468)
## Summary
Enables central configuration for EDOT Agents / SDKs while keeping it
disabled for other OTel Agents.

**EDOT JAVA agent**
<img width="2124" alt="Screenshot 2025-03-17 at 09 26 37"
src="https://github.com/user-attachments/assets/fcff661c-6655-444d-bc09-39b70c835b82"
/>

**EDOT Nodejs Agent**
<img width="1264" alt="Screenshot 2025-03-18 at 13 08 12"
src="https://github.com/user-attachments/assets/97cdd03b-b6cd-494f-bd7e-a9b3fc4976b4"
/>

---------

Signed-off-by: Alexander Wert <alexander.wert@elastic.co>
Co-authored-by: jackshirazi <jacks@fasterj.com>
Co-authored-by: Caue Marcondes <caue.marcondes@elastic.co>
Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-19 16:06:08 -03:00
Patrick Mueller
a3aaa04eba
[ResponseOps] mustache lambdas for EncodeURI and EncodeURIComponent, take 2 (#213859)
resolves https://github.com/elastic/kibana/issues/168728

## Release note

Adds Mustache lambdas for alerting actions to encode URLs with
`{{#EncodeURI}}` and `{{#EncodeURIComponent}}` using `encodeURI()` and
`encodeURIComponent()`.

doc to update, in a separate PR:
https://github.com/elastic/docs-content/issues/735
2025-03-19 14:54:03 -04:00
Marta Bondyra
de52f41a5c
[Lens/SCSS] Replace scss to css-in-js for Lens codebase (#209768)
Replace SCSS in css-in-js for Lens codebase
2025-03-19 18:33:23 +01:00
Kibana Machine
f7d01667ee
Unauthorized route migration for routes owned by obs-ai-assistant,security-solution (#198338)
### Authz API migration for unauthorized routes

This PR migrates unauthorized routes owned by your team to a 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:**
```ts
router.get({
  path: '/api/path',
  ...
}, handler);
```

### **After migration:**
```ts
router.get({
  path: '/api/path',
  security: {
    authz: {
      enabled: false,
      reason: 'This route is opted out from authorization because ...',
    },
  },
  ...
}, handler);
```

### What to do next?
1. Review the changes in this PR.
2. Elaborate on the reasoning to opt-out of authorization.
3. Routes without a compelling reason to opt-out of authorization should
plan to introduce them as soon as possible.
2. You might need to update your tests to reflect the new security
configuration:
  - If you have snapshot tests that include the route definition.

## 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: Ashokaditya <ashokaditya@elastic.co>
Co-authored-by: Viduni Wickramarachchi <viduni.wickramarachchi@elastic.co>
2025-03-19 12:04:24 -04:00
Maria Iriarte
ecd3521acd
[Graph/SCSS] Refactor styles to use Emotion (#212916)
## Summary

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

Replaces scss to css-in-js.

> [!NOTE]
> The rest of the `.scss` will be migrated in different pull requests

<!--

- [ ] `x-pack/platform/plugins/private/graph/`public/_mixins.scss

- [ ]
`x-pack/platform/plugins/private/graph/`public/components/_app.scss
- [ ]
`x-pack/platform/plugins/private/graph/`public/components/_graph.scss
- [ ]
`x-pack/platform/plugins/private/graph/`public/components/_inspect.scss
- [ ]
`x-pack/platform/plugins/private/graph/`public/components/_search_bar.scss

- [ ]
`x-pack/platform/plugins/private/graph/`public/components/_search_bar.scss
- [ ]
`x-pack/platform/plugins/private/graph/`public/components/field_manager/_field_picker.scss
- [ ]
`x-pack/platform/plugins/private/graph/`public/components/field_manager/_index.scss

-->

### 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)
2025-03-19 16:14:01 +01:00
Paul Tavares
e11c3ecea5
[Security Solution][Endpoint] Adjust Artifacts policy assignment component in support of spaces (#214487)
## Summary


### Fleet

- Exposed API route for bulk get package policies via the routes service
- Created and exposed type `BulkGetPackagePoliciesRequestBody`

<br/>


### Security Solution

The following changes were made to Endpoint Artifacts in support of
spaces:

> [!NOTE]
> Space awareness is currently behind feature flag:
`endpointManagementSpaceAwarenessEnabled`


- The policy assignment component, which is displayed on artifact's
Create and Update forms, now:
- Displays the count of policies (if any) that are associated with the
artifact, but not currently accessible in the active space (screen
capture 1️⃣ )
- When a user does NOT have the Global Artifact privilege, the `Global`
toggle selection will be disabled and a tooltip is displayed. This
change also applies to the create form where the default selection will
be per-policy and the global button will be disabled. (screen capture
2️⃣ )
- Artifact policy assignments that are not accessible in active space
are preserved when submitting an update to the artifact
- The component was also refactored a bit to simplify its list of props
- Artifact card policy assignment menu was adjusted to show any policy
that is not accessible to the user as "disabled" along with a tooltip
(screen capture 3️⃣ )
- The update artifact API was changed (via server-side extension point)
to not error when validating policies that are not accessible in active
space if they were already associated with the item being updated.
- Fixes a bug in the Find artifacts API (impact only when spaces was
enabled) where an invalid filter was created when there was no policies
currently shared with active space.
2025-03-19 11:12:59 -04:00
Gonçalo Rica Pais da Silva
54d9cf45cb
[Discover][APM] Refactor APM sources for better trace enablement (#212634)
## Summary

This PR reworks how APM handles getting its sources data, elevating the
necessary code to a private shared plugin so that Discover for Traces
can access the data and handle user provided configuration. It also
removes the need for Discover for Traces to rely on the APM static data
view, so the Trace data source and document profile will work on any
compatible/configured index, even in ESQL mode.

Closes #211414

<img alt="ESQL Discover Traces Screenshot 2025-03-04 173032"
src="https://github.com/user-attachments/assets/f5bbb736-8b8b-45dc-ac23-4bf7083aa47e"
/>

## How to test

Test with olbt-cli instance for now, will post for doing with synthtrace
data. Ensure the following is added to your kibana.dev.yml:

```yaml
discover.experimental.enabledProfiles:
  - observability-traces-data-source-profile
```

- Make sure your space has the Observability solution view configured
- Go to Discover page
- Select Data Views mode if required and create a view with a `traces`
specific index. Or use the APM static data view.
- The default columns on the page should show the summary column with
four of the following badges: `service.name`, `event.outcome`,
`transaction.name`, `transaction.duration.us`, `span.name`,
`span.duration.us`
- Go to ESQL mode with the query targetting a `traces` index
- The default columns should show the same as in Data View mode

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Irene Blanco <irene.blanco@elastic.co>
2025-03-19 15:52:30 +01:00
Maria Iriarte
1dbaf0e22b
[Graph/SCSS] Migrate _guidance_panel.scss file to Emotion (#214929)
## Summary

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

Replaces scss `_guidance_panel.scss` file to css-in-js .

### 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)
2025-03-19 14:40:16 +02:00
Marco Liberati
cc52db1474
[Lens][Embeddable] fix can edit check (#213887)
## Summary

This PR fixes a regression introduced for user messages.
The `viewMode` check moved from observable to its raw value but still
performing the observable check.

The fix is to check both the panel `viewMode` AND as fallback the
embeddable hierarchy viewMode until the `edit` mode is met.

---------

Co-authored-by: Nick Partridge <nick.ryan.partridge@gmail.com>
2025-03-19 12:50:04 +01:00
Maria Iriarte
4f9c54f91b
[Graph/SCSS] Migrate _venn_diagram.scss file to Emotion (#214962)
## Summary

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

Replaces `_venn_diagram.scss` file to css-in-js .

## Screenshots

<img width="1593" alt="Screenshot 2025-03-18 at 12 50 55"
src="https://github.com/user-attachments/assets/f6685a78-15ce-4019-992a-9388efb79fab"
/>

<img width="1586" alt="Screenshot 2025-03-18 at 12 50 36"
src="https://github.com/user-attachments/assets/b1f57d53-509d-43c3-9a96-99ebacba35a1"
/>


### Checklist

- [ ] 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)
2025-03-19 10:14:00 +01:00