Commit graph

164 commits

Author SHA1 Message Date
Nicolas Chaulet
e02c8740ec
[Fleet] Support registry filtering with spec.min and spec.max (#166733) 2023-09-20 10:59:19 -04:00
Mark Hopkin
238428076c
[Fleet] Show snapshot version in agent upgrade modal + allow custom values (but not in serverless) (#165978)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-09-11 12:56:39 +02:00
Carlos Crespo
7ba355483f
[Infra] Disable infra plugin in serverless projects (#165289)
closes https://github.com/elastic/kibana/issues/158925

## Summary

This PR disables the infra plugin in the `oblt` and `security` projects

### Oblt
**Navbar**
<img width="300" alt="image"
src="f88fd2a5-ed58-4bcf-b5ad-5b25357daf5c">

**Saved Objects**
<img width="800" alt="image"
src="4140760c-2572-4391-8977-bc97fcd14bb8">



**Server-side APIs**
<img width="800" alt="image"
src="eb22b024-dfd5-4c7f-b760-bfd2c633f759">

**Infra routes**
/metrics/inventory

<img width="500" alt="image"
src="6ddba766-c6f0-40d0-9183-2bcbae348d52">

**Alert rules**
<img width="300" alt="image"
src="d03d087e-d562-425b-a4d9-a17d5fe0b158">


### APM

Infra links hidden in the Transaction "Investigate" pop up menu
<img width="800" alt="image"
src="d9364d55-6e06-4ac0-8668-6ce2331a6250">

Infra links removed from Services Overview Instance actions
<img width="800" alt="image"
src="73410e5c-be6c-4174-8df0-76fb6a25b2f6">

** Server Routes **

<img width="800" alt="image"
src="488f639b-81e8-497d-a55e-4e7f31644bc5">

<img width="800" alt="image"
src="4366005a-2eb8-4f33-8d1e-09865cad06b4">

<img width="800" alt="image"
src="46b34d0d-8171-4d8d-bfb8-fd4c32583fbb">





### Security

**Saved Objects**
<img width="800" alt="image"
src="14f08e7e-565b-42e9-8fc4-753d1b54c14a">



**Server-side APIs**
<img width="800" alt="image"
src="eb22b024-dfd5-4c7f-b760-bfd2c633f759">

**Infra routes**
/metrics/inventory

<img width="500" alt="image"
src="6ddba766-c6f0-40d0-9183-2bcbae348d52">


### How to test

- Start a local ES instance
- run `yarn serverless-oblt` and `yarn serverless-security`
- Validate the screenshots above.

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-09-08 15:05:28 +02:00
Rodney Norris
2490b5dec6
[Serverless Search] Disable Grok debugger & Painless Lab (#165772)
## Summary

Updated the grok debugger and painless lab plugins to handle the
`enabled` config flag so they can easily be disabled for serverless
search.

### Screenshots
Before:

![image](7552954b-11f1-4c6f-9007-148a8c765c3f)

After:
<img width="1914" alt="image"
src="ad48ba1b-0f1d-4da3-aeac-4868781f6832">
2023-09-07 15:26:23 -07:00
Alexi Doak
03f0cdc327
[ResponseOps][Alerting] Create xpack.actions.queued.max circuit breaker (#164632)
Resolves https://github.com/elastic/kibana/issues/162264


## Summary

Adds a limit on the maximum number of actions that can be queued with a
circuit breaker. The limit in serverless is set to 10,000, and 1,000,000
in the other environments.

- If a rule execution exceeds the limit, the circuit breaker kicks in
and stops triggering actions.
- Alerting rule's status updated to warning when circuit breaker is hit

Did not update the `enqueueExecution` bc it's going to be removed in
https://github.com/elastic/kibana/pull/165120.


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


### To Verify

- Create a 2 rules that have actions
- Set `xpack.actions.queued.max` in kibana.yml to a low number like 2 or
3
- Use the run soon button to queue up actions and hit the circuit
breaker.
- The actions will not be scheduled and the rule status will be set to
warning

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-09-07 06:59:01 -07:00
Shahzad
6969803357
[Serverless] Disable synthetics and uptime in serverless (#165898)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-09-07 14:09:35 +02:00
Jiawei Wu
456f47f3ab
[RAM] Introduce maxScheduledPerMinute rule circuit breaker and route (#164791)
## Summary
Resolves: https://github.com/elastic/kibana/issues/162262

This PR is the backend changes to add a circuit breaker
`xpack.alerting.rules.maxScheduledPerMinute` to both serverless and
other environments that limits the number of rules to 400 runs / minute
and 10000 runs / minute, respectively. There will be another PR to
follow this one that gives the user UI hints when creating/editing rules
that go over this limit.

This circuit breaker check is applied to the following routes:
- Create Rule
- Update Rule
- Enable Rule
- Bulk Enable Rule
- Bulk Edit Rule

Also adds a new route: `/internal/alerting/rules/_schedule_frequency` to
get the current total schedules per minute (of enabled rules) and the
remaining interval allotment.

### 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: lcawl <lcawley@elastic.co>
Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
2023-09-06 09:13:36 -07:00
Sander Philipse
b335c3abbc
[Search] Extract connectors to package (#165590)
## Summary

This moves connectors functions to a shared package so Serverless Search
and Enterprise Search can both use it.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-09-06 14:33:05 +02:00
Stratoula Kalafateli
5d6812966a
[ES|QL] Technical preview in Discover and Dashboards (#146971)
## Summary

Closes https://github.com/elastic/kibana/issues/137810
Part of https://github.com/elastic/kibana/issues/163248

This PR is the **first iteration** of the new ES|QL language in kibana.
The majority of the functionality is based on the existing functionality
for SQL (which has already been merged). This builds on top of it to
enable the functionality for ES|QL. We decided to remove SQL for now so
this PR enables ES|QL and hides SQL. We are not removing the code for
now.

### Important notes:
- This PR contains basic autocomplete functionality for the ES|QL
commands. We want to improve it in follow up PRs
- The majority of the tests for SQL were moved to work with ES|QL
instead
- The search strategy is a very simple endpoint for now as we don't have
async search nor pagination
- Now that we remove SQL, the ui for ES|QL selection has changed
- The documentation for ESQL has been handled by the docs team so it is
already reviewed and in sync with the official documentation
- ES|QL is disabled in serverless projects for now

### Changes from SQL:
- The Discover histogram now is being created with ES|QL (using the
date_trunc function). This gives it the ability to be saved on a
dashboard and also to be edited inline.
- ES|QL sometimes returns some warnings (on the search headers). For
example when we are trying to date parse a string that doesnt contain a
valid date). These warnings are also reported on the UI. There is a bug
in ES and the warning doesnt come always
https://github.com/elastic/elasticsearch-internal/issues/1465)
- We have 2 types of commands:
- Transformational commands (keep, stats) -> when they exist in the
query Discover should render the Table view (selected columns)
- Non transformational commands (all the others) -> in that case
Discover renders the Document view
  - ESQL switch on advanced settings is now on by default


**Discover view with non transformational commands**
<img width="1678" alt="image"
src="abe100e1-01e9-4fe0-9b89-6d8bdf6443fc">


**Discover view with transformational commands**
<img width="1679" alt="image"
src="e46af422-daeb-4be5-88cf-522211674ff5">


### Missing
- ESQL autocomplete is not perfect, we are going to work on it on a
future PR. Specifically:
- There is a bug in autocomplete, sometimes writing a query overwrites
the existing one, will deal with it in a future PR
  - Further improvements

### 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
- [ ] [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: Alexey Antonov <alexwizp@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: Peter Pisljar <peter.pisljar@elastic.co>
Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
2023-09-01 12:22:00 +03:00
Alejandro Fernández Haro
0ea37c1b42
[On-Week] Hot update of APM/EBT labels (#157093) 2023-08-31 14:36:20 +02:00
Felix Stürmer
ad59308b24
[Log Explorer] Convert log explorer profile into standalone app (#164493)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani01@gmail.com>
2023-08-31 14:18:44 +02:00
Jon
aebd6f3923
[node] Enable openssl legacy provider (#163190)
This is to prevent a breaking change in a minor release of Kibana due to
an underlying upgrade of Node.js to v18.
The legacy provider can be disabled by removing
`--openssl-legacy-provider` in `config/node.options`.

[Node.js
documentation](https://nodejs.org/docs/latest-v18.x/api/cli.html#--openssl-legacy-provider)
[OpenSSL
documentation](https://www.openssl.org/docs/man3.0/man7/OSSL_PROVIDER-legacy.html)

---------

Co-authored-by: Thomas Watson <w@tson.dk>
2023-08-30 11:51:10 -07:00
Jean-Louis Leysens
5739f1f561
[Saved Objects] Remove runOnRoles: ['ui'] from serverless config (#164968)
## Summary

Enable ZDT migrations to run on `migrator` node roles (the default).

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

|---------------------------|-------------|----------|-------------------------|
| Issues when rolling out Kibana's | Med. | Low | It's possible this
change could lead to interruption in internal Elastic environments |
2023-08-30 11:58:16 +02:00
Luke Elmers
d6db6b7b4a
Adjust migrations and elasticsearch service settings for serverless. (#165050) 2023-08-29 10:25:51 +02:00
Anton Dosov
243142d9c1
[Serverless Elasticsearch] Fix user is blocked from moving forward when opening Discover, Dashboard, or Visualize Library 2023-08-28 15:24:34 +01:00
Sander Philipse
7df567289a
[Search] Set up empty connectors page (#164340)
This adds an empty connectors page to the Elasticsearch project. The
Enterprise Search plugin exports relevant connectors data and functions,
the Search plugin simply consumes these.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-23 15:56:50 -05:00
Alison Goryachev
a14f76d96c
[Index Management] Disable index stats on serverless (#163849) 2023-08-23 08:18:48 -04:00
Jeramy Soucy
fe0ffab1da
Prepare the Security domain HTTP APIs for Serverless (#162087)
Closes #161337

## Summary

Uses build flavor(see #161930) to disable specific Kibana security,
spaces, and encrypted saved objects HTTP API routes in serverless (see
details in #161337). HTTP APIs that will be public in serverless have
been handled in #162523.

**IMPORTANT: This PR leaves login, user, and role routes enabled. The
primary reason for this is due to several testing mechanisms that rely
on basic authentication and custom roles (UI, Cypress). These tests will
be modified to use SAML authentication and serverless roles in the
immediate future. Once this occurs, we will disable these routes.**

### Testing
This PR also implements testing API access in serverless.
- The testing strategy for disabled routes in serverless is to verify a
`404 not found `response.
- The testing strategy for internal access routes in serverless is to
verify that without the internal request header
(`x-elastic-internal-origin`), a `400 bad request response` is received,
then verify that with the internal request header, a `200 ok response`
is received.
- The strategy for public routes in serverless is to verify a `200 ok`
or `203 redirect` is received.

~~blocked by #161930~~
~~blocked by #162149 for test implementation~~

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@elastic.co>
2023-08-23 12:34:45 +02:00
Ersin Erdal
9079b1c60b
Enable requeue_invalid_tasks config for functional tests (#163768)
Makes isSystemAction field in RawConnector optional and enables
`requeue_invalid_tasks` config for functional tests.
2023-08-17 13:53:02 +03:00
Mike Côté
fd389ce372
Set serverless and test setting for task manager state validation (#163743)
Part of https://github.com/elastic/kibana/issues/155764.

In this PR, I'm setting the
`xpack.task_manager.allow_reading_invalid_state` serverless setting to
`false` so Kibana doesn't allow reading invalid state when loading
tasks.

I'm also doing the same for the functional tests to ensure valid task
state is always read.

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-08-16 10:58:22 -07:00
Brandon Kobel
a13b6787b0
Adding serverless circuit breakers for alerting rules and actions (#163835)
## Summary

Setting circuit breakers for alerting rules and actions as previously
agreed upon in: [2023-07 Serverless Alerting Circuit
Breakers](https://docs.google.com/document/d/1Ux5IMgay5G0fAmYpVPr6WTFtE9yhutFYf_dPAfEPa5s/edit)
2023-08-15 13:14:48 -04:00
Nathan Reese
78250515ff
fix Canvas available in search in serverless (#163740)
Closes https://github.com/elastic/kibana/issues/163442

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-08-14 10:43:15 -06:00
Alison Goryachev
97f44c1e50
[Index Management] Disable legacy index templates (#163518) 2023-08-14 10:40:16 -04:00
Nicolas Chaulet
312b254266
[Fleet] Disable Fleet for serverless ES projects (#163609) 2023-08-14 10:01:54 -04:00
Stratoula Kalafateli
8511078c19
[Graph] disable application in serverless (#163582)
## Summary

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

This PR disables graph in serverless. Specifically:

- creates a serverless yml setting for disabling graph
- adds the setting in serverless.yml
2023-08-14 13:21:21 +03:00
Janki Salvi
dc949ee373
[Cases] Hide cases in stack management UI (#163037)
## Summary

fixes https://github.com/elastic/kibana/issues/160337

This PR 
- hides cases in the serverless Elasticsearch project, cases APIs throw
error
- throws 403 from API when `owner=cases` for security or observability
serverless mode
- verifies the behaviour in serverless functional as well as
api_integration tests

**How to test**

- Boot up `es` serverless solution and make sure that `cases` from the
navbar is hidden and cannot not be accessible through url as well
- Boot up `observability` or `security` serverless solutions and make
sure that `cases` is available in the navbar and works fine
- Boot up classic kibana and make sure that the left navbar has the same
menu entries it always had.

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



20c1974e-44f0-45b0-80aa-e644fec148ff

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-09 17:52:36 +02:00
Miriam
adb9573cb2
Revert "[APM] Add index.fast_refresh to .apm-custom-link" (#163142)
Reverts elastic/kibana#159674

The Elasticsearch team has changed their guidance about `fast_refresh`
and want this setting to be applied from within an Elasticsearch plugin
2023-08-08 08:34:48 +01:00
Stratoula Kalafateli
0fba094cd0
[Visualizations] Serverless yml settings (#162959)
## Summary

Adds the necessary yml settings to the serverless config. These settings
are making ui changes in dashboards / visualizations editors and they
apply for all projects.

For testing run `yarn start --serverless=es` and check that the ui is
working as expected with the legacy editors (TSVB, agg based) in a read
only mode.
2023-08-07 11:57:40 +03:00
Christiane (Tina) Heiligers
f2e23d7cc0
Enable API protection in serverless (#162149) 2023-08-04 13:35:49 -07:00
Jon
bd3b54c51d
[node] Restore default Node.js 16 DNS lookup behavior (#163025)
Starting in Node.js 17 the IP address from a DNS lookup resolves in the
order returned from the resolver. Prior versions resolve with IPv4
addresses sorted before IPv6 addresses.

This restores the previous behavior. In distributions, this can be
configured via the `--dns-result-order` flag in `node.options`.

Closes #163006
[Node.js 17
changelog](https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V17.md)

[Documentation](https://nodejs.org/docs/latest-v18.x/api/cli.html#--dns-result-orderorder)

Testing

1) Resolve localhost to 127.0.0.1 and then ::1 in `/etc/hosts`
2) `yarn start`. Logs should indicate connecting to elasticsearch over
127.0.0.1:9200
2023-08-04 08:27:06 -05:00
Kurt
7770ccc19f
Removing 'showNavLinks' config option and displaying Avatar menu for serverless (#162140)
## Summary

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

The avatar menu needs to be displayed for serverless. It was previously
required to be hidden in serverless, so a config 'showNavLinks' was
added. This config is no longer needed, so it has been removed.

## Testing

Start KB with the `--serverless` flag and login as `elastic`.

The Avatar should appear in the top right coner.
2023-07-31 16:31:37 -04:00
Rachel Shen
5864674ff6
Enable CSV reporting in serverless (#162358)
## Summary

This PR sets up the reporting plugin for the serverless implementation
by adding properties to the existing reporting config.

Image reporting is enabled for dev mode but disabled for serverless.
Canvas is disabled for serverless.

## To Test

Run `yarn es snapshot --license trial` in one terminal and then `yarn
start`. Load sample data and you should be able to see the option to
have PDF and PNG reports in Dashboard's Share Menu.

![Screenshot 2023-07-25 at 9 40 30
AM](c258a14d-6cc7-4fdf-9bb1-4dc3b15d371b)

Now run `yarn es snapshot --license trial` and `yarn serverless-es`. You
should see that Dashboard's share menu does not include PDF or PNG
Reports. However there is still the option to see run CSV reports and
see the Reporting in Management.

![Screenshot 2023-07-25 at 9 42 16
AM](638691dc-6c2f-41ed-a8d3-d5d38c15fa91)


### 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: Timothy Sullivan <tsullivan@elastic.co>
2023-07-28 14:06:01 -06:00
Nicolas Chaulet
9b8950254e
[Fleet] Support package capabilities filtering (#162435) 2023-07-28 15:58:06 -04:00
Jatin Kathuria
181eb39b70
[Security Solution][Feat] Integrate Discover Tab in timeline (#160036)
## Summary

First step for https://github.com/elastic/security-team/issues/6677

Aim of this PR is embed Discover in Security Solution. Discover must be
embedded as a complete app with certain set of capabilities working. The
set capabilities that need to working are listed here :
https://github.com/elastic/security-team/issues/6673

Release notes should be based on
https://github.com/elastic/security-team/issues/6673

### ⚠️ Note
- These changes are only available in serverless mode of security
solution behind a feature-flag called `discoverInTimeline`. Adds below
options to `serverless.security.yml`:

```yaml

# Serverless security specific options
xpack.securitySolution.enableExperimental:
   - discoverInTimeline

```
You can use below command to run serverless instance of security
solution :
```bash
yarn serverless-security
```
  

This Implements following changes for each plugin.

### Discover
1. Exports Discover App as Lazy component.
2. Ability to override Discover Services.
3. Adds a parameter `mode` which switches off/on certain options based
on the `mode`. `Mode` has possible values of `embedded` and
`standalone`. For example, `embedded` switches off Discover breadcrumb
syncing, because consuming app may not need it.

### Unified Search
1. Ability to export a Search bar with custom depedency instances.
2. For example, today Unified Search uses a singleton global
`dataService` which store global KQL filters and queries. This
customization, let consumers of unified search to pass a new instance of
`dataService`.
4. Please see below diagram for more clarity.


### Navigation
1. Ability to export a custom stateful TopNav Menu which includes:
    - DataView picker
    - KQL Search Bar
    - TimeRange Selector
2. Currently navigation consumes an instance of unified service which
uses a global singleton `data` service.
3. This PR creates a new instance of unified search which is then passed
to navigation to get a custom instance of `TopNav` Menu.

### Security Solution
1. Imports Discover Container Component
2. Uses customization point to pass a custom query bar. 
3. Implements Custom KQL Query Bar with below customizations

![image](5313c108-0976-4a00-80b7-d03b9f69d15c)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
2023-07-25 01:55:23 -07:00
Marco Antonio Ghiani
9bae853586
[Logs+] Add Log Explorer profile deep link (#161939)
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: weltenwort <stuermer@weltenwort.de>
2023-07-24 21:23:58 +02:00
Elena Stoeva
8fcd199d2a
[Serverless] Change default value of enabling config of security apps (#162187)
This is a follow-up to https://github.com/elastic/kibana/pull/160671,
where the Management plugins were disabled using `contextRef`.

The configs for disabling the UI of the security management plugins were
added in https://github.com/elastic/kibana/pull/158186. In this PR, they
are changed so that they follow the same convention for disabling the
Management plugins - setting the default values of the configs to `true`
and explicitly setting them to `false` in the `serverless.yml` file.
This way, we have a clear view in `serverless.yml` of all
plugins/functionalities that have been disabled.
2023-07-24 11:21:37 +01:00
Sander Philipse
0a6b5e92b8
[Serverless Search] Remove unwanted alterting rule and connector types (#162105)
## Summary

This moves alerting in Serverless Search to the Stack Management
alerting page, and removes

To remove these rule types, I had to disable the observability,
securitySolution, uptime, monitoring and infra plugins and make sure
that their server plugins (not just the frontend plugins) respected the
`enabled: false` flag.
2023-07-19 16:21:02 +08:00
Sébastien Loix
209d35365f
[Serverless nav] Update footer + project settings cloud links (#161971) 2023-07-18 08:39:14 -05:00
Elena Stoeva
6bc2ee2581
[Console] Filter autocomplete endpoints by availability (#161781)
Closes https://github.com/elastic/kibana/issues/160160

## Summary

This PR adds functionality to the new autocomplete generation script for
creating an `availability` property in the spec files that is used for
filtering out endpoints that are not available in the current
environment (e.g. `serverless` or `stack`). It also adds a config
setting in the console plugin that specifies the current environment.
This setting is also configured accordingly for serverless.


**How to test**
1. Checkout the [ES specification
repo](https://github.com/elastic/elasticsearch-specification)
2. Run the command with `node scripts/generate_console_definitions.js
--source <ES_SPECIFICATION_REPO> --emptyDest` where
`<ES_SPECIFICATION_REPO>` is the absolute path to the root of the ES
specification repo
3. Start the classic Kibana and verify that Console suggests only
endpoints that are available in the `stack` environment.
4. Start Kibana in any of the serverless modes and verify that Console
suggests only endpoints that are available in the `serverless`
environment.

Here are some example endpoints that can be used for testing:
| Endpoint  | Available in Stack | Available in Serverless |
| ------------- | ------------- | ------------- |
| [POST
_bulk](https://github.com/elastic/elasticsearch-specification/blob/main/specification/_global/bulk/BulkRequest.ts)
| Yes | Yes |
| [DELETE
_security/oauth2/token](https://github.com/elastic/elasticsearch-specification/blob/main/specification/security/invalidate_token/SecurityInvalidateTokenRequest.ts)
| Yes | No |
2023-07-14 10:29:27 +01:00
Søren Louv-Jansen
efdc760a42
[APM] Add index.fast_refresh to .apm-custom-link (#159674)
Closes: https://github.com/elastic/kibana/issues/155330

Adds `index.fast_refresh` to `.apm-custom-link` in order to ensure fast
index refreshes on serverless (1 second periodic refreshes instead of 5
second which is the new default on serverless).

This is pending on Elasticsearch adding support for `index.fast_refresh`
(https://github.com/elastic/elasticsearch/pull/96660)

---------

Co-authored-by: miriam.aparicio <miriam.aparicio@gmail.com>
Co-authored-by: Miriam <31922082+MiriamAparicio@users.noreply.github.com>
2023-07-14 11:25:07 +02:00
Ignacio Rivas
7c333cdc33
[Index Management] Disable certain actions for serverless (#161528) 2023-07-13 07:27:13 +02:00
Aleh Zasypkin
cdc862a618
[Serverless] Allow authentication via the Elasticsearch JWT realm with the shared_secret client authentication type. (#161564) 2023-07-11 15:06:34 +02:00
Ignacio Rivas
68b3baec93
[Deployment management] Mark devtools and management sidenav deeplinks as visible on serverless (#161227) 2023-07-11 10:31:21 +02:00
Sébastien Loix
31c081a1d7
Add cloud links in serverless.yml (#161534) 2023-07-11 09:23:25 +01:00
Nicolas Chaulet
7709670d92
[Fleet] Implement active agent soft limit (#161289) 2023-07-06 14:50:33 -04:00
Sergi Massaneda
f2e773d435
[SecuritySolution] Rename security solution plugins (#161153)
## Summary

closes: https://github.com/elastic/kibana/issues/159685

- Renaming _x-pack/plugins_:
`serverless_security` -> `security_solution_serverless`
`ess_security` -> `security_solution_ess`

- All the related configurations and types have also been renamed.
- i18n translation prefixes updated
- relocation of internal `security_solution_serverless` directories to
be consistent with `security_solution_ess`

### Eslint
I also added the plugins in the `.eslintrc` configuration, defining the
same rules as the `security_solution` plugin.
All eslint errors have been addressed (mainly _type_ imports errors)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-05 13:51:49 +02:00
Thom Heymann
6b02be4488
Restrict ability to disable features within a Space (#160416)
Resolves https://github.com/elastic/kibana/issues/159392

## Summary

This PR hides the feature visibility section on the space management
screen and disables adding `disabledFeatures` when creating or updating
spaces using the REST API or spaces client on serverless.

## Screenshot

![Spaces-Elastic
(2)](14d4900b-989d-420c-bddf-5ff70d305934)

## Testing

1. Start Kibana in serverless mode: `yarn start --serverless`
2. Edit default space and observe that the feature visibility section is
not rendered
3. Quit Kibana and restart using classic mode: `yarn start`
4. Edit default space and observe that the feature visibility section is
rendered correctly
5. Other considerations:
- Disabling feature visibility in the classic offering should throw an
error (`xpack.spaces.allowFeatureVisibility: false`)
- Enabling feature visibility on serverless should throw an error
(`xpack.spaces.allowFeatureVisibility: true`)
2023-07-03 21:02:31 +01:00
Pierre Gayvallet
ec962e05e6
Enable ZDT migration algorithm on serverless (#160536)
## Summary

Enable the ZDT migration algorithm on serverless deployments
2023-06-27 00:50:05 -07:00
Nicolas Chaulet
c3b8ed278d
[Fleet] Disable proxies feature in serverless (#160317) 2023-06-23 14:53:23 -04:00
Elena Stoeva
ca425e8993
[Serverless] Disable Advanced settings plugin (#159819)
Partially addresses https://github.com/elastic/kibana/issues/159590

## Summary

This PR disables the Advanced settings plugin for all projects in
serverless.

**How to test:**

1. Start Elasticsearch with `yarn es snapshot` and Kibana with `yarn
serverless-{mode}` where {mode} can be `es`, `security`, or `oblt`.
2. Verify that the Advanced settings app is not accessible and its
endpoint (`app/management/kibana/settings`) leads to the Stack
Management landing page.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-22 10:45:40 +01:00