Commit graph

76093 commits

Author SHA1 Message Date
Vitalii Dmyterko
5e002d54fc
[Security Solution][Detection Engine] fixes flaky Detections > Callouts cypress (missing_privileges_callout.cy) tests (#186482)
## Summary

- addresses https://github.com/elastic/kibana/issues/178176
- I ran test 400 times on flaky test runner, no failures. So this PR is
to unskip test. If it happen to fail again, we would need to look
further
- also refactored tests a bit, to remove duplicate one command tests
2024-07-01 05:06:36 -05:00
Ash
cbe6b7b9b3
[Security Solution][Endpoint] Use "valid" agents for creating action requests and updating cases (#187145)
## Summary

This PR corrects an API we were able to create multi-agent action for
duplicate/non-existing agent ids. The changes in the PR fix that
1. by not including invalid agent ids (that do not have Elastic Defend
installed) and
2. adds a warning info in the action request comment so that the user is
aware of discarded agents



This action when errored shows multi agent action Host/Error grouping.

**Before** (notice the single `Hostname` above outputs)
You could do this:
```json5
POST /api/endpoint/action/suspend_process
{
    "endpoint_ids": [
        "1d793b46-7b6a-4dd4-a6b7-4c75718e04be",
        "1d793b46-7b6a-4dd4-a6b7-4c75718e04be"
    ],
    "parameters": {
        "pid": "42424242"
    }
}
``` 
and get a response that looked like (notice the duplicate agent ids in
`agents`)
```json5
{
    "data": {
        "id": "ff66dc36-5be9-4b12-a94f-09421baed8da",
        "agentType": "endpoint",
        "agents": [
            "1d793b46-7b6a-4dd4-a6b7-4c75718e04be",
             1d793b46-7b6a-4dd4-a6b7-4c75718e04be
        ],
        "hosts": {
            "1d793b46-7b6a-4dd4-a6b7-4c75718e04be": {
                "name": "ashokaditya-dev-7131"
            }
        },
        "command": "suspend-process",
        "startedAt": "2024-06-28T13:56:40.524Z",
        "isCompleted": false,
        "wasSuccessful": false,
        "isExpired": false,
        "status": "pending",
        "outputs": {},
        "agentState": {
            "1d793b46-7b6a-4dd4-a6b7-4c75718e04be": {
                "isCompleted": false,
                "wasSuccessful": false
            }
        },
        "createdBy": "elastic",
        "parameters": {
            "pid": 4242424242
        }
    }
}
```

**after**
With this change when you try and send a request such as
```json5
POST /api/endpoint/action/suspend_process
{
    "endpoint_ids": [
        "1d793b46-7b6a-4dd4-a6b7-4c75718e04be",
        "1d793b46-7b6a-4dd4-a6b7-4c75718e04be",
        "no-dice"
    ]
    ,
    "parameters": {
        "pid": 4242424242
    }
}
```

you get a response that looks like (notice neither the duplicate agent
id nor the invalid agent id in `agents`, also additional WARNING in the
`comment` field)
```json5
{
    "data": {
        "id": "9bf67816-4d58-4843-bc7a-776f6017b06b",
        "agentType": "endpoint",
        "agents": [
            "1d793b46-7b6a-4dd4-a6b7-4c75718e04be"
        ],
        "hosts": {
            "1d793b46-7b6a-4dd4-a6b7-4c75718e04be": {
                "name": "ashokaditya-dev-7131"
            }
        },
        "command": "suspend-process",
        "startedAt": "2024-06-28T15:13:20.138Z",
        "isCompleted": false,
        "wasSuccessful": false,
        "isExpired": false,
        "status": "pending",
        "outputs": {},
        "agentState": {
            "1d793b46-7b6a-4dd4-a6b7-4c75718e04be": {
                "isCompleted": false,
                "wasSuccessful": false
            }
        },
        "createdBy": "elastic",
        "comment": "undefined; WARNING: The following agent ids are not valid: [\"no-dice\"] and would not be included in action request.",
        "parameters": {
            "pid": 4242424242
        }
    }
}
```
follow up of elastic/kibana/pull/186284

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

### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces—unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes—Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2024-07-01 12:00:54 +02:00
Bharat Pasupula
79f71b7e06
[Integration Assistant] [ Security GenAI] Update readme template with the new integration guidelines (#187216)
## Summary

Update current README.md.njk structure to match the official integration
doc structure according to the [integrations doc
guidelines](https://www.elastic.co/guide/en/integrations-developer/current/documentation-guidelines.html).
2024-07-01 11:30:40 +02:00
Cristina Amico
d4ed28f15e
[Fleet] Add doc links to unprivileged agents documentation (#186832)
## Summary
Add links to unprivileged agents documentation in Fleet & integration UI

### Screenshots
![Screenshot 2024-06-24 at 16 45
15](7b32fcb4-54cb-4d8b-9ac3-1d9003097a26)

![Screenshot 2024-06-24 at 16 52
27](8d040ce1-79bf-424a-a0d5-d0083c5d2a14)

![Screenshot 2024-06-24 at 17 59
05](8f403a9b-2f00-4a03-8f7c-a25a2159bf37)



### Checklist
- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2024-07-01 04:15:37 -05:00
Jen Huang
c5a00472cb
[UII] Remove gap between integration tab content and sidebar (#187194)
## Summary

Resolves [#187097](https://github.com/elastic/kibana/issues/187097). Add
`max-width` to the flex item used for shimmying the left sidebar for
integration details content, so that there isn't a gap between the
integration icon and content.

<img width="1404" alt="image"
src="255278e1-a305-4d73-9673-06f2eed87cda">

<img width="1406" alt="image"
src="0556fc5f-6381-4926-8489-136b27ac4b99">

<img width="1406" alt="image"
src="e4db08e4-d2b3-4ba6-ae2a-58939504d469">
2024-07-01 10:18:04 +02:00
Kibana Machine
21c48c2e94
[api-docs] 2024-07-01 Daily api_docs build (#187213)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/754
2024-07-01 05:01:05 +00:00
Christiane (Tina) Heiligers
4eb07b101e
Migrate authc dependency from security plugin to core security service (#187124)
## Summary

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

Background: This PR is an example of a plugin migrating away from
depending on the Security plugin, which is a high-priority effort for
the last release before 9.0. The Cases plugin uses authc.getCurrentUser
from the security plugin's start contract on the server side.

This PR migrates authc.getCurrentUser from the security plugin start
contract to the core security service.

Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2024-06-30 16:51:06 -05:00
Yngrid Coello
28cad8dff9
[Obs AI Assistant] Awaiting elasticsearch response (#187170)
The assistant is not able to retrieve information from `elasticsearch`
function


c5ba41bd-3c24-4390-a9f6-f1bde0640b4c

After awaiting the response the assistant is sucessfully returning the
information


bbf45e80-79a8-4bad-b248-4ef37c7317b3
2024-06-30 09:33:28 +02:00
Steph Milovic
92b2ec62d6
[Security solution] Attack discovery connector dropdown notification badges (#187209) 2024-06-29 13:47:42 -06:00
Jonathan Budzenski
b450467b09 skip failing test suites (#180851,#180852) 2024-06-29 12:55:34 -05:00
Jonathan Budzenski
1536a4e607 Revert "[Security solution] Attack discovery connector dropdown notification badges (#186903)"
This reverts commit b131161848.
2024-06-29 12:47:46 -05:00
Gloria Hornero
9c0ec38e3a
[Security Solution][Detection Engine][MKI] Addresses failing tests (#187173)
## Summary

The tests that are currently failing on the periodic pipeline are all
alert suppression-related.

After checking the screenshots we saw the same problem everywhere, we
were trying to add more than one field but we ended up having just one
that does not exist in the index.


![image](a25831a7-4046-4769-8f2c-e835bbeab51d)

The code used to fill the alert suppression dropdown is prone to be
flaky. this is because we were creating a single string by joining all
the options.

We made that piece more reliable by adding each option individually.

With the new approach we ensure that each option is treated separately
so the combobox can register each option as a distinct selection.

As part of this PR we are also fixing a tag that was not correctly added
to a test.
2024-06-29 19:37:03 +02:00
Kibana Machine
0685f2b3c9 skip failing test suite (#180853) 2024-06-30 03:04:29 +10:00
Yngrid Coello
a6d3169e20
[Dataset quality] Tracking kibana:plugin_render_time metric in dataset quality (#186627)
I modified the [current dashboard in
staging](f240fff6-fac9-491b-81d1-ac39006c5c94?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-15h,to:now)))
and now the metrics of Dataset quality are being reported.

<img width="2111" alt="image"
src="db073190-9a2b-43f1-a2ac-4ad61b740582">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-06-29 16:59:13 +02:00
renovate[bot]
a9b7a33875
Update dependency recast to ^0.23.9 (main) (#187032)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
2024-06-29 08:59:53 +02:00
Kibana Machine
64114c385c
[api-docs] 2024-06-29 Daily api_docs build (#187198)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/752
2024-06-29 04:57:11 +00:00
Jen Huang
c19f65bf49
[UII] Rollback to 800px for create/edit integration policy form (#187195)
## Summary

Resolves [#187093](https://github.com/elastic/kibana/issues/187093).
Reverts create/edit integration policy form back to 800px instead of
1200px.


![image](75739287-c17a-4f27-94f6-138b83b1c813)
2024-06-29 06:54:10 +02:00
Steph Milovic
b131161848
[Security solution] Attack discovery connector dropdown notification badges (#186903) 2024-06-28 19:08:22 -06:00
renovate[bot]
9552690b24
Update dependency nodemailer to ^6.9.14 (main) (#187031)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
2024-06-28 20:03:46 -05:00
renovate[bot]
b78329e1a3
Update dependency apidoc-markdown to ^7.3.2 (main) (#187029)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
2024-06-28 19:42:24 -05:00
Kibana Machine
f76a601819 skip failing test suite (#187182) 2024-06-29 08:38:51 +10:00
Cee Chen
2bcc2fd134
Upgrade EUI to v95.2.0 (#186841)
`v95.1.0``v95.2.0`

_[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_

---

## [`v95.2.0`](https://github.com/elastic/eui/releases/v95.2.0)

- Updated `EuiContextMenuItemIcon`'s type definition to explicitly
define support for `EuiIcon`'s `IconType`
([#7804](https://github.com/elastic/eui/pull/7804))
- Updated `EuiSteps` to support a new `titleSize="xxs"` style, which
outputs the same title font size but smaller unnumbered step indicators
([#7813](https://github.com/elastic/eui/pull/7813))
- Updated `EuiStepsHorizontal` to support a new `size="xs"` style, which
outputs smaller unnumbered step indicators
([#7813](https://github.com/elastic/eui/pull/7813))
- Updated `EuiStepNumber` to support new `titleSize="none"` which omits
rendering step numbers, and will only render icons
([#7813](https://github.com/elastic/eui/pull/7813))
- Updated `setEuiDevProviderWarning` to additionally accept a custom
callback function, which warning messages will be passed to
([#7820](https://github.com/elastic/eui/pull/7820))
- Updated `EuiIcon` to feature updated `logoElasticStack` logo for
referencing Elastic Stack platform
([#7838](https://github.com/elastic/eui/pull/7838))
- Updated `EuiIcon` to feature updated `casesApp` design.
([#7840](https://github.com/elastic/eui/pull/7840))
- Updated `EuiComboBox` to no longer autocomplete searched text when
used within forms ([#7842](https://github.com/elastic/eui/pull/7842))

**CSS-in-JS conversions**

- Converted `EuiFilePicker` to Emotion; Removed
`$euiFilePickerTallHeight`
([#7833](https://github.com/elastic/eui/pull/7833))

---------

Co-authored-by: Jon <jon@elastic.co>
2024-06-28 17:37:58 -05:00
Christiane (Tina) Heiligers
bebb273989
migrate getCurrentUser calls in reporting to core security service (#186913)
## Summary

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

Background: This PR is an example of a plugin migrating away from
depending on the Security plugin, which is a high-priority effort for
the last release before 9.0. The Reporting plugin uses
`authc.getCurrentUser` from the security plugin's start contract on the
server side.

This PR migrates `authc.getCurrentUser` from the security plugin start
contract to the core security service.

### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
2024-06-28 17:25:09 -05:00
Lola
64a01ef638
[Cloud Security] Agentless cloud credentials (#184162)
## Summary

Summarize your PR. If it involves visual changes include a screenshot or
gif.
This PR add Automation Credentials buttons for GCP and AWS. UX copy will
be addressed in the [folllowing
ticket](https://github.com/elastic/kibana/issues/178858).

<img width="900" alt="image"
src="f7329fa7-ae48-4dc0-a7cf-a0a26d80ad6b">

For Agentless the CSPM AWS integrations, users  will able to : 
* click Launch Cloud Formation button for single account or organization
account which opens external link to Cloud Formation page.
*  create a cloud formation stack that generates access keys. 
We will use the Cloud Formation template url from the package info
`getTemplateUrlFromPackageInfo` exposed as common utility in fleet.


<img width="884" alt="image"
src="d5e5e7d2-21fe-44bc-88e7-908d29817dfb">

For Agentless the CSPM GCP integrations, users will able to click Launch
Cloud Shell button for single accounts or organization account. We get
the cloud shell template url from the package info
`getTemplateUrlFromPackageInfo`


## To test PR:

AWS
1. Log in as an admin in the management account of the AWS Organization
you want to onboard
2. Click the Launch CloudFormation button below.
3. (Optional) Change the Amazon region in the upper right corner to the
region you want to deploy your stack to
4. Tick the checkbox under capabilities in the opened CloudFormation
stack review form: I acknowledge that AWS CloudFormation might create
IAM resources.
5. Click Create stack.
6. Once stack status is CREATE_COMPLETE then click the Outputs tab
7. Copy Access Key Id and Secret Access Key then paste the credentials
below

Use: `eu-west-1` region to create stacks 

GCP
1.Replace <PROJECT_ID> in the following command with your project ID
then copy the command
2. Click Launch Google Cloud Shell, then run the command
3. Check `Trust Repo` and click `CONFIRM` button 
5. Paste and run command in the cloud shell terminal
Cloud Security team `gcloud config set project test-project-1-396010 &&
ORG_ID=693506308612 && ./deploy_service_account.sh`
5. Run 'cat KEY_FILE.json' to view the service account key. Copy and
paste it in the CSPM GCP integration.

Internal Team Developer  Tips for testing :
- Look for `cloudshell_git_branch` in the url and change `8.XX` to
`main`.
- To run script, see command
[here](https://p.elstc.co/paste/XyJg0wW8#srnavdS0GZtxapNA1ZcNu9TddLpG+zWP-99KWWpIEnr)
- 
 Any question for GCP account issue reachout to @orouz

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-06-28 16:40:58 -05:00
Tim Sullivan
9453e690ec
Fix missing page titles in Stack Management (#186677)
## Summary

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

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2024-06-28 14:28:56 -07:00
Andrew Macri
e64978e821
[Security Solution] [Attack discovery] Improves Attack discovery GPT-4o output (#187183)
## [Security Solution] [Attack discovery] Improves Attack discovery GPT-4o output

### Summary

This PR improves the output of Attack discoveries generated with `GPT-4o`, as illustrated by the _After_ screenshot below:

#### After

![gpt-4o-after](c6896da2-584b-48a3-a5ba-31b94c06e6e8)

_Above: Attack discoveries generated via `GPT-4o` after the change in this branch_

#### Before

![gpt-4o-before](d878c36a-c926-4f45-b1d5-7867d530df12)

_Above: Attack discoveries generated via `GPT-4o` before the change in this branch_

### Desk testing

1) Generate (using `main`) Attack discoveries via `GPT-4o`, and a few other models, i.e. `Claude 3 Opus`, and `Claude 3.5 Sonnet`

2) Generate Attack discoveries for the same models using the PR branch

**Expected result**

- Significant improvement in the narrative and format of Attack discoveries generated by `GPT-4o`
- Similar / improved output from other models (no regressions)
2024-06-28 17:15:20 -04:00
Angela Chuang
72e1d11b25
[Security Solution] AI settings (#184678)
## Summary
https://github.com/elastic/security-team/issues/9222
<img width="2535" alt="Screenshot 2024-06-23 at 11 30 15"
src="e47c4cc4-6786-4147-a6f8-e3b371d64e40">
<img width="2534" alt="Screenshot 2024-06-23 at 11 30 54"
src="7d6f8f17-a713-4c38-8a2e-369f8548426e">
<img width="2537" alt="Screenshot 2024-06-23 at 11 37 11"
src="c6632fff-0d01-4462-b5f1-c4dc3b2750dc">
<img width="2531" alt="Screenshot 2024-06-25 at 13 36 19"
src="d3d6f6a1-02d5-40cc-9119-09de112d53cd">

<img width="2531" alt="Screenshot 2024-06-25 at 13 33 59"
src="742a57ff-9ec0-4fe6-868e-810681ff1795">
<img width="2534" alt="Screenshot 2024-06-23 at 11 40 31"
src="85e323d2-6fdf-40cd-9696-4c8c549200a3">
<img width="2535" alt="Screenshot 2024-06-23 at 11 41 23"
src="e02fdee2-dd57-45b6-8fef-b75f535c96fc">

Knowledge base:
https://github.com/elastic/kibana/pull/186847


### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[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
2024-06-28 21:30:03 +01:00
christineweng
c026264640
[Security Solution][Details Flyout] Fix multi-preview url sync (#186130)
## Summary

This PR fixed a preview rendering bug and made some improvements to the
preview navigation:

- If a preview is already opened, opening another preview should work
properly. `urlChangedAction` is now dispatching the last item in
`preview` array.
- Added checks to not append a preview if it was last added
- When state is stored in url (everywhere except rule preview), `Back`
action in preview utilizes the browser go back functionality. This
allows full synchronization between redux and url state.
- Keep the latest preview in url to avoid url length explosion

Note: in order to make the interaction smooth, the `Back` button is now
always present. When there is one preview open, clicking `Go back` will
close the preview.

**How to test**
- Enable feature flag `entityAlertPreviewEnabled`
- Generate some alerts, go to Alerts Page
- Expand detail on an alert, expand details, entities, clicking the host
and user names


4552c3d5-541b-4551-8188-fafaf6235c2c
2024-06-28 13:14:34 -05:00
Kevin Qualters
34887f2d8c
[Security Solution] Event notes unassociated to a timeline (#186946)
## Summary

This pr is for server side changes to support a requested feature for
having notes outside of timelines. The changes are intended to be fully
backwards compatible, and mainly center around making timelineId
optional when creating a note. The note saved object will still have an
entry in the references array, just the id for the timeline saved object
type is an empty string. I did not see a way with how the saved object
client find function works to query for objects that have just an empty
reference array, so this probably works best. Note saved objects not
associated with a timeline are capped at 1000 for now, as the new api
that fetches all of the notes for an array of document ids does so via
saved object client search string, which is limited to 1024 terms, and
the api should support getting all notes in the worst case of 1 note
associated to 1 event. Also cases comments and attachments have a
similar limit, so seemed to make sense for this experimental feature.
The delete note api was also changed to support deleting either 1 note
by id, or an array of notes, additive only change.

Feature flagged (securitySolutionNotesEnabled in
xpack.securitySolution.enableExperimental) frontend making use of the
api changes:


![notes_api_change](e78587b1-feaf-41b7-97aa-a4301c4a4476)

### Checklist

Delete any items that are not applicable to this PR.

- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2024-06-28 13:37:33 -04:00
Christiane (Tina) Heiligers
a7fe7cbb52
update imports for types moved to core security service packages (#187121)
## Summary

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

Updates imports for types available from the core-security packages.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2024-06-28 10:13:21 -07:00
Joe McElroy
304d469c32
[Search] [Playground] fix for when multiple semantic_text indices (#187162)
## Summary

Issue occurs when there are two semantic_text indices that share the
same fields, the inner_hits query collides and throws an exception on
search.

This pr introduces a unique name to each inner_hit query so this doesn't
occur.

### Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
2024-06-28 09:42:23 -07:00
Tim Sullivan
18adcec803
[Elastic Assistant] Use server-side authc.getCurrentUser from core.security (#186928)
Part of https://github.com/elastic/kibana/issues/186574

Background: This PR serves as an example of a plugin migrating away from
depending on the Security plugin, which is a high priority effort for
the last release before 9.0. The Elastic Assistant plugin uses the
`authc.getCurrentUser` indirectly in several data clients in
`x-pack/plugins/elastic_assistant/server/routes/request_context_factory.ts`.

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2024-06-28 09:27:32 -07:00
Tim Sullivan
7cf7365987
[OSQuery Plugin] Migrate usage og authc.getCurrentUser to coreContext.security (#187014)
Part of https://github.com/elastic/kibana/issues/186574

## Summary

This PR migrates the OSQuery Plugin's route handlers that consume
`authc.getCurrentUser` to use coreContext.security

Background: This PR serves as an example of a plugin migrating away from
depending on the Security plugin, which is a high priority effort for
the last release before 9.0.

### Checklist

Delete any items that are not applicable to this PR.

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2024-06-28 09:26:29 -07:00
Georgii Gorbachev
065ae0eb3e
[Security Solution] Remove expired feature flags for prebuilt rules UI (#186968)
**Related to:** https://github.com/elastic/kibana/issues/174168

## Summary

Removes the `jsonPrebuiltRulesDiffingEnabled` and
`perFieldPrebuiltRulesDiffingEnabled` feature flags that have been
expired. See details in the code.
2024-06-28 17:51:32 +02:00
Aleh Zasypkin
b99d21c78d
chore: bump undici from 6.19.0 to 6.19.2 (#187156)
## Summary

Bump `undici` from `6.19.0` to `6.19.2`.

__Release notes:__ https://github.com/nodejs/undici/releases/tag/v6.19.1
and https://github.com/nodejs/undici/releases/tag/v6.19.2
2024-06-28 17:50:05 +02:00
Steph Milovic
061a5efda0
[GenAI Connectors] Token telemetry (#186936) 2024-06-28 09:36:18 -06:00
renovate[bot]
719f3eeae6
Update platform security modules (main) (#187037) 2024-06-28 17:35:56 +02:00
Nathan Reese
3bc6973019
[dashboard] fix 'Each child in list should have a unique key prop' warning in PresentationPanelHeader (#187118)
Fixes
<img width="600" alt="Screenshot 2024-06-27 at 2 47 07 PM"
src="44d0162c-ae6f-4995-a780-711ff59727a8">


### test steps
* in cloud 7.17. instance, create legacy input control visualization and
export saved object
* in local instance, import legacy input control vis
* create new dashboard and add legacy input control vis
* Open console and ensure no warnings are displayed when `deprecated`
badge is displayed

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2024-06-28 09:22:27 -06:00
Shahzad
125b716fa9
[Observability Alerts] Fixes synthetics/uptime fields alerts autocomplete for query bar (#186588)
## Summary

Fixes autocomplete in kuery bar for uptime/synthetics fields !!

Also added tags into documents !!

### Before
uptime/synthetics field names never appeared in kql query bar on alerts

<img width="1728" alt="image"
src="e471567b-951d-4ad0-9d3a-78a5168b7a91">


### After

Typing fields name will show suggestions

<img width="1725" alt="image"
src="da453f0d-1956-4703-a371-842139bd7d4c">
2024-06-28 16:38:48 +02:00
Tomasz Ciecierski
9c7d050577
[EDR Workflows] Enable Crowdstrike feature flags (#186801) 2024-06-28 16:35:44 +02:00
Kevin Delemme
c36be7a377
chore(slo): integrate with stdperf (#186477) 2024-06-28 07:35:06 -07:00
Konrad Szwarc
b9faa34181
[EDR Workflows] Elastic defend policy migration for advanced properties (#186385)
Adds a migration for advanced package policy fields, based on values
provided here -
https://github.com/elastic/security-team/issues/9650#issuecomment-2176499768

Combines
`x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts`
changes from:

https://github.com/elastic/kibana/pull/184725
https://github.com/elastic/kibana/pull/184786

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-06-28 16:34:02 +02:00
renovate[bot]
fe40441305
Update dependency chromedriver to ^126.0.3 (main) (#187155)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [chromedriver](https://togithub.com/giggio/node-chromedriver) |
[`^126.0.2` ->
`^126.0.3`](https://renovatebot.com/diffs/npm/chromedriver/126.0.4/126.0.3)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/chromedriver/126.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/chromedriver/126.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/chromedriver/126.0.4/126.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/chromedriver/126.0.4/126.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### 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 [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/elastic/kibana).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-28 09:14:28 -05:00
Jon
9854ecf93c
[build] Rename chainguard -> wolfi (#187095)
To be consistent with other stack products.
2024-06-28 09:13:52 -05:00
Jonathan Budzenski
e23230f072 Revert "Add serverless emergency release quality gate pipeline (#186833)"
This reverts commit cbedb5fff8.
2024-06-28 09:07:52 -05:00
Paul Tavares
7ec1db2a46
[Security Solution][Endpoint] Fix the display of failed automated response actions (under the expanded alert details) so that it shows errors (#187094)
## Summary

- Fixes the UI for failed automated response actions so that it does
remain "stuck" in `pending` and instead shows the errors that were
encountered


> [!NOTE]
> This bug was knowingly introduced just earlier today, but the fix was
not yet know at that time. The underlying root cause will take much
longer to address (requires a refactor of how the automated response
actions are retrieved from the server), thus this PR provides a
**temporary** fix that ensures the UI continues to work as it did
before.
2024-06-28 07:03:01 -07:00
Saarika Bhasi
e13e8ff321
[Serverless Search] Downgrade user privileges for FTR tests (#186977)
## Summary
This PR updates existing API integration & Functional tests to run with
a user with a **minimum** user privileges.

**Reference**: [Instance access roles and privileges for
Serverless](https://www.elastic.co/docs/current/serverless/general/assign-user-roles#elasticsearch)
document for Elasticsearch

Tested changes from this PR against cloud QA deployment with different
user privileges.
2024-06-28 09:51:43 -04:00
Abdul Wahab Zahid
b9c903bf1f
[Dataset quality] - Enable links to Dataset Quality from Management and Logs Explorer (#186143)
Add links to Dataset Quality in the following places:
1. "Data sets" link on Logs Explorer nav header (on both Serverless and
Stateful)
2. "Data Set Quality" side nav menu item under Stack Management -> Data
(Stateful)
3. "Data Set Quality" card under Management -> Data (Serverless)

On Logs Explorer - Stateful

![dataset-quality-logs-explorer-link-stateful](ea9b37ef-abfd-433d-97d2-ee678d679aa3)

On Logs Explorer - Serverless

![dataset-quality-logs-explorer-link-serverless](6fac1e8a-9ff5-423d-bacb-5a777158c30d)

Stack Management - Stateful

![dataset-quality-side-nav-stateful-link](3561047d-5f65-469d-bfd1-c235058b71ac)

Stack Management - Serverless

![image](a4182040-8565-4ad9-9ef2-909e0161ce78)

---------

Co-authored-by: Yngrid Coello <yngrid.coello@elastic.co>
2024-06-28 15:30:21 +02:00
Paul Tavares
41817d0b2b
[Security Solution][Endpoint] Show integration type on Response Console header (#186855)
## Summary

- Adds information about the integration associated with an agent type,
which informs the user which EDR vendor is being used to execute the
response action. The following views were updated:
    - Response console
    - Alert Isolation flyout panel headers

> [!NOTE]
> The host isolation flyout that is displayed from the Endpoint list
page was not updated to show this information about the integration.
Thats because from the Endpoint list, a user only sees hosts that are
running the Elastic Defend integration, thus there is not need to show
the indicator.
2024-06-28 09:24:23 -04:00
Maryam Saeidi
51a902b579
Fix Alerts page history navigation (#186068)
Fixes #180441

This PR fixes the URL navigation by first calculating the initial state
and initializing both the URL and state container with the default
value, then starting the sync process. (Special thanks to @Dosant )


87d1a542-d070-4d32-bcd4-aa1565e96acb

This PR also fixes the back navigation from the Alerts page to the Hosts
view, this was the bug:


a18b3ec0-b59b-441f-9d1c-65de2d3f19d0


### 🧪 How to test
**Please check the possible navigation scenarios related to the alerts
page and its filters carefully**.
- Go to the alerts page by clicking on the right-hand side menu and
navigate back
- Go to the alerts page, change a filter/time range, and navigate back
- On the alerts page, use brush functionality on the alert summary
widget and navigate back
- Also, please test the scenarios mentioned in this
[PR](https://github.com/elastic/kibana/pull/162312)

#### Known issue
If the time range is changed, the back navigation does not work
properly. We have a similar case in APM, so I created a separate ticket
for it: https://github.com/elastic/kibana/issues/186303
2024-06-28 15:18:30 +02:00