Commit graph

82992 commits

Author SHA1 Message Date
Felix Stürmer
032c481ec1
[Discover] Add selector syntax support to log source profile (#206937)
This adds support for the new selector syntax to the log source profile
heuristics. It will only match when index name expression exclusively
contains implicit or explicit `data` selectors.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-01-20 13:50:32 +01:00
Samiul Monir
c8e0408e71
Remove inference_id field if no inference endpoint is selected (#205660)
## Summary

Currently, the `semantic_text` field supports a default `inference_id`,
meaning users are not required to explicitly select an inference
endpoint during mapping. However, a bug has been identified: if the
`Select inference Id` popover is not opened, the `inference_id` field
property remains as an empty string. This causes Elasticsearch (ES) to
throw an error, as it requires a value to be present if the property is
defined.

To address this issue, the proposed solution is to remove the
`inference_id` property from the `semantic_text` field during field
mapping if its value is empty.

### Screen Recording


https://github.com/user-attachments/assets/e8d8d471-7ff2-493e-8872-e42838579d44

---------

Co-authored-by: Matthew Kime <matt@mattki.me>
2025-01-20 07:49:21 -05:00
Jesus Wahrman
0f67c78659
[core.http] Add warning header to deprecated endpoints (#205926)
## Summary

resolves https://github.com/elastic/kibana/issues/105692

This PR adds a pre response handler that sets a warning header if the
requested endpoint is deprecated.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-01-20 13:40:53 +01:00
Shahzad
39119b553e
[SLOs] Added createdBy and updatedBy fields in summary documents !! (#205784)
## Summary

Added createdBy and updatedBy fields in summary documents !!

This will make easier to identify which user have added the SLO and
which user last updated the SLO. It's especially helpful where there are
100s of SLOs defined.


<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/ee7bb4d4-a8ea-40c4-8d91-06c32c9b0ba6"
/>

---------

Co-authored-by: Kevin Delemme <kdelemme@gmail.com>
Co-authored-by: Kevin Delemme <kevin.delemme@elastic.co>
2025-01-20 13:38:04 +01:00
Sergi Massaneda
a555d57261
[Security Solution] Siem migrations remove nested fields from rules mapping (#207086)
## Summary

Removes the `type: "nested"` from `elastic_rule`, `original_rule` and
`original_rule.annotations` fields.

The nested type would be necessary only if we had multiple objects in
those fields and we wanted to query multiple nested fields as individual
entities.

There's no need to define these fields as nested and doing so adds some
limitations and complexities, so we changed that to plain objects.

This change does not cause any behavioral change. It will only provide
the possibility of seeing the object values in discover:

#### Discover

Before:
![discover
before](https://github.com/user-attachments/assets/0ab4e7f1-83f1-4672-942a-b972970c472b)

After:
![discover
after](https://github.com/user-attachments/assets/1d716e4f-8117-4bf9-a70f-c081a6219ae6)

#### Mappings

Before:

![console
nested](https://github.com/user-attachments/assets/f49cda1b-3f58-4c39-884f-3bf29a4f4d7f)

After

![console not
nested](https://github.com/user-attachments/assets/60e1f256-2fd0-421a-9997-d5438349b0c6)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-01-20 12:46:45 +01:00
Pablo Machado
f0292b59e4
[SecuritySolution] Service Flyout (#206268)
## Summary

* Rename  `entities_types`=> `entity_types`
* Create service entity flyout
* Modify `service.name` links in the app to open the service flyout

### How to reproduce it
* Start Kibana with service data, enable the risk score and entity store
* Navigate to Entity Analytics, Alerts and Timeline pages
* Click on the service name link
* It should open the flyout


### Service Flyout over different pages
![Screenshot 2025-01-13 at 16 25
26](https://github.com/user-attachments/assets/7487f73b-dd20-4efb-a950-60dcdece58de)
![Screenshot 2025-01-13 at 16 25
40](https://github.com/user-attachments/assets/b570e1b0-3f5e-4136-abb4-cfea6445d672)
![Screenshot 2025-01-13 at 16 25
53](https://github.com/user-attachments/assets/b5b4009e-fac9-44b5-a3f5-19051ae6b6d5)



### Checklist

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] [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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2025-01-20 11:17:50 +00:00
Antonio
805830085e
[ResponseOps][Cases] Save sortOrder in local storage (#206443)
Fixes https://github.com/elastic/security-team/issues/11357

## Summary

In this PR we use cases local storage to preserve the selection of
ordering in the user activity on the cases detail page.

Initially, I was going to save the whole `UserActivityParams` on local
storage but ultimately decided against it just to preserve the defaults
like "selected tab" or "page".
2025-01-20 09:03:38 +01:00
Kibana Machine
5f04ba0b8d
[api-docs] 2025-01-20 Daily api_docs build (#207163)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/958
2025-01-20 07:01:08 +00:00
Matthew Kime
ecd24c44f4
[dev console] Fix embedded console rendering (#207120)
## Summary

https://github.com/elastic/kibana/pull/206887 introduced a rendering bug
to the embedded console. This PR moves the scss so that its imported in
both the console app and the embedded console, whereas previously it was
only imported to the app.



https://github.com/user-attachments/assets/60365bc4-c0c9-4642-a92b-78aa6f33c719
2025-01-19 22:10:40 -06:00
Tiago Vila Verde
b07849cc5a
[Entity Store][Asset Inventory] Dynamic field retention for universal entity (#206419)
## Summary

This PR improves upon the Universal entity definition and entity store
work being done to support Asset Inventory by introducing a flag
`dynamic` to the definition.

The entity store uses an enrich policy in order to retain observed data
that falls outside of a `lookbackPeriod` used by the transform that runs
the aggregations on the source fields.
Normally, we have to specify a retention strategy per each field defined
in an entity definition. However, for universal entities, (some of) the
fields are dynamically generated based on the JSON extractor pipeline
processor, which means we cannot define which strategy to use in the
definition itself.
To account for this, when `dynamic` is set to `true`, we run an extra
ingest pipeline step to process _any field which does not show up in the
entity definition_ (ie, has been dynamically generated). At the moment,
this pipeline step uses a strategy that always picks the latest value,
although int he future, this might need to be configurable, mimicking
the ability to choose strategies for "static" fields.

See this
[doc](https://docs.google.com/document/d/1D8xDtn3HHP65i1Y3eIButacD6ZizyjZZRJB7mxlXzQY/edit?tab=t.0#heading=h.9fz3qtlfzjg7)
for more details and [this
Figma](https://www.figma.com/board/17dpxrztlM4O120p9qMcNw/Entity-descriptions?node-id=0-1&t=JLcB84l9NxCnudAs-1)
for information regarding Entity Store architecture.



## How to test:

### Setup

1. Ensure the default Security Data View exists by navigating to some
Security solution UI.
2. Set up the `entity.keyword` builder pipeline
* Add it to an index that matches any of the default index patterns in
the security data view (eg: `logs-store`)
* Make sure and ingested doc contains both `event.ingested` and
`@timestamp`.
      * Easiest way is to add `set` processors to the builder pipeline.
3. Because of the async nature of the field retention process, it is
recommended to change some of the default values (explained below)
4. Enable `debugging` by adding
`xpack.securitySolution.entityAnalytics.entityStore.developer.pipelineDebugMode:
true` to your `kibana.dev.yml`
5. Enable the `assetInventoryStoreEnabled` FF: 
```
xpack.securitySolution.enableExperimental:
  - assetInventoryStoreEnabled
```

### Interacting with the store

In Kibana dev tools:

#### Phase 1
1. `POST` some of the example docs to the `logs-store` index
2. Confirm the `entity.keyword` field is being added by the builder
pipeline via `GET logs-store/_search`.
3. Initialise the universal entity engine via: `POST
kbn:/api/entity_store/engines/universal/init {}`
* In order to properly test field retention, it's advisable to reduce
the `lookbackPeriod` setting, which means some of the docs in the index
might fall out of the window if it takes too long to initialize the
engine. Any docs posted when the engine is running should be picked up.
* Note that using the UI does not work, as we've specifically removed
the Universal engine from the normal Entity Store workflow
4. Check the status of the store is `running` via `GET
kbn:/api/entity_store/status`
5. Check that the transform has ran by querying the store index: `GET
.entities.v1.latest.security_universal*/_search`
* There should be one entity per `related.entity` found in the source
index
* The fields in the JSON string in `entities.keyword` should appear as
fields in the target documents
* There should also be a `debug` field and potentially a `historical`
field, if enough time has passed for the enrich policy to run. These are
normally hidden, but show up when in `debug mode`.

#### Phase 2

1. Wait some time (the `INTERVAL` constant) for the enrich policy to
populate the `.enrich` indices with the latest data from the store index
* Ideally, this will mean that any docs in the source index now fall
outside of `lookbackPeriod` of the transform.
* Alternatively, you can manually run the enrich poly via: `PUT
/_enrich/policy/entity_store_field_retention_universal_default_v1.0.0/_execute`.
* It's also possible to update the source docs' timestamps and
`event.ingested` to ensure they're outside the `lookbackPeriod`
3. `POST` a new doc to the source index (eg: `logs-store`)
* The new doc should either have a new, not yet observed property in
`entities.metadata`, or the same fields but with different, new values.
4. Query the store index again. 
* The entity in question should now reflect the new changes _but
preserve the old data too!_
   * Existing fields should have been updated to new values
* New fields should have been `recursively` merged. Ie, nested fields
should not be an issue.
* The `historical` field should show the "previous state" of the entity
doc. This is useful to confirm that a field's value is, in fact, the
"latest" value, whether that comes from a new doc that falls in the
lookback window of the transform, or from this `historical` "cache".
 


### Code

#### Default values:

* in
[`server/lib/entity_analytics/entity_store/entity_definition/universal.ts#L75-L76`](6686d57ce5/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/entity_store/entity_definitions/entity_descriptions/universal.ts (L75-L76)):
    * Add the following fields to `settings`: 
    ```ts
      { frequency: '2s', lookbackPeriod: '1m', syncDelay: '2s'}
    ```
* in
[`server/lib/entity_analytics/entity_store/task/constants.ts#L11-L13`](6686d57ce5/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/entity_store/task/constants.ts (L11-L13))
   * Change the following defaults: 
   ```ts
     export const INTERVAL = '1m';
     export const TIMEOUT = '30s';
   ```

#### Ingest pipeline

<details>
<summary>Pipeline</summary>

```js
PUT _ingest/pipeline/entities-keyword-builder
{
   "description":"Serialize entities.metadata into a keyword field",
   "processors":[
      {
         "set": {
           "field": "event.ingested",
           "value": "{{_ingest.timestamp}}"
         }
      },
      {
         "set": {
           "field": "@timestamp",
           "value": "{{_ingest.timestamp}}"
         }
      },
      {
         "script":{
            "lang":"painless",
            "source":"""
String jsonFromMap(Map map) {
    StringBuilder json = new StringBuilder("{");
    boolean first = true;

    for (entry in map.entrySet()) {
        if (!first) {
            json.append(",");
        }
        first = false;

        String key = entry.getKey().replace("\"", "\\\"");
        Object value = entry.getValue();

        json.append("\"").append(key).append("\":");

        if (value instanceof String) {
            String escapedValue = ((String) value).replace("\"", "\\\"").replace("=", ":");
            json.append("\"").append(escapedValue).append("\"");
        } else if (value instanceof Map) {
            json.append(jsonFromMap((Map) value));
        } else if (value instanceof List) {
            json.append(jsonFromList((List) value));
        } else if (value instanceof Boolean || value instanceof Number) {
            json.append(value.toString());
        } else {
            // For other types, treat as string
            String escapedValue = value.toString().replace("\"", "\\\"").replace("=", ":");
            json.append("\"").append(escapedValue).append("\"");
        }
    }

    json.append("}");
    return json.toString();
}

String jsonFromList(List list) {

    StringBuilder json = new StringBuilder("[");
    boolean first = true;

    for (item in list) {
        if (!first) {
            json.append(",");
        }
        first = false;

        if (item instanceof String) {
            String escapedItem = ((String) item).replace("\"", "\\\"").replace("=", ":");
            json.append("\"").append(escapedItem).append("\"");
        } else if (item instanceof Map) {
            json.append(jsonFromMap((Map) item));
        } else if (item instanceof List) {
            json.append(jsonFromList((List) item));
        } else if (item instanceof Boolean || item instanceof Number) {
            json.append(item.toString());
        } else {
            // For other types, treat as string
            String escapedItem = item.toString().replace("\"", "\\\"").replace("=", ":");
            json.append("\"").append(escapedItem).append("\"");
        }
    }

    json.append("]");
    return json.toString();
}

def metadata = jsonFromMap(ctx['entities']['metadata']);
ctx['entities']['keyword'] = metadata;
"""

            }
        }
    ]
}
```
</details>


<details>
<summary>Index template</summary>

```js
PUT /_index_template/entity_store_index_template
{
   "index_patterns":[
      "logs-store"
   ],
   "template":{
      "settings":{
         "index":{
            "default_pipeline":"entities-keyword-builder"
         }
      },
      "mappings":{
         "properties":{
            "@timestamp":{
               "type":"date"
            },
            "message":{
               "type":"text"
            },
            "event":{
               "properties":{
                  "action":{
                     "type":"keyword"
                  },
                  "category":{
                     "type":"keyword"
                  },
                  "type":{
                     "type":"keyword"
                  },
                  "outcome":{
                     "type":"keyword"
                  },
                  "provider":{
                     "type":"keyword"
                  },
                  "ingested":{
                    "type": "date"
                  }
               }
            },
            "related":{
               "properties":{
                  "entity":{
                     "type":"keyword"
                  }
               }
            },
            "entities":{
               "properties":{
                  "metadata":{
                     "type":"flattened"
                  },
                  "keyword":{
                     "type":"keyword"
                  }
               }
            }
         }
      }
   }
}
```
</details>

<details>
<summary>Example source docs</summary>

#### Phase 1:

```js
POST /logs-store/_doc/
{
   "related":{
      "entity":[
         "test-id"
      ]
   },
   "entities":{
      "metadata":{
         "test-id":{
            "okta":{
               "foo": {
                  "baz": {
                     "qux": 1
                  }

               }
            },
            "cloud": {
               "super": 123
            }
         }
      }
   }
}
```

```js
POST /logs-store/_doc/
{
   "related":{
      "entity":[
         "test-id"
      ]
   },
   "entities":{
      "metadata":{
         "test-id":{
            "cloud":{
               "host": "me"
            }
         }
      }
   }
}
```

#### Phase 2:

```js
POST /logs-store/_doc/
{
   "related":{
      "entity":[
         "test-id"
      ]
   },
   "entities":{
      "metadata":{
         "test-id":{
            "cloud":{
               "host": "me",
               "super": 1111111,
            },
            "okta":{
               "foo": {
                  "baz": {
                     "qux": 99,
                     "hello": "world"
                  },
                  "hello": "world"
               },
               "hello": "world"
            }
         }
      }
   }
}
```

</details>
2025-01-19 23:37:10 +00:00
Rômulo Farias
175cfb8b62
Add keyword builder pipeline 2025-01-19 14:38:32 +02:00
Amir Ben Nun
fec5d74398
[Fleet] Send Agentless API resources (#206042)
## Summary

Conclude agentless policy resources and send them to the Agentless API
on the creation request.
- Resolves: https://github.com/elastic/kibana/issues/203371
2025-01-19 12:52:10 +02:00
Kibana Machine
37a6b357ab
[api-docs] 2025-01-19 Daily api_docs build (#207150)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/957
2025-01-19 07:04:06 +00:00
Arturo Lidueña
d577177198
[Obs AI Assistant] Error when using ollama model locally (#206739)
Closes #204116

## Summary

fix:
o11y assistant Error, when using the model (llama 3.2) the stream get
closed in the middle and fails with an error related to the title
generation
2025-01-18 10:06:17 +01:00
Kibana Machine
5b7520f187
[api-docs] 2025-01-18 Daily api_docs build (#207145)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/956
2025-01-18 07:01:32 +00:00
Kevin Delemme
ac0a6e4100
fix(slo): non-breaking changes of an SLO running with older resources is a breaking change (#207090) 2025-01-17 21:24:51 -05:00
elastic-renovate-prod[bot]
4f4637da58
Update dependency oas to ^25.2.1 (main) (#206997)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [oas](https://togithub.com/readmeio/oas)
([source](https://togithub.com/readmeio/oas/tree/HEAD/packages/oas)) |
dependencies | patch | [`^25.2.0` ->
`^25.2.1`](https://renovatebot.com/diffs/npm/oas/25.2.0/25.2.1) |

---

### Release Notes

<details>
<summary>readmeio/oas (oas)</summary>

###
[`v25.2.1`](https://togithub.com/readmeio/oas/compare/oas@25.2.0...oas@25.2.1)

[Compare
Source](https://togithub.com/readmeio/oas/compare/oas@25.2.0...oas@25.2.1)

</details>

---

### Configuration

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

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

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

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

---

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

---

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

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOlNlY3VyaXR5LVNjYWxhYmlsaXR5IiwiYmFja3BvcnQ6YWxsLW9wZW4iLCJyZWxlYXNlX25vdGU6c2tpcCJdfQ==-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2025-01-17 23:00:23 +00:00
elastic-renovate-prod[bot]
11edc823e6
Update docker.elastic.co/wolfi/chainguard-base:latest Docker digest to ea157dd (main) (#207098)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| docker.elastic.co/wolfi/chainguard-base | digest | `dd66bee` ->
`ea157dd` |

---

### Configuration

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

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

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

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

---

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

---

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

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOk9wZXJhdGlvbnMiLCJiYWNrcG9ydDpza2lwIiwicmVsZWFzZV9ub3RlOnNraXAiXX0=-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2025-01-17 13:16:34 -06:00
Saikat Sarkar
575d57e8fa
Update semantic_text query to use highlighting option (#205795)
This PR addresses [this
issue](https://github.com/elastic/search-team/issues/8928) by replacing
the current semantic_text implementation, which uses inner_hit, with
semantic_text highlighting.


https://github.com/user-attachments/assets/bac8abf7-ec50-4463-b0ad-d3152872253a

---------

Co-authored-by: Joseph McElroy <joseph.mcelroy@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-01-17 18:42:15 +00:00
Sander Philipse
63fc1eae9f
[Search] Add a search guide selector to index onboarding (#206810)
## Summary

This adds a guide selector to the Kibana index management onboarding
experience.

It also fixes a bug where useQuery was causing us to re-render the page
unnecessarily.

<img width="1284" alt="Screenshot 2025-01-15 at 16 11 48"
src="https://github.com/user-attachments/assets/19abe86f-3148-442a-8e1e-8b6b8eeb2ba1"
/>

### 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] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Rodney Norris <rodney@tattdcodemonkey.com>
2025-01-17 18:30:50 +00:00
Sonia Sanz Vivas
ba0aa3ff43
[IML] Replace behindtext vars with euiColorVisBehindText (#206026)
Part of https://github.com/elastic/kibana/issues/203664

## Summary

EUI added `behindText` vis colors to the euiTheme. Replacing here
`euiThemeVars` with the new vis colors.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-17 18:26:33 +00:00
Kibana Machine
032f072b16 skip failing test suite (#206580) 2025-01-18 04:52:43 +11:00
Ievgen Sorokopud
bd19bcc005
[Rules migration] Improvements & fixes (#206658)
## Summary

[Internal link](https://github.com/elastic/security-team/issues/10820)
to the feature details

This PR includes next improvements and fixes

### Improvements

1. [PR feedback] Improved filtering:
https://github.com/elastic/kibana/pull/206089#discussion_r1913256593
2. [PR feedback] Use variable instead of massive destructing object:
https://github.com/elastic/kibana/pull/206089#discussion_r1913268303
3. `Upload` missing resources button
4. Show comment as a tooltip within the `Status` column for the failed
rule
![Screenshot 2025-01-15 at 13 34
11](https://github.com/user-attachments/assets/4c25aeab-3193-490b-90eb-ccc4f4ef8a9f)

### Fixes

1. Better error handling
2. Fetch all existing rules (via batches search) instead of 10k limit

> [!NOTE]  
> This feature needs `siemMigrationsEnabled` experimental flag enabled
to work.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-17 18:23:33 +01:00
Dominique Clarke
5ab8a52187
[Investigate App] add MVP evaluation framework for AI root cause analysis integration (#204634)
## Summary

Extends the Observability AI Assistant's evaluation framework to create
the first set of tests aimed at evaluating the performance of the
Investigation App's AI root cause analysis integration.

To execute tests, please consult the
[README](https://github.com/elastic/kibana/pull/204634/files#diff-4823a154e593051126d3d5822c88d72e89d07f41b8c07a5a69d18281c50b09adR1).
Note the prerequisites and the Kibana & Elasticsearch configuration.

Further evolution
--
This PR is the first MVP of the evaluation framework. A (somewhat light)
[meta issue](https://github.com/elastic/kibana/issues/205670) exists for
our continued work on this project, and will be added to over time.

Test data and fixture architecture
--
Logs, metrics, and traces are indexed to
[edge-rca](https://studious-disco-k66oojq.pages.github.io/edge-rca/).
Observability engineers can [create an oblt-cli
cluster](https://studious-disco-k66oojq.pages.github.io/user-guide/cluster-create-ccs/)
configured for cross cluster search against edge-rca as the remote
cluster.

When creating new testing fixtures, engineers will utilize their
oblt-cli cluster to create rules against the remote cluster data. Once
alerts are triggered in a failure scenario, the engineer can choose to
archive the alert data to utilize as a test fixture.

Test fixtures are added to the `investigate_app/scripts/load/fixtures`
directory for use in tests.

When execute tests, the fixtures are loaded into the engineer's oblt-cli
cluster, configured for cross cluster search against edge-rca. The local
alert fixture and the remote demo data are utilized together to replay
root cause analysis and execute the test evaluations.

Implementation
--

Creates a new directory `scripts`, to house scripts related to setting
up and running these tests. Here's what each directory does:
## scripts/evaluate
1. Extends the evaluation script from
`observability_ai_assistant_app/scripts/evaluation` by creating a
[custom Kibana
client](https://github.com/elastic/kibana/pull/204634/files#diff-ae05b2a20168ea08f452297fc1bd59310c69ac3ea4651da1f65cd9fa93bb8fe9R1)
with RCA specific methods. The custom client is [passed to the
Observability AI Assistant's
`runEvaluations`](https://github.com/elastic/kibana/pull/204634/files#diff-0f2d3662c01df8fbe7d1f19704fa071cbd6232fb5f732b313e8ba99012925d0bR14)
script an[d invoked instead of the default Kibana
Client](https://github.com/elastic/kibana/pull/204634/files#diff-98509a357e86ea5c5931b1b46abc72f76e5304439430358eee845f9ad57f63f1R54).
2. Defines a single, MVP test in `index.spec.ts`. This test find a
specific alert fixture designated for that test, creates an
investigation for that alert with a specified time range, and calls the
root cause analysis api. Once the report is received back from the api,
a prompt is created for the evaluation framework with details of the
report. The evaluation framework then judges how well the root cause
analysis api performed against specified criteria.
## scripts/archive
1. Utilized when creating new test fixtures, this script will easily
archive observability alerts data for use as a fixture in a feature test
## scripts/load
1. Loads created testing fixtures before running the test.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dario Gieselaar <d.gieselaar@gmail.com>
2025-01-17 12:16:10 -05:00
Elena Stoeva
61c2d18e5c
[Index Management/Data Streams] Add warning callout in single edit data retention modal (#206760)
Closes https://github.com/elastic/kibana/issues/204992

## Summary

Callout for single edit data retention (opened from data stream details
panel):
<img width="1446" alt="Screenshot 2025-01-15 at 13 29 29"
src="https://github.com/user-attachments/assets/c415e634-4b39-43d3-b1ae-8a1de55cb144"
/>



For reference, this is the callout for bulk edit data retention (exists
from before this PR):

<img width="1446" alt="Screenshot 2025-01-15 at 13 26 08"
src="https://github.com/user-attachments/assets/6d167f94-9882-4b48-b1f9-20d26e9bdea7"
/>


**How to test:**
1. Start Es and Kibana
2. Go to Index Management -> Data streams and click on one of the data
streams.
3. Click on the "Manage" button and edit data retention.
4. Decrease the data retention period and verify that the callout
message is correct.
5. Also, verify that the callout message in the bulk edit data retention
modal is still the same.
2025-01-17 17:15:37 +00:00
Mykola Harmash
ad30ed8d69
Add OTel K8S e2e test for Ensemble (#206756)
This adds an e2e test for [the Ensemble
workflow](https://github.com/elastic/ensemble/actions/workflows/nightly.yml)
to cover stack installation part of the OTel K8S quickstart flow.

Besides that I've replaced the retry logic for K8S EA and Auto Detect
flow with a simple timeouts to workaround the missing data issue on the
CTA pages (host details and k8s dashboard) after finishing the
onboarding flow. I've also simplified assertions on the CTA pages.
2025-01-17 17:09:58 +00:00
Catherine Liu
cd71ca903b
[Canvas] Fix colors for Borealis (#207012)
## Summary

Closes #204597.

This changes the `success` colored buttons into `primary` colored
buttons in Canvas. There are no other necessary color/style changes for
Borealis in Canvas.

<img width="1859" alt="Screenshot 2025-01-16 at 3 44 05 PM"
src="https://github.com/user-attachments/assets/03febdfa-6f9f-4017-99f2-f6eaf82ad07f"
/>

### Variable save button
#### Before
<img width="348" alt="Screenshot 2025-01-16 at 3 33 54 PM"
src="https://github.com/user-attachments/assets/20cdb998-617e-4a96-9e9f-c497be1682c7"
/>

#### After
<img width="350" alt="Screenshot 2025-01-16 at 3 34 20 PM"
src="https://github.com/user-attachments/assets/b7bf6962-ccd2-4e32-8003-73d7245395f2"
/>


### Add page button
#### Before
<img width="952" alt="Screenshot 2025-01-16 at 3 33 06 PM"
src="https://github.com/user-attachments/assets/6c9db0c4-46db-47c5-bfe6-44307928bd0b"
/>

#### After
<img width="804" alt="Screenshot 2025-01-16 at 3 47 20 PM"
src="https://github.com/user-attachments/assets/b45f0977-fcad-44a1-be6f-ffb587851e12"
/>

### Datasource save button
#### Before
<img width="345" alt="Screenshot 2025-01-16 at 3 32 23 PM"
src="https://github.com/user-attachments/assets/5f926b8c-057e-4925-a932-1a69b6077980"
/>

#### After
<img width="181" alt="Screenshot 2025-01-16 at 3 30 58 PM"
src="https://github.com/user-attachments/assets/d38bf8c7-6971-4840-8866-9303f963ed3f"
/>

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

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

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

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
2025-01-17 08:29:45 -08:00
elastic-renovate-prod[bot]
fdf83cceb2
Update platform security modules (main) (#206227)
### Manual update 2025-01-14:
uuid v11 contains breaking changes. uuid will be bumped to v10 instead.

### This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
|
[@types/js-yaml](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/js-yaml)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/js-yaml))
| devDependencies | patch | [`^4.0.5` ->
`^4.0.9`](https://renovatebot.com/diffs/npm/@types%2fjs-yaml/4.0.5/4.0.9)
| |
|
[@types/lodash](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lodash)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash))
| devDependencies | patch | [`^4.17.13` ->
`^4.17.14`](https://renovatebot.com/diffs/npm/@types%2flodash/4.17.13/4.17.14)
| |
|
[@types/object-hash](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/object-hash)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/object-hash))
| devDependencies | major | [`^1.3.0` ->
`^3.0.6`](https://renovatebot.com/diffs/npm/@types%2fobject-hash/1.3.0/3.0.6)
| |
|
[@types/uuid](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/uuid)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/uuid))
| devDependencies | major | [`^9.0.0` ->
`^10.0.0`](https://renovatebot.com/diffs/npm/@types%2fuuid/9.0.0/10.0.0)
| |
| [dependency-cruiser](https://togithub.com/sverweij/dependency-cruiser)
| devDependencies | minor | [`^16.4.2` ->
`^16.8.0`](https://renovatebot.com/diffs/npm/dependency-cruiser/16.4.2/16.8.0)
| `16.9.0` |
| [fast-deep-equal](https://togithub.com/epoberezkin/fast-deep-equal) |
dependencies | patch | [`^3.1.1` ->
`^3.1.3`](https://renovatebot.com/diffs/npm/fast-deep-equal/3.1.3/3.1.3)
| |
| [minimist](https://togithub.com/minimistjs/minimist) | devDependencies
| patch | [`^1.2.6` ->
`^1.2.8`](https://renovatebot.com/diffs/npm/minimist/1.2.8/1.2.8) | |
| [object-hash](https://togithub.com/puleos/object-hash) | dependencies
| major | [`^1.3.1` ->
`^3.0.0`](https://renovatebot.com/diffs/npm/object-hash/1.3.1/3.0.0) | |
| [uuid](https://togithub.com/uuidjs/uuid) | dependencies | major |
[~~`9.0.0` ->
`11.0.3`~~](https://renovatebot.com/diffs/npm/uuid/9.0.0/11.0.3)`9.0.0`
-> `10.0.0` | ~~`11.0.5` (+1)~~ |

---

### Release Notes

<details>
<summary>sverweij/dependency-cruiser (dependency-cruiser)</summary>

###
[`v16.8.0`](https://togithub.com/sverweij/dependency-cruiser/releases/tag/v16.8.0)

[Compare
Source](https://togithub.com/sverweij/dependency-cruiser/compare/v16.7.0...v16.8.0)

####  features

-
[`dd81580`](dd815802)
feat: enables matching transitive dependencies in 'required' rules
([#&#8203;975](https://togithub.com/sverweij/dependency-cruiser/issues/975))
- thanks to [@&#8203;ThiagoMaia1](https://togithub.com/ThiagoMaia1) for
suggesting and testing the feature

#### 🐛 fixes

-
[`7bcabe7`](7bcabe70)
refactor: simplifies a few boolean expressions
- the dependency bump below
([`20a7a2f`](20a7a2f1))
also bumped `watskeburt` to latest, which makes both the `--affected`
cli option and the cache work better on ms-windows and other ms-dos
based operating systems.

#### 👷 maintenance

-
[`20a7a2f`](20a7a2f1)
build(npm): updates external dependencies

#### 🧹 chores

-
[`fdbb72a`](fdbb72a1)
chore(configs): makes 'unlimited' config inherit individual options from
the base config
-
[`8595b73`](8595b73d)
chore(tools): adds a script that prints a readable AST from any
tsc-readable file
-
[`476c956`](476c9562)
chore(npm): updates external devDependencies

###
[`v16.7.0`](https://togithub.com/sverweij/dependency-cruiser/releases/tag/v16.7.0)

[Compare
Source](https://togithub.com/sverweij/dependency-cruiser/compare/v16.6.0...v16.7.0)

####  feature: recognize type imports in jsdoc

Dependency-cruiser now has the ability to recognize imports in jsdoc -
both the new ones [introduced in
TS5.5](https://devblogs.microsoft.com/typescript/announcing-typescript-5-5/#the-jsdoc-import-tag)
(e.g. `/** @&#8203;import { something } from "blah"; */`), as well as
the [older
ones](https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#import-types)
(e.g. `/** @&#8203;type {import('blah').something} */`). It's behind [an
option](https://togithub.com/sverweij/dependency-cruiser/blob/main/doc/options-reference.md#detectjsdocimports-detect-dependencies-in-jsdoc-comments)
so it will only detect them if you want it to.

Thanks to [@&#8203;louwers](https://togithub.com/louwers) for raising
the associated issue and testing a very early version of PR
[#&#8203;965](https://togithub.com/sverweij/dependency-cruiser/issues/965)

- See [detectJSDocImports: detect dependencies in JSDoc
comments](https://togithub.com/sverweij/dependency-cruiser/blob/main/doc/options-reference.md#detectjsdocimports-detect-dependencies-in-jsdoc-comments)
in the options references for more information and some of the caveats
(a.o. *really* needs the TypeScript compiler)
- The PR's also grew the
[dependencyTypes](https://togithub.com/sverweij/dependency-cruiser/blob/main/doc/rules-reference.md#ok---unknown-npm-unknown-undetermined---im-officially-weirded-out---whats-that-about)
`jsdoc`, `jsdoc-bracket-import` and `jsdoc-import-tag` for use in your
rules.

commits:

-
[`09e9e41`](09e9e415)
feat(extract): adds recognition of jsdoc `@import` type imports
([#&#8203;965](https://togithub.com/sverweij/dependency-cruiser/issues/965))
-
[`0d49477`](0d494774)
feat(extract): adds recognition of the 'classic' jsdoc 'bracket' imports
([#&#8203;969](https://togithub.com/sverweij/dependency-cruiser/issues/969))
-
[`fedead6`](fedead65)
feat(init): adds question to enable detection of jsdoc imports
([#&#8203;970](https://togithub.com/sverweij/dependency-cruiser/issues/970))

#### 🐛 fixes

-
[`09ae707`](09ae707e)
fix(npm): shortens the message in the (only) distributed script

#### 👷 maintenance

-
[`aae6edd`](aae6eddf)/
[`b5bfe76`](b5bfe76a)
refactor: addresses small linting issues
-
[`2d2b0e5`](2d2b0e5d)
refactor(resolve): uses Maps for the context maps
-
[`79e1aa1`](79e1aa19)
build(npm): updates external dependencies
-
[`09ae707`](09ae707e)
fix(npm): shortens the message in the (only) distributed script

#### 🧹  chores

-
[`8a288dd`](8a288dda)
chore: migrates to eslint 9 & flat config
([#&#8203;968](https://togithub.com/sverweij/dependency-cruiser/issues/968))
-
[`69b59b6`](69b59b69)
chore: makes ci use node 23 instead of 22
-
[`78960d3`](78960d37)
build(npm): adds svgo to devDependencies

###
[`v16.6.0`](https://togithub.com/sverweij/dependency-cruiser/releases/tag/v16.6.0)

[Compare
Source](https://togithub.com/sverweij/dependency-cruiser/compare/v16.5.0...v16.6.0)

####  features

-
[`b473be5`](b473be5b)
feat: adds support for svelte 5
([#&#8203;963](https://togithub.com/sverweij/dependency-cruiser/issues/963))

#### 👷 maintenance

-
[`7683e90`](7683e904)
fix(extract): removes extraneous capturing group from a regular
expression
-
[`65f2748`](65f27486)
build(npm): updates external dependencies

###
[`v16.5.0`](https://togithub.com/sverweij/dependency-cruiser/releases/tag/v16.5.0)

[Compare
Source](https://togithub.com/sverweij/dependency-cruiser/compare/v16.4.2...v16.5.0)

####  features

-
[`802ff6f`](802ff6fa)
feat(cli): expands the info displayed in --info
([#&#8203;959](https://togithub.com/sverweij/dependency-cruiser/issues/959))

#### 📖  documentation

-
[`1ca77ec`](1ca77ec0)
doc(FAQ): corrects a typo
-
[`8269857`](82698571)
doc(cli): clarify when using --max-depth is a good idea (*never, that's
when* 😄)

#### 👷 maintenance

-
[`9453f20`](9453f201)
build(npm): updates external dependencies

</details>

<details>
<summary>puleos/object-hash (object-hash)</summary>

###
[`v3.0.0`](https://togithub.com/puleos/object-hash/compare/v2.2.0...v3.0.0)

[Compare
Source](https://togithub.com/puleos/object-hash/compare/v2.2.0...v3.0.0)

###
[`v2.2.0`](https://togithub.com/puleos/object-hash/compare/v2.1.1...v2.2.0)

[Compare
Source](https://togithub.com/puleos/object-hash/compare/v2.1.1...v2.2.0)

###
[`v2.1.1`](f61b9a5d58...v2.1.1)

[Compare
Source](f61b9a5d58...v2.1.1)

###
[`v2.1.0`](https://togithub.com/puleos/object-hash/compare/v2.0.3...f61b9a5d584158abc3e31c29d2b1fa3d74772677)

[Compare
Source](https://togithub.com/puleos/object-hash/compare/v2.0.3...f61b9a5d584158abc3e31c29d2b1fa3d74772677)

###
[`v2.0.3`](https://togithub.com/puleos/object-hash/compare/v2.0.2...v2.0.3)

[Compare
Source](https://togithub.com/puleos/object-hash/compare/v2.0.2...v2.0.3)

###
[`v2.0.2`](https://togithub.com/puleos/object-hash/compare/v2.0.1...v2.0.2)

[Compare
Source](https://togithub.com/puleos/object-hash/compare/v2.0.1...v2.0.2)

###
[`v2.0.1`](https://togithub.com/puleos/object-hash/compare/v2.0.0...v2.0.1)

[Compare
Source](https://togithub.com/puleos/object-hash/compare/v2.0.0...v2.0.1)

###
[`v2.0.0`](https://togithub.com/puleos/object-hash/compare/v1.3.1...v2.0.0)

[Compare
Source](https://togithub.com/puleos/object-hash/compare/v1.3.1...v2.0.0)

</details>

<details>
<summary>uuidjs/uuid (uuid)</summary>

###
[`v11.0.3`](https://togithub.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#1103-2024-11-04)

[Compare
Source](https://togithub.com/uuidjs/uuid/compare/v11.0.2...v11.0.3)

##### Bug Fixes

- apply stricter typing to the v\* signatures
([#&#8203;831](https://togithub.com/uuidjs/uuid/issues/831))
([c2d3fed](c2d3fed22c))
- export internal uuid types
([#&#8203;833](https://togithub.com/uuidjs/uuid/issues/833))
([341edf4](341edf444c))
- remove sourcemaps
([#&#8203;827](https://togithub.com/uuidjs/uuid/issues/827))
([b93ea10](b93ea101af))
- revert "simplify type for v3 and v5"
([#&#8203;835](https://togithub.com/uuidjs/uuid/issues/835))
([e2dee69](e2dee691e9))

###
[`v11.0.2`](https://togithub.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#1102-2024-10-28)

[Compare
Source](https://togithub.com/uuidjs/uuid/compare/v11.0.1...v11.0.2)

##### Bug Fixes

- remove wrapper.mjs
([#&#8203;822](https://togithub.com/uuidjs/uuid/issues/822))
([6683ad3](6683ad38b0))

###
[`v11.0.1`](https://togithub.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#1101-2024-10-27)

[Compare
Source](https://togithub.com/uuidjs/uuid/compare/v11.0.0...v11.0.1)

##### Bug Fixes

- restore package.json#browser field
([#&#8203;817](https://togithub.com/uuidjs/uuid/issues/817))
([ae8f386](ae8f38657b))

###
[`v11.0.0`](https://togithub.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#1100-2024-10-26)

[Compare
Source](https://togithub.com/uuidjs/uuid/compare/v10.0.0...v11.0.0)

##### ⚠ BREAKING CHANGES

- refactor v1 internal state and options logic
([#&#8203;780](https://togithub.com/uuidjs/uuid/issues/780))
- refactor v7 internal state and options logic, fixes
[#&#8203;764](https://togithub.com/uuidjs/uuid/issues/764)
([#&#8203;779](https://togithub.com/uuidjs/uuid/issues/779))
- Port to TypeScript, closes
[#&#8203;762](https://togithub.com/uuidjs/uuid/issues/762)
([#&#8203;763](https://togithub.com/uuidjs/uuid/issues/763))
- update node support matrix (only support node 16-20)
([#&#8203;750](https://togithub.com/uuidjs/uuid/issues/750))

##### Features

- Port to TypeScript, closes
[#&#8203;762](https://togithub.com/uuidjs/uuid/issues/762)
([#&#8203;763](https://togithub.com/uuidjs/uuid/issues/763))
([1e0f987](1e0f9870db))
- update node support matrix (only support node 16-20)
([#&#8203;750](https://togithub.com/uuidjs/uuid/issues/750))
([883b163](883b163b9a))

##### Bug Fixes

- missing v7 expectations in browser spec
([#&#8203;751](https://togithub.com/uuidjs/uuid/issues/751))
([f54a866](f54a866ced))
- refactor v1 internal state and options logic
([#&#8203;780](https://togithub.com/uuidjs/uuid/issues/780))
([031b3d3](031b3d3d73))
- refactor v7 internal state and options logic, fixes
[#&#8203;764](https://togithub.com/uuidjs/uuid/issues/764)
([#&#8203;779](https://togithub.com/uuidjs/uuid/issues/779))
([9dbd1cd](9dbd1cd417))
- remove v4 options default assignment preventing native.randomUUID from
being used ([#&#8203;786](https://togithub.com/uuidjs/uuid/issues/786))
([afe6232](afe62323c4)),
closes [#&#8203;763](https://togithub.com/uuidjs/uuid/issues/763)
- seq_hi shift for byte 6
([#&#8203;775](https://togithub.com/uuidjs/uuid/issues/775))
([1d532ca](1d532ca374))
- tsconfig module type
([#&#8203;778](https://togithub.com/uuidjs/uuid/issues/778))
([7eff835](7eff835cba))

###
[`v10.0.0`](https://togithub.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#1000-2024-06-07)

[Compare
Source](https://togithub.com/uuidjs/uuid/compare/v9.0.1...v10.0.0)

##### ⚠ BREAKING CHANGES

- update node support (drop node@12, node@14, add node@20)
([#&#8203;750](https://togithub.com/uuidjs/uuid/issues/750))

##### Features

- support support rfc9562 MAX uuid (new in RFC9562)
([#&#8203;714](https://togithub.com/uuidjs/uuid/issues/714))
([0385cd3](0385cd3f18))
- support rfc9562 v6 uuids
([#&#8203;754](https://togithub.com/uuidjs/uuid/issues/754))
([c4ed13e](c4ed13e715))
- support rfc9562 v7 uuids
([#&#8203;681](https://togithub.com/uuidjs/uuid/issues/681))
([db76a12](db76a12847))
- update node support matrix (only support node 16-20)
([#&#8203;750](https://togithub.com/uuidjs/uuid/issues/750))
([883b163](883b163b9a))
- support rfc9562 v8 uuids
([#&#8203;759](https://togithub.com/uuidjs/uuid/issues/759))
([35a5342](35a5342820))

##### Bug Fixes

- revert "perf: remove superfluous call to toLowerCase
([#&#8203;677](https://togithub.com/uuidjs/uuid/issues/677))"
([#&#8203;738](https://togithub.com/uuidjs/uuid/issues/738))
([e267b90](e267b9073d))

###
[`v9.0.1`](https://togithub.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#901-2023-09-12)

[Compare
Source](https://togithub.com/uuidjs/uuid/compare/v9.0.0...v9.0.1)

##### build

-   Fix CI to work with Node.js 20.x

</details>

---

### Configuration

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

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

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

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

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

---

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

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOlNlY3VyaXR5IiwiYmFja3BvcnQ6YWxsLW9wZW4iLCJyZWxlYXNlX25vdGU6c2tpcCJdfQ==-->

---------

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>
2025-01-17 16:46:36 +01:00
Stratoula Kalafateli
b77886c034
[Filters] Improves relative time check (#207046)
## Summary

Improves relative time check for the range time filter (as a follow up
of https://github.com/elastic/kibana/pull/206914)

### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2025-01-17 17:19:56 +02:00
Sergi Massaneda
38945cf12a
[Security Solution] Fix fields in test doc (#207062)
## Summary

Fixes a type error in main caused by a race condition merging these 2
PRs:

- https://github.com/elastic/kibana/pull/206822
- https://github.com/elastic/kibana/pull/206833
2025-01-17 14:35:26 +00:00
Nicolas Chaulet
d7513a1ed1
[Fleet] Fix verify test package test (#207006) 2025-01-17 09:03:37 -05:00
Ievgen Sorokopud
64f872e617
[Rules migration] Threat Hunting team as a codeowner for SIEM Migrations integration tests (#207067)
## Summary

[Internal link](https://github.com/elastic/security-team/issues/10820)
to the feature details

Set @elastic/security-threat-hunting as codewoners of the SIEM
Migrations integration tests folder.

> [!NOTE]  
> This feature needs `siemMigrationsEnabled` experimental flag enabled
to work.
2025-01-17 13:51:55 +00:00
Abhishek Bhatia
e266c83b81
[Entity Analytics] Adding changes for event.ingested in riskScore and assetCriticality (#203975)
## Summary

This pull request introduces changes to the asset criticality and risk
score data clients to utilize a new ingest pipeline for adding event
timestamps. The changes include the addition of utility functions for
creating and retrieving the ingest pipeline, updates to the field
mappings, and modifications to the data clients to integrate the new
pipeline.

### Ingest Pipeline Integration:

*
[`x-pack/plugins/security_solution/server/lib/entity_analytics/utils/create_ingest_pipeline.ts`](diffhunk://#diff-0011b86f0b91d8a6bb1c91ea0ff59830905e90436af01f5893b14d054b4e69f5R1-R50):
Added new utility functions `getIngestPipelineName` and
`createIngestTimestampPipeline` to manage the ingest pipeline for adding
event timestamps.

### Asset Criticality Data Client:

*
[`x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/asset_criticality_data_client.ts`](diffhunk://#diff-31b32ff8816e16c97f0d702225b9e13d7417331850c88b33435079419db94b62R26-R29):
Imported the new utility functions and updated the `init` method to
create the ingest timestamp pipeline. Additionally, modified the index
settings to use the new ingest pipeline.
### Risk Score Data Client:

*
[`x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_data_client.ts`](diffhunk://#diff-5a33102890d8bc4948e5d3d7df3901c23146bde3dee7bd15563bd1169358e43aR43-R46):
Imported the new utility functions, updated the `init` method to create
the ingest timestamp pipeline, and modified the index settings to use
the new ingest pipeline.

### Field Mapping Updates:

*
[`x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/constants.ts`](diffhunk://#diff-d0e75953a3b6d040a296cb4cd7513428a18b152808231819f28d7329dc86a92cL20-R20):
Added the field mapping `event.ingested` for asset criticality.
*
[`x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/configurations.ts`](diffhunk://#diff-43b70e77669c1f7c9608f8d26095db18f6fa0380beeb5990701656ae920602d7L102-R102):
Added the field mapping `event.ingested` for risk score.


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] [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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Testing steps :

- Checkout main branch
- Setup and start kibana
- Enable Risk Engine

- Execute below query, result should not have event.ingested
```
GET /*asset-criticality.asset-criticality-*/_mapping
GET /*risk-score.risk-score-latest-*/_mapping
```

- Add data using document generator
- Execute below query
```
GET /*asset-criticality.asset-criticality-*/_search
{
    "_source": ["event.ingested", "@timestamp"],
    "query": {
    "exists": {
      "field": "event.ingested"
    }
  }
}
```
### Expected output
```
{
  "took": 0,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 0,
      "relation": "eq"
    },
    "max_score": null,
    "hits": []
  }
}
```
- Same output as above for below query too
```
GET /*risk-score.risk-score-latest-*/_search
{
    "_source": ["event.ingested", "@timestamp"],
    "query": {
    "exists": {
      "field": "event.ingested"
    }
  }
}
```

- The below query should give results but `event.ingested` should not be
present in the results

```
GET /*asset-criticality.asset-criticality-*/_search
{
    "_source": ["@timestamp", "event.ingested"]
}

GET /*risk-score.risk-score-latest-*/_search
{
    "_source": ["@timestamp", "event.ingested"]
}
```

### Expected output

```
{
  "took": 0,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 3,
      "relation": "eq"
    },
    "max_score": 1,
    "hits": [
      {
        "_index": ".asset-criticality.asset-criticality-default",
        "_id": "user.name:user-001",
        "_score": 1,
        "_source": {
          "@timestamp": "2025-01-09T14:20:24.221Z"
        }
      },
      {
        "_index": ".asset-criticality.asset-criticality-default",
        "_id": "user.name:user-002",
        "_score": 1,
        "_source": {
          "@timestamp": "2025-01-09T14:20:24.221Z"
        }
      },
      {
        "_index": ".asset-criticality.asset-criticality-default",
        "_id": "host.name:host-001",
        "_score": 1,
        "_source": {
          "@timestamp": "2025-01-09T14:20:24.222Z"
        }
      }
    ]
  }
}
```

### - Checkout this PR and restart Kibana

(Try running the Risk Score engine using the Run Engine option if you
have added data after enabling the Risk Engine)

All the above queries should contain data/results with `event.ingested`
as below :

```
{
  "took": 1,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 11,
      "relation": "eq"
    },
    "max_score": 1,
    "hits": [
      {
        "_index": "risk-score.risk-score-latest-default",
        "_id": "X19B5MlF3Loy86u-U-mC6BrCwAAAAAAA",
        "_score": 1,
        "_source": {
          "event": {
            "ingested": "2025-01-10T07:51:30.757784Z"
          },
          "@timestamp": "2025-01-10T07:51:30.363Z"
        }
      },
      {
        "_index": "risk-score.risk-score-latest-default",
        "_id": "X19DYvlD0CQ6h1VE9n-ScWnjqwAAAAAA",
        "_score": 1,
        "_source": {
          "event": {
            "ingested": "2025-01-10T07:51:30.757971Z"
          },
          "@timestamp": "2025-01-10T07:51:30.363Z"
        }
      },
      {
        "_index": "risk-score.risk-score-latest-default",
        "_id": "X19DQLgfYH-Zr4z01uVnAImoTgAAAAAA",
        "_score": 1,
        "_source": {
          "event": {
            "ingested": "2025-01-10T07:51:30.758039Z"
          },
          "@timestamp": "2025-01-10T07:51:30.363Z"
        }
      },
      {
        "_index": "risk-score.risk-score-latest-default",
        "_id": "X19IqrXmM5aDk2qno3rUL5TI3gAAAAAA",
        "_score": 1,
        "_source": {
          "event": {
            "ingested": "2025-01-10T07:51:30.758108Z"
          },
          "@timestamp": "2025-01-10T07:51:30.363Z"
        }
      },
      {
        "_index": "risk-score.risk-score-latest-default",
        "_id": "X19K9okuf9lAZcd2Y7t-QFWJAQAAAAAA",
        "_score": 1,
        "_source": {
          "event": {
            "ingested": "2025-01-10T07:51:30.758163Z"
          },
          "@timestamp": "2025-01-10T07:51:30.363Z"
        }
      },
      {
        "_index": "risk-score.risk-score-latest-default",
        "_id": "X19K95CQyZSvT-ZQVwx_6jJTzgAAAAAA",
        "_score": 1,
        "_source": {
          "event": {
            "ingested": "2025-01-10T07:51:30.758222Z"
          },
          "@timestamp": "2025-01-10T07:51:30.363Z"
        }
      },
      {
        "_index": "risk-score.risk-score-latest-default",
        "_id": "X19LMkPHJ-L99JamiiYkt9WB1wAAAAAA",
        "_score": 1,
        "_source": {
          "event": {
            "ingested": "2025-01-10T07:51:30.758272Z"
          },
          "@timestamp": "2025-01-10T07:51:30.363Z"
        }
      },
      {
        "_index": "risk-score.risk-score-latest-default",
        "_id": "X19M4c0tojXVhK5aOwVA46RNVgAAAAAA",
        "_score": 1,
        "_source": {
          "event": {
            "ingested": "2025-01-10T07:51:30.758462Z"
          },
          "@timestamp": "2025-01-10T07:51:30.363Z"
        }
      },
      {
        "_index": "risk-score.risk-score-latest-default",
        "_id": "X19M7j9nZmY4g5bEDPJc20zNHgAAAAAA",
        "_score": 1,
        "_source": {
          "event": {
            "ingested": "2025-01-10T07:51:30.758573Z"
          },
          "@timestamp": "2025-01-10T07:51:30.363Z"
        }
      },
      {
        "_index": "risk-score.risk-score-latest-default",
        "_id": "X19TVbTGATHGj2iG_rFIUx2_1QAAAAAA",
        "_score": 1,
        "_source": {
          "event": {
            "ingested": "2025-01-10T07:51:30.758629Z"
          },
          "@timestamp": "2025-01-10T07:51:30.363Z"
        }
      }
    ]
  }
}
```


```
{
  "took": 0,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 3,
      "relation": "eq"
    },
    "max_score": 1,
    "hits": [
      {
        "_index": ".asset-criticality.asset-criticality-default",
        "_id": "user.name:user-001",
        "_score": 1,
        "_source": {
          "@timestamp": "2025-01-10T07:50:19.522Z",
          "event": {
            "ingested": "2025-01-10T07:50:19.532122Z"
          }
        }
      },
      {
        "_index": ".asset-criticality.asset-criticality-default",
        "_id": "user.name:user-002",
        "_score": 1,
        "_source": {
          "@timestamp": "2025-01-10T07:50:19.523Z",
          "event": {
            "ingested": "2025-01-10T07:50:19.535465Z"
          }
        }
      },
      {
        "_index": ".asset-criticality.asset-criticality-default",
        "_id": "host.name:host-001",
        "_score": 1,
        "_source": {
          "@timestamp": "2025-01-10T07:50:19.523Z",
          "event": {
            "ingested": "2025-01-10T07:50:19.535536Z"
          }
        }
      }
    ]
  }
}
```
The ingest pipeline should also be visible as below 

```
GET /_ingest/pipeline/entity_analytics_create_eventIngest_from_timestamp-pipeline*
```


![image](https://github.com/user-attachments/assets/42d4167b-575c-43ea-9219-34b31ded12fb)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-17 19:12:33 +05:30
Joe McElroy
7987527d31
[Search] [Playground] fix semantic_text issue (#207054)
## Summary

This fixes an issue in playground where the generated query is using a
multi_match. This is because the field is now defined as a text field
and Playground was treating the field as a text field and using it in a
multi-match.

This fix detects if the field is declared in the mappings API as
semantic_text and what the model_id is.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-17 13:20:04 +00:00
Anton Dosov
3ca02b3240
[React@18] fix outstanding easy unit tests (#206917)
## Summary

Extracted remaining easy backward-compatible unit test fixes that fail
with React@18 from https://github.com/elastic/kibana/pull/206411

The idea is that the tests should pass for both React@17 and React@18
2025-01-17 11:55:08 +00:00
Konrad Szwarc
7bafc0b4a0
[EDR Workflows] Workflow Insights - migrate to Signature field (#205323)
This PR adds checks to verify whether the signer_id is present in file
events stored in the ES, which serve as the foundation for generating
endpoint insights. Previously, we relied solely on the executable path,
which caused issues when a single AV generated multiple paths.

With these changes:
* If the `signer_id` exists in the file event, it will be used for
generating insights alongside the path
* For cases where the `signer_id` is unavailable (e.g., Linux, which
lacks signers), the executable path will still be used as an only value.




https://github.com/user-attachments/assets/8965efef-e962-485a-b20f-d2730cffcf10

---------

Co-authored-by: Joey F. Poon <joey.poon@elastic.co>
2025-01-17 12:40:42 +01:00
Matthew Kime
739e8cc57f
reduce initial bundle size for console and index management (#206887)
## Summary

This moves the scss content from an initial bundle load to an async
bundle load for the dev console and index management.

For testing - make sure the mapping editor and the dev console render
correctly. It will be abundantly clear if they don't.
2025-01-17 05:35:45 -06:00
Robert Jaszczurek
9bc2438eed
[ML] Memory Usage and Notifications pages serverless functional tests (#205898)
Part of: https://github.com/elastic/kibana/issues/201813

- [x] Memory Usage. Check ML entities are filtered according to the
project type.

- [x] Notifications page. Check ML entities are filtered according to
the project type.
2025-01-17 12:22:34 +01:00
Gergő Ábrahám
39cc2e342f
[Telemetry Plugin] Expose isOptIn$ Observable, deprecate getIsOptedIn() in start contract (#206728)
## Summary

Telemetry plugin now publishes the `isOptIn$` boolean Observable in its
start contract. The observable then can be used to subscribe to and get
information about changes in the global telemetry config.

In addition to that, the original `getIsOptedIn()` query function is
marked as deprecated.

### 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-01-17 12:18:21 +01:00
Sergi Massaneda
7f1e24e343
[SIEM Migrations] Add missing fields to rule migrations results (#206833)
## Summary

Include all data from the migration process in the translated rule
documents, so we are able to display the correct information in the
table, allowing us also to sort and filter by these fields.

The fields added are: 
- `integration_ids` -> new field mapped in the index (from
`integration_id`), the field is set when we match a prebuilt rule too.
- `risk_score` -> new field mapped in the index, the field is set when
we match a prebuilt rule and set the default value otherwise.
- `severity` -> the field is set when we match a prebuilt rule too.
Defaults moved from the UI to the LLM graph result.

Next steps:

- Take the `risk_score` from the original rule for the custom translated
rules
- Infer `severity` from the original rule risk_score (and maybe other
parameters) for the custom translated rules

Other changes

- The RuleMigrationSevice has been refactored to take all dependencies
(clients, services) from the API context factory. This change makes all
dependencies always available within the Rule migration service so we
don't need to pass them by parameters in each single operation.

- The Prebuilt rule retriever now stores all the prebuilt rules data in
memory during the migration, so we can return all the prebuilt rule
information when we execute semantic searches. This was necessary to set
`rule_id`, `integration_ids`, `severity`, and `risk_score` fields
correctly.

## Screenshots


![screenshot](https://github.com/user-attachments/assets/ee85879e-9d37-498c-9803-0fd3850c3cc5)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-17 12:12:01 +01:00
Matthias Wilhelm
a04274723e
[Discover] Remove redundant data fetching when hiding/showing the histogram/chart (#206389)
Since the timerange in Discover of the main request is stable we don't need to trigger a main fetch for all data when the histogram/chart is being hidden/displayed, unless it's necessary to get the data (e.g. when the histogram/chart was hiden when a discover session was being loaded)
2025-01-17 10:49:37 +00:00
Thom Heymann
75e631bd1f
Unskip test (#206003)
Resolves https://github.com/elastic/kibana/issues/205545

## Summary

Fix flaky test on dataset quality page

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-17 09:59:21 +00:00
Kibana Machine
d37dd28139
[Console] Update console definitions (#206385) 2025-01-17 10:28:33 +01:00
Dzmitry Lemechko
158146402e
[kbn-scout-reporting] escape html characters in html report (#206987)
## Summary

Fixing `Error details` section not properly displaying html characters
in error stacktrace.

Before:

<img width="1347" alt="image"
src="https://github.com/user-attachments/assets/1821751f-3a89-46a6-bf55-ed2fe845a196"
/>

After: 

<img width="1347" alt="image"
src="https://github.com/user-attachments/assets/83526d8a-ca3c-4b62-a01e-69029f0e8e7e"
/>
2025-01-17 10:16:15 +01:00
Ignacio Rivas
8be69aa77f
[Console] Add context to client request timeout (#206742) 2025-01-17 08:49:30 +00:00
Tim Sullivan
a514c26d38
[Reporting Docs for inspecting the query used for CSV export (#207001)
Closes https://github.com/elastic/kibana/issues/191768

---------

Co-authored-by: wajihaparvez <wajiha.parvez@elastic.co>
2025-01-17 09:48:15 +01:00
Luke Gmys
8de55a4d96
[Case Observables] use isLoading instead of isFetching on similar cases table (#206895)
## Summary

This improves the behavior described in
https://github.com/elastic/kibana/issues/206274 , where the loading
skeleton is shown even when the similar cases data is already in the
cache.
2025-01-17 09:40:25 +01:00
Julian Gernun
c3ea94c554
[Response Ops][Cases] Quit using legacy API to fetch comments (#203455)
## Summary

In order to stop using `includeComments` to load the updated data
belonging to the comments/user actions in the cases detail page we
implemented a new internal [`find user
actions`](https://github.com/elastic/kibana/pull/203455/files#diff-6b8d3c46675fe8f130e37afea148107012bb914a5f82eb277cb2448aba78de29)
API. This new API does the same as the public one + an extra step. This
extra step is fetching all the attachments by commentId, in here we will
have all updates to previous comments, etc. The rest of the PR is
updating the case detail page to work with this new schema + test fixing

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

---------

Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-17 09:19:27 +01:00
Georgiana-Andreea Onoleață
4f59641f3a
[ResponseOps][Cases] Skipped tests no floating promises fixes (#206718)
Closes https://github.com/elastic/kibana/issues/191185

## Summary

- un-skipped tests in the following modules:

- ` x-pack/test/functional_with_es_ssl/apps/cases/group1/view_case.ts`
-
`x-pack/test_serverless/functional/test_suites/security/ftr/cases/view_case.ts`
-
`x-pack/test_serverless/functional/test_suites/observability/cases/view_case.ts`
2025-01-17 09:25:23 +02:00
Kibana Machine
ad1f5c49b5
[api-docs] 2025-01-17 Daily api_docs build (#207018)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/955
2025-01-17 07:22:25 +00:00