Commit graph

76093 commits

Author SHA1 Message Date
Alex Szabo
6b61af3fde
[CI] Use elastic-images-prod everywhere (#185952)
## Summary
Some references to `elastic-images-qa` were left in the code, probably
as these pipelines were on a pending PR when the rest got changed.

Optionally, we should remove all the `imageProject` fields, and
everything we're setting defaults - it's just generating bloat.
2024-07-02 10:16:07 +02:00
Søren Louv-Jansen
e5c1b2596b
[APM] Co-locate data fetcher and return format for AI Assistant Alert insights (#186971)
This co-locates data fetchers with their return values. Before the all data fetching happens at once, then later joined with return values. This makes it easier to make changes and add new data fetchers.
2024-07-02 10:00:23 +02:00
Kevin Qualters
1fa094b7ac
[Security Solution][Timeline] Notes management table (#187214) 2024-07-02 02:51:28 -05:00
Liam Thompson
0da7bbe318
[ESQL] Update inline docs for 8.15 (#186835)
Aggregations, operators, and commands still need to be added manually

- `::` is the only one so far landing in 8.15.0

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2024-07-02 09:27:09 +02:00
Kibana Machine
640baeeda3
[api-docs] 2024-07-02 Daily api_docs build (#187322)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/756
2024-07-02 05:01:34 +00:00
Quynh Nguyen (Quinn)
de027b80b2
[ML] Add Field statistics embeddable as panel in Dashboard (#184030)
## Summary

This PR adds Field statistics embeddable as panel in Dashboard 

By default, it will enable the ES|QL editor for the field stats panel.
It will allow for editing of the ES|QL query, and time range.




4b5438c7-051f-4627-aab1-b802c23ca652



e9bae0e4-17cf-4a86-ad70-0da9d3667b53




If and only if ES|QL is disabled, it will show the data view picker as a
fallback.





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


### 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&mdash;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&mdash;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)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2024-07-01 23:09:44 -05:00
Yuliia Naumenko
d5a91fcc5d
[Security AI Assistant] Chat complete API (#184485) 2024-07-01 22:17:07 -05:00
renovate[bot]
d00f36efc2
Update dependency @elastic/charts to v66.0.5 (main) (#187239)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@elastic/charts](https://togithub.com/elastic/elastic-charts) |
[`66.0.4` ->
`66.0.5`](https://renovatebot.com/diffs/npm/@elastic%2fcharts/66.0.4/66.0.5)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@elastic%2fcharts/66.0.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@elastic%2fcharts/66.0.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@elastic%2fcharts/66.0.4/66.0.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@elastic%2fcharts/66.0.4/66.0.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>elastic/elastic-charts (@&#8203;elastic/charts)</summary>

###
[`v66.0.5`](https://togithub.com/elastic/elastic-charts/blob/HEAD/CHANGELOG.md#6605-2024-07-01)

[Compare
Source](https://togithub.com/elastic/elastic-charts/compare/v66.0.4...v66.0.5)

##### Bug Fixes

- (Legend values) percentage formatter should be distict from tick
formatter
([#&#8203;2474](https://togithub.com/elastic/elastic-charts/issues/2474))
([b5bd998](b5bd998f23))

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

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjQyMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOlZpc3VhbGl6YXRpb25zIiwiYmFja3BvcnQ6c2tpcCIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-01 20:55:33 -05:00
Kibana Machine
7322123df5
[ES|QL] Update function metadata (#187259)
This PR updates the function definitions and inline docs based on the
latest metadata from Elasticsearch.

---------

Co-authored-by: Drew Tate <andrew.tate@elastic.co>
2024-07-01 20:50:37 -05:00
Joey F. Poon
19463b243e
[Security Solution] make endpoint heartbeat cypress indexing more explicit (#187071)
## Summary

Adds a new `unbilledCount` param to the `indexEndpointHeartbeats`
cypress heartbeart indexing task to make the indexed `billable: false`
docs functionality more explicit rather than a side effect as [suggested
in the last
PR](https://github.com/elastic/kibana/pull/186580#discussion_r1654551530).


### Checklist

- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed


### For maintainers

- [x] 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 20:44:59 -05:00
Tim Sullivan
17de403a69
[Cloud Defend Plugin] Migrate authc.getCurrentUser usage to core.security (#187023)
Part of https://github.com/elastic/kibana/issues/186574

## Summary

This PR migrates the Cloud Defend Plugin's route handler that consumes
`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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-07-01 19:30:05 -05:00
Tim Sullivan
01cce981bc
[Alerting Plugin] Migrate authc.getCurrentUser usage to core.security (#187020)
Part of https://github.com/elastic/kibana/issues/186574

## Summary

This PR migrates the Alerting Plugin's server-side code that consumes
`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.

- [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-07-01 19:05:32 -05:00
Gergő Ábrahám
c209f3442d
[EDR Workflows][Process descendants filter] Transform event filter entry for filtering process descendant (#187141)
## Summary

This PR adds logic to server side artifact logic, in order to transform
Event Filter entries to the expected format, if process descendant
filtering is enabled.

Conditions:
- feature flag is enabled:
`xpack.securitySolution.enableExperimental.filterProcessDescendantsForEventFiltersEnabled`
- amongst the `tags`, there is the `filter_process_descendants` tag

Output: the output contains a new operator called `descendent_of`, with
all the original entries listed as the operator's values, and one
additional `event.category is process` entry.

Example input entry (only relevant fields):
```json
            "entries": [
              {
                "field": "process.args",
                "operator": "included",
                "type": "match",
                "value": "IGNOREMYCHILDREN"
              }
            ],
            "tags": [
              "filter_process_descendants"
            ],
```

Example output entry:
```json
{
  "entries": [
    {
      "type": "simple",
      "entries": [
        {
          "operator": "included",
          "type": "descendent_of", // note: writing descendEnt here to harmonise with endpoint implementation
          "value": {
            "entries": [
              {
                "type": "simple",
                "entries": [
                  {
                    "field": "process.args",
                    "operator": "included",
                    "type": "exact_cased",
                    "value": "IGNOREMYCHILDREN"
                  },
                  {
                    "field": "event.category",
                    "operator": "included",
                    "type": "exact_cased",
                    "value": "process"
                  }
                ]
              }
            ]
          }
        }
      ]
    }
  ]
}
```

### e2e testing
- spin up Kibana with the FF enabled
- spin up a v15-snapshot Agent with Endpoint integration on VM, enroll
it
- create an Event Filter with the following setup, where '_Process
descendants_' is selected and `process.args` is `IGNOREMYCHILDREN`:
<img width="1454" alt="image"
src="075d300a-a353-4c8f-ab7d-08c978df0c4b">

- create a `test.sh` on your VM with the following content:

```sh
echo "Creating file test_file_$1.tmp"
touch test_file_$1.tmp

# recursively call the original script
if [ $1 -ge 1 ]
then
	sh test.sh $(( $1 - 1 )) $2
fi
```

(alternatively you can use the python script from the endpoint tests,
790c611325/Python/endpoint/test/test_event_filtering.py (L439-L450))
- run the script `sh test.sh 6 DO_NOT_IGNOREMYCHILDREN`
<img width="476" alt="image"
src="283b9e9c-dd64-40f0-a107-8bb0c483058c">

- go to Security -> Explore -> Hosts to see the reported events
- I added some filters to easily see the events
<img width="632" alt="image"
src="aca83e75-fe14-424f-a514-7ef7de785f8b">

- you should see that all events are there
<img width="1236" alt="image"
src="5f4d7a74-de91-4e10-969d-2bb856c01b0a">

- now try with `sh test.sh 9 IGNOREMYCHILDREN`
<img width="429" alt="image"
src="9e476507-719e-4f52-a4f4-305259cbe674">

- now only the events of the top process are visible, the events from
descendants are not
<img width="1173" alt="image"
src="e17443ea-d1a4-4e1a-b555-11cc83313e04">


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

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2024-07-01 17:09:18 -05:00
Alexi Doak
d864fedd5d
[ResponseOps] Mark cloud SMTP rate limiting and recipient address rejected errors as user errors (#186199)
Resolves https://github.com/elastic/response-ops-team/issues/212

## Summary

There were some serverless alerts that were triggered by projects
encountering rate limiting (SMTP 450) failures and failures due to the
recipient address being rejected (SMTP 554) when using the Cloud SMTP
preconfigured connector. Those errors are currently flagged as framework
errors by default and this PR adds code to mark these as user errors.


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


### To verify

- You can use the cloud deploy from this PR and the following request to
test the rate limiting error (SMTP 450) and verify the `errorSource:
'user'`. The cloud email service rate limits to 500 emails per 15
minutes.
```
curl -X POST -u $USERNAME:$PASSWORD $CLOUD_URL/api/actions/connector/elastic-cloud-email/_execute \
    -H 'kbn-xsrf: true' \
    -H 'Content-Type: application/json' \
    -d '
      { 
        "params": {
          "to": ["$YOUR_EMAIL"],
          "subject": "testing email",
          "message": "test"
        }
      }
    '
```

- I haven't been able to test the SMTP 554, but it should work the same
as the SMTP 450 error.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-07-01 16:44:39 -05:00
Rodney Norris
bda4a6282e
[Search][Notebooks] Introduce support for lists (#187163)
## Summary

This PR introduces support for notebook lists that can be set via query
parameter or via a function exported from the `search_notebooks` plugin
start object. This will be used to allow setting a different list of
notebooks for specific pages that allow the notebooks shown to be
contextual to the current user task.

This PR does not add any new lists of notebooks, as that will be done in
another PR for the static notebooks and done via the S3 file for dynamic
notebooks.

### 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
2024-07-01 16:33:27 -05:00
Nathan Reese
4e785c669c
Embeddable error handling documentation (#187164)
Closes https://github.com/elastic/kibana/issues/187090

PR adds error handling to embeddable readme best practices section.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-07-01 15:21:38 -06:00
Nathan Reese
b40fc62979
[controls] migrate range slider control to new controls framework (#186195)
Closes https://github.com/elastic/kibana/issues/184375

### Design reviewers
scss is just a copy from
https://github.com/elastic/kibana/blob/main/src/plugins/controls/public/range_slider/components/range_slider.scss.
We are migrating the controls in the examples folder. Once all controls
are migrated, we will replace the embeddable controls with the migrated
controls from the examples

### Presentation reviewers
Run range slider control in controls example application
<img width="600" alt="Screenshot 2024-06-25 at 1 07 51 PM"
src="f57b7cec-923b-4ec3-8ba5-e53d92bc3e49">

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2024-07-01 15:21:25 -06:00
Alejandro Fernández Haro
4849a8fdf6
Remove joi leakage to the browser in @kbn/search-connectors (#187267) 2024-07-01 14:47:23 -05:00
Konrad Szwarc
414acd16a5
[EDR Workflows] Turn on new Manifest Manager feature flag. (#186596)
Turns on feature flag introduced in
https://github.com/elastic/kibana/pull/179698

Aligned tests - removed tests that were based on feature flag being
present or not.
2024-07-01 14:08:44 -05:00
Rodney Norris
804478bf7a
[Search] Project Navigation - Enterprise Search support (#186429)
## Summary

Adds App Search nav items support to the new Search Project Navigation


![image](5268384a-ad1a-494b-9dbf-1963a73b86e3)

Adds Workplace Search navi items support to new Search Project
Navigation


![image](d79386e8-84f6-4e0c-9123-bb20b6d80fdc)

### Testing

Since the project navigation is currently gated in Kibana use the
following config settings in `kibana.dev.yml` to test and develop this
feature. All Changes should be test with this feature on and off.

```yaml
xpack.cloud.id: "ftr_fake_cloud_id:aGVsbG8uY29tOjQ0MyRFUzEyM2FiYyRrYm4xMjNhYmM="
xpack.cloud.base_url: "https://cloud.elastic.co"
xpack.cloud.deployment_url: "/deployments/deploymentId"

xpack.cloud_integrations.experiments.enabled: true
xpack.cloud_integrations.experiments.flag_overrides:
  "solutionNavEnabled": true
```
The enable the search nav via a space with this dev console command:
```
POST kbn:/api/spaces/space
{
  "name": "search space",
  "id": "search-space",
  "description": "a description",
  "color": "#5c5959",
  "solution": "es", 
  "disabledFeatures": []
}
```

### 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
2024-07-01 13:46:47 -05:00
Pius
91b59bfc2e
Update stability.asciidoc (#187294)
Removed unnecessary line that is a copy/paste error.
Please backport to all relevant versions.
2024-07-01 12:41:32 -06:00
Tomasz Ciecierski
955fb9c033
[EDR Worklows] Fix and unskip packs_integration.cy.ts (#187276) 2024-07-01 20:26:45 +02:00
Vitalii Dmyterko
3506e1413d
[Security Solution][Detection Engine] adds AI Assistant to rule create form (#179091)
## Summary

- adds AI assistant for queries for every rule type, apart Machine
Learning
- AI assistant is shown only when query is not empty and invalid
- When user clicks on assistant it records telemetry event
`open_assistant_on_rule_query_error `
- hidden behind `AIAssistantOnRuleCreationFormEnabled` feature flag


## Design

[Design](https://www.figma.com/file/nbgUduTmTpYNXLf1vDMP7u/General-Enhancements?type=design&node-id=115%3A5166&mode=design&t=2Yi5wvS1aDoYxuyT-1)


![AI assistant help
contextual](c2ad0989-dd1a-4082-be83-bed7741131be)


## Demo



92435f3b-c51e-471b-940f-604a1f245e94



## Old Demoes

**Note: old demo videos use old UI design, and assistant is shown even
for valid queries.**

<details>

<summary>list of videos</summary>

### ES|QL Case 1
Simple ES|QL query validation error solving
There 2 problems in query highlighted by validation.
First, missing metadata operator
Second, operator `=` instead of `==`
By feeding query twice in Ai Assistant, I was able to get working
solution


1eb49505-b161-4fdb-ac3c-d2833c16e2cd

### ES|QL Case 2

Fixes missing _id field, when metadata operator is present



82024fcb-822e-46f1-a80a-8b9f1725816e

### EQL Case 1

fixes EQL typo



ea18ceec-92f8-4322-b359-50e689a0ef72

</details>

### Issues

Results might not be always consistent and for more complex queries they
might not correct



e3bedfd6-943c-4979-8708-f6c33d1756a6

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2024-07-01 12:48:48 -05:00
Gloria Hornero
a6cc252a83
[Detection Engine] Skips failing tests on the periodic pipeline (#187280)
## Summary

Skips failing tests on the periodic pipeline
2024-07-01 12:32:56 -05:00
Alejandro Fernández Haro
00337de019
[Config Service] Ignore unknown config on Serverless (#187006) 2024-07-01 12:32:22 -05:00
Kibana Machine
1a8a905835
[api-docs] 2024-07-01 Daily api_docs build (#187289)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/755
2024-07-01 17:28:33 +00:00
Cristina Amico
2b611d8835
[Fleet] Enable rollover in custom integrations install when getting mapper_exception error (#186991)
Fixes https://github.com/elastic/kibana/issues/183496
Fixes https://github.com/elastic/kibana/issues/180062

## Summary
Custom integration creation / integration update currently fails on
changing subobjects property on mapping with `mapper_exception` error.
This PR handles this case by triggering a rollover when the error is
received.

## Testing 
- In dev tools, enter the following
 ```
  POST logs-testintegration.test-default/_doc
  {
     "message": "abc"
  }
```
- Navigate to `/app/observabilityOnboarding/customLogs/?category=logs` and fill it with the following:

![Screenshot 2024-06-26 at 15 19 19](a8a0016b-79aa-41b9-9b9b-8a4198a43feb)
In the screenshot the error is visible but in the current branch the request should succeed and install `testintegration` correctly.


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

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2024-07-01 13:00:12 -04:00
Kibana Machine
003ff3e601 skip failing test suite (#187275) 2024-07-01 18:36:07 +02:00
Sergi Massaneda
71a47c0d5c
[GenAi] Improve Integration assistant generation errors (#187204)
## Summary

Follow-up of
https://github.com/elastic/kibana/pull/186304#pullrequestreview-2132968362

Improved the error messages and `Retry` button added.

### Screenshots

Before


![before](b412449f-1f3b-4d98-b069-916f881c1cad)

After


![after](07847ad5-8d15-485f-82d0-3c9ac9ac7671)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-07-01 10:23:49 -06:00
Jon
581e88ba81
[ci] Use github action to approve API docs (#187246)
Cleans up our auto-approve scripts a bit to be consistent. This matches
the auto-approve backport workflow.
2024-07-01 11:23:06 -05:00
Dzmitry Lemechko
ccfc5d3bb9
[ftr] remove svlCommonPage.forceLogout(); for tests using SAML auth (#187140)
## Summary

**tl; dr;** PR removes `svlCommonPage.forceLogout();` for test suites,
that use _SAML auth_ to Kibana with
`svlCommonPage.loginWithRole(<role>)` as this call is not needed.


More details:
`svlCommonPage.forceLogout();` was introduced together with
`svlCommonPage.login()` when FTR allowed only basic authentication with
`/login` route and operator user. Mixing basic auth with Cloud SAML auth
caused flakiness, probably some of you noticed inconsistent redirects to
Cloud UI in before/after hooks. Calling `/logout` route and handling
what happens next was important to reset Kibana state.

However with `svlCommonPage.loginWithRole(<role>)` it is no longer
needed, it works this way:
1. use Cloud SAML auth (mock IDP to replicate SAML locally) to generate
session based on provided project role
2. clear browser state: delete all cookies, clear session & local
storage, verify it succeeded
3. set cookie in browser, validate role/user is applied properly by
validating user profile in browser

Since we generate only 1 session per unique role within each FTR config
run, it is not possible to have 2 different sessions for the same user.
When your next test is calling `svlCommonPage.loginWithRole(<role>)`,
the cookie in browser and browser state overall will be reset
completely.
2024-07-01 16:40:56 +01:00
Alexey Antonov
53aa7728d5
fix: [Obs Infrastructure > Hosts, Kubernetes, Docker][SCREEN READER]: Table rows need TH[scope="row"] for SR usability: 0016 (#186962)
Closes: https://github.com/elastic/observability-dev/issues/3569

## Summary

`rowHeader` attribute was added for the following table

<img width="1344" alt="Screenshot 2024-06-26 at 12 29 57"
src="ed9edaa3-1122-45cd-808c-023cae5cdf97">
2024-07-01 18:30:49 +03:00
Alexey Antonov
3dddc52056
fix: [Obs Synthetics > Monitor Test Run][SCREEN READER]: Table rows need TH[scope="row"] for SR usability: 0017 (#186957)
Closes: https://github.com/elastic/observability-dev/issues/3570

## Summary

`rowHeader` attribute was added for the following table

<img width="1344" alt="Screenshot 2024-06-26 at 11 37 56"
src="44d2f5de-2a77-4bd9-bacb-d4939c5040c9">
2024-07-01 18:30:12 +03:00
Alexey Antonov
06a77a73b4
fix: Add rowHeader attribute for observability_solution -> managed_table (#186625)
Closes: https://github.com/elastic/observability-dev/issues/3542
Closes: https://github.com/elastic/observability-dev/issues/3543
Closes: https://github.com/elastic/observability-dev/issues/3544
Closes: https://github.com/elastic/observability-dev/issues/3545
Closes: https://github.com/elastic/observability-dev/issues/3546
Closes: https://github.com/elastic/observability-dev/issues/3550
Closes: https://github.com/elastic/observability-dev/issues/3551
Closes: https://github.com/elastic/observability-dev/issues/3552
Closes: https://github.com/elastic/observability-dev/issues/3549
## Summary
This PR introduces support for the rowHeader attribute in
`ManagedTable`. By default, the first column is marked as
`TH[scope="row"]`. However, users now have the flexibility to either
override this value or set it to 'false' to disable this feature.
2024-07-01 18:29:25 +03:00
Alexey Antonov
3309c4f723
fix: [Obs Applications > Services][SCREEN READER]: Tooltips must be able to take keyboard focus: 0001 (#186884)
closes: https://github.com/elastic/observability-dev/issues/3595

## What was done?:

1. Replace `EuiToolTip` with `EuiIconTip` to improve accessibility
(a11y).

<img width="690" alt="image"
src="c675aac2-010a-455d-a188-274e2312af55">
2024-07-01 18:28:36 +03:00
Tiago Costa
bd92b18e40
skip flaky suite (#169894) 2024-07-01 16:19:30 +01:00
Agustina Nahir Ruidiaz
9785ce0e59
[Security Solution] Adding accordion to dashboard security views (#186465)
## Summary

In this feature the following UI changes are required:

Add an accordion layout for wrap all the image link cards.
Change Layout of image cards.
Remove "Default" Header
Change second header label

<img width="1431" alt="Screenshot 2024-06-19 at 15 18 37"
src="df4b9582-d93b-45c9-89bb-3c2e52a01320">


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

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Angela Chuang <6295984+angorayc@users.noreply.github.com>
2024-07-01 09:45:18 -05:00
Julia Rechkunova
2b9d7fd607
[Discover] Unskip ES|QL view flaky tests (#187218)
- Closes https://github.com/elastic/kibana/issues/183493
- Closes https://github.com/elastic/kibana/issues/183479
- Closes https://github.com/elastic/kibana/issues/183193

25x
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6422
2024-07-01 16:29:27 +02:00
Miriam
c7789a4fc1
[ObsUX][Infra] Fix container image name not being displayed (#187220)
## Summary

Small fix, container.image.name wasn't display on the metadata summary
fields

<img width="823" alt="image"
src="fa2d162a-9f9b-437a-8250-f88074740b70">

<img width="823" alt="image"
src="ba0a16b6-b402-4ed3-8836-c6a81a998aa3">
2024-07-01 15:27:28 +01:00
Tomasz Ciecierski
cf11c5fb3f
[EDR Workflows] change osquery pipeline (#187222) 2024-07-01 15:57:27 +02:00
Sergi Massaneda
51c7afd701
[GenAI] Add License/productType controls to the integration assistant (#187105)
## Summary

Adds the licence and product type controls to the Integration assistant.

### UI

- ESS 

Licence: The `Enterprise` license must be active to use the feature. It
is checked inside the _integration_assistant_ plugin itself by default
and the license paywall is displayed in case the license requirement is
not met, no need to configure anything from outside for the license
check.

- Serverless

Product type: The `Security complete` tier must be enabled to use the
feature in security projects. The _integration_assistant_ plugin exposes
a contract API to set up a custom upselling.
The product type check is performed in the
_security_solution_serverless_ plugin and the upselling component is
passed to the _integration_assistant_ plugin to be rendered.

### API

The `withAvailability` wrapper has been introduced to encapsulate this
availability check on all the routes. The `isAvailable` flag is defined
at a plugin level and passed to the router context. The flag is
defaulted to `true` and can be set to `false` by not having the
`Enterprise` license (ESS), or by calling the `setIsActive(false)`
contract exposed (serverless).

All API requests done while the license / product type requirements are
not met will be responded with:
```
404 Not Found: This API route is not available using your current license/tier.
```


### Screenshots

ESS:


![ess](e3f4947e-4f86-4536-bdc0-a14715c01d2f)

Serverless:


![serverless](d7ba23d9-cb4e-429a-9dc8-034840afdde7)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-07-01 08:43:35 -05:00
Joe Reuter
2daa13d458
[Logs UI] Add constraint check (#186872)
Add constraint check to limit max number of buckets that can be
requested at once.
2024-07-01 15:37:32 +02:00
Alexey Antonov
1767aa4615
fix: [Obs Applications > Service Error Detail][SCREEN READER]: Table rows need TH[scope="row"] for SR usability: 0010 (#186973)
Closes: https://github.com/elastic/observability-dev/issues/3547

## Summary

`rowHeader` attribute was added for the following table

<img width="1482" alt="image"
src="e906e289-e576-499a-92ba-73cdf3c307ec">
2024-07-01 16:01:01 +03:00
Joe McElroy
8cbab32f6a
[Search] [Playground] update semantic_text example (#187240)
## Summary

Update the view code example so that it takes into account when there is
a semantic_text inner_hit match, use the matched passages for the
context.

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


### 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&mdash;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&mdash;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 07:53:57 -05:00
Tomasz Ciecierski
a7ef2f4d1b
[EDR Workflows] remove checking the step tour (#187223) 2024-07-01 14:44:43 +02:00
Antonio
9682968003
[ResponseOps][Connectors] Unhide cases webhook SSL UI. (#186461)
## Summary

Reverts [this
commit](fd9f70d887)
to display the Cases Webhook SSL UI.
2024-07-01 14:10:44 +02:00
Sergi Massaneda
fc02b21daf
[SecuritySolution] Create integration link added to Security onboarding page (#187201)
## Summary

Link panel to go to create integrations added. It is a compressed
version of the link card displayed on the integrations page. The
integration creation feature is not enabled by default, to enable the
feature:
```
xpack.integration_assistant.enabled: true
```


![link](2532819e-da6e-4d2f-ab07-45042d6a069f)

When the integrationAssistant plugin is not enabled (default) the link
does not appear.


![no_link](82cc67b1-ce16-4fd8-ad59-f8a4d4cd31fb)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-07-01 13:58:27 +02:00
Søren Louv-Jansen
1eb7a5ee0b
[Obs AI Assistant] Capture error thrown in context (#186826)
Closes https://github.com/elastic/kibana/issues/180190


![image](68b6888d-1613-4eaa-ac73-d82f88b8f549)
2024-07-01 13:57:21 +02:00
Asuka Nakajima
3ab56f5e4e
[Security Solution] Filterlist Update for Endpoint Events (#187053)
## Summary
Updates endpoint alerts telemetry filter list to add the following new
fields for the events.

* origin_referrer_url
* origin_url

### 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 19:57:23 +09:00
Aleh Zasypkin
6394e46e17
feat: enable TLS and SAML realm in local Serverless ES by default (#186886)
## Summary

Currently, when you start both Serverless Elasticsearch (`yarn es
serverless --projectType=oblt` and Serverless Kibana (`yarn start
--serverless=oblt`) locally, by default the stack will be configured in
a way that developers are encouraged to use native users via the Kibana
native login form. The problem is that this doesn't correspond to what
our users use in production, where we solely rely on SAML-mapped users
that are different from the native users in a number of notable ways.
The problem is exacerbated by the fact that all native users you can use
during Serverless development locally **are operator users**. As a
result, this has led to a number of missed bugs in functionalities that
worked well locally but were broken for our users in production.

The only way to test Serverless Kibana locally with SAML-mapped users is
to include `--ssl` flags in both Elasticsearch and Kibana run commands,
but since it's not a default go-to command, many developers don't use
it. Also, with `--ssl` flag, both Elasticsearch and Kibana are set up
with TLS using self-signed certificates, even though TLS is only
required for Elasticsearch to configure the SAML realm. For Kibana, this
is rather annoying since browsers complain about non-trusted
certificates. Moreover, even with the `--ssl` argument, developers are
still presented with the option to pick an operator user, which has
proven to be very tempting due to a habit developed over many years.

The goal of this PR is to synchronize the local developer experience
with the experience we provide to our users in production and includes
the following changes:

* The `yarn es serverless --projectType=oblt|security|es` command will
automatically configure TLS and test-only SAML security realm for
Serverless Elasticsearch by default, but will still assume that
Serverless Kibana is NOT configured with TLS.
* The `yarn start --serverless=oblt|security|es` command will NOT
automatically configure TLS for Kibana to supress browser and HTTP
client warnings, but will still assume that Serverless Elasticsearch is
configured with TLS.
* The `yarn start --serverless=oblt|security|es` command will also try
to configure SAML authentication provider, and will hide the option to
use basic credentials to log in as an operator.

As a result, whenever a developer starts Serverless Elasticsearch and
Serverless Kibana locally with the default commands and navigates to
`http://localhost:5601` (notice `http://` and not `https://`), they will
be greeted with the following screen (only SAML project-specific roles
available by default):


![image](db793bf0-88ed-4be6-86d6-a34363223a73)

__NOTE:__ If they click on `More login options` or navigate to `/login`
route directly, they will still be able to log in as an operator user,
if needed.

## Breaking changes

Unfortunately, due to the nature of Elasticsearch SAML configuration,
which requires the Kibana URL to be known at the time Elasticsearch is
started, and the fact that `kbn-es` cannot distinguish between cases
when `--ssl` is not provided and when TLS is explicitly disabled with
`--no-ssl`, the previously recommended configuration with the `--ssl`
argument for both Elasticsearch and Kibana will no longer work by
default. It will require an additional `--kibanaUrl` argument for the
`kbn es` command. For example, the following commands will lead to an
unusable experience since Elasticsearch will expect Kibana to be
configured WITHOUT TLS:

```bash
yarn es serverless --projectType=oblt|security|es --ssl
yarn start --serverless=oblt|security|es --ssl
```

This command will need to change to this:
```bash
yarn es serverless --projectType=oblt|security|es --ssl --kibanaUrl=https://localhost:5601
yarn start --serverless=oblt|security|es --ssl
```

We can potentially fix this if we somehow teach `kbn-es` CLI arguments
parser to distinguish between `--no-ssl` and missing `--ssl`, but I
didn't manage to find a way to do that.

## Supported configurations

1. Default or Elasticsearch TLS only, Elasticsearch is configured with
TLS, Kibana is configured WITHOUT TLS, SAML-test realm is configured and
native login form is hidden:
```bash
yarn es serverless --projectType=oblt|security|es [--ssl]
yarn start --serverless=oblt|security|es
```

2. Full TLS, both Elasticsearch and Kibana are configured with TLS,
SAML-test realm is configured and native login form is hidden:
```bash
yarn es serverless --projectType=oblt|security|es --ssl --kibanaUrl=https://localhost:5601
yarn start --serverless=oblt|security|es --ssl
```

3. No TLS, both Elasticsearch and Kibana are configured WITHOUT TLS,
SAML-test realm is NOT configured and only native login form for
operator users is available. We need `--no-ssl` for Kibana since by
default it assumes Elasticsearch is running with TLS enabled in
Serverless:
```bash
yarn es serverless --projectType=oblt|security|es --no-ssl
yarn start --serverless=oblt|security|es --no-ssl
```

## Notes

Forcing developers to use TLS for Elasticsearch with self-signed
certificates by default might be a little annoying for them as they
might need to adjust their tooling. If this change is merged, I'm going
to send an email with the relevant information to help developers
overcome these annoyances.

For example, if they query Elasticsearch with `curl` or `wget`, they
need to also specify `-k`/`--insecure` or `--no-check-certificate`
arguments respectively to ignore certificate errors.

TLS also makes it a bit difficult to intercept traffic coming from
Kibana to Elasticsearch with tools like Wireshark, but it's still
possible with a few more hoops. One just needs to run Kibana with a few
special command line arguments:

```bash
NODE_OPTIONS="--no-warnings --tls-cipher-list=AES128-SHA --tls-keylog=/some-path/keylog.txt" yarn start --serverless=oblt|security|es 
```

And then use the created `keylog.txt` file to decrypt traffic
automatically in Wireshark: right-click an encrypted TLS packet and
click on `Protocol Preferences -> (Pre)-Master-Secret log filename…` and
choose the `keylog.txt` file in the dialog (more details can be found
[here](https://tutorialtech.net/how-to-decrypt-nodejs-tls-traffic-with-wireshark/)):


![image](869fec6f-5069-4f99-a785-39d71d499219)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2024-07-01 05:23:01 -05:00