Commit graph

116 commits

Author SHA1 Message Date
Elena Stoeva
44fe227da5
Revert "[Serverless] Disable Advanced settings plugin (#159819)" (#160404)
This reverts commit ca425e8993.

## Summary

Reverts the changes from https://github.com/elastic/kibana/pull/159819
in 8.9 since it was intended to go into 8.10 but it was accidentally
merged into 8.9.
2023-06-26 13:21:21 +01: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
Miriam
56ac338d11
add feature flags to apm config and serverless.oblt.yml (#159136)
Closes https://github.com/elastic/kibana/issues/159040

Add configuration values to hide UI components and block api in
serverless.oblt.yml

Examples

Non Serverless
<img width="1791" alt="image"
src="6657830c-7c0c-460d-bd57-e63eb8b72d6f">

Serverless
<img width="1273" alt="image"
src="be437d99-91fc-43f5-b344-c49593a33f30">
2023-06-19 11:18:00 +01:00
Luke Elmers
6f1fe0c12c
Temporarily allow anonymous access to status/stats APIs on serverless. (#159530) 2023-06-14 15:26:37 -07:00
Alejandro Fernández Haro
195216f0ec
[Serverless Telemetry] Add serverless label to inform of the project type (#159549)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-14 18:05:04 +02:00
Jean-Louis Leysens
7d07149323
[http] Do not do client version check on serverless as we do for onprem (#159101)
## Summary

This PR introduces two changes:

(1) Refactors the handler resolution logic to _not_ depend on the
`--serverless` cli arg by adding a new piece of config
`server.versioned.routeResolution` that accepts `newest | oldest`. This
piece of config is passed down instead of the `serverless` cli arg as
well as updating test cases

(2) Adds a new piece of config to turn off the client version checking.
This will be needed for rolling upgrades to allow old browser traffic to
reach new Kibana servers when there is stack version change.

Close https://github.com/elastic/kibana/issues/158723

## Open questions

* Do we want to make the version check still take _major_ version bumps
into account?
2023-06-13 05:12:55 -07:00
Ying Mao
6a50aaed66
[Serverless] Adding config to disable authentication on task manager background worker utilization API (#159505)
## Summary

Until [this issue](https://github.com/elastic/kibana/issues/153720) is
resolved, this config flag allows us to access the task manager
background worker utilization API in serverless to support autoscaling
of background task deployments

## To Verify

Run es: `yarn es snapshot`
Run serverless on this branch: `yarn serverless-es`

Verify you see the following warning in the logs:
```
[2023-06-12T12:47:19.641-04:00][WARN ][plugins.taskManager] Disabling authentication for background task utilization API
```

and you can access `/api/task_manager/_background_task_utilization`
without logging in
2023-06-12 13:58:25 -04:00
Sergi Massaneda
352d7c9ea7
[Security Solution] Endpoint RBAC integration with AppFeatures architecture (#158646)
# Summary

This PR adapts the endpoint RBAC to the new Serverless PLI features
architecture.
The changes are the following:

## App Features

### New appFeatures keys for endpoint

The `endpointExceptions` PLI has been added to the _Endpoint Essentials_
product tier and `endpointResponseActions` to the _Endpoint Complete_


686bc2eeaa/x-pack/plugins/serverless_security/common/pli/pli_config.ts (L20-L23)

### Endpoint appFeatures capabilities config

The features configuration for each appFeature (PLI) has been added.
They will be configured within the Security Kibana features only when
the appFeature is enabled by the selected Security product type. (Note
that all of them will be always added in regular ESS deployments, only
in Serverless we'll have different product types)
 

4d9f0c3a6f/x-pack/plugins/security_solution/server/lib/app_features/security_kibana_features.ts (L170-L198)

These are the capabilities that seemed relevant to me for each PLI, but
I don't have enough expertise in Endpoint operations to know for sure
what Kibana sub-features and capabilities need to be included in each
appFeature. The PLIs are in a private spreadsheet with the following
descriptions.
- endpointExceptions: 

![endpointExceptions](3c143293-93a2-46d9-a6a5-c7dbab26b30e)

- endpointResponseActions: 

![endpointResponseActions](12a644bd-5ad7-475e-850a-29ca89572027)

I'll need Endpoint team members to confirm there's no missing or wrong
capability in each appFeature config.

### Host isolation capabilities

It is important to mention that in the configuration above, to have some
capabilities available we are adding some sub-features directly using
the `subFeatureIds` entry, but for host_isolation capabilities, we are
doing it in a slightly different way, using the `subFeaturesPrivileges`,
this way the privileges are added to existing subFeatures.
 
The reason is we need to have the _write_ (isolate operation) only in
payment product types, but the _read_ and _delete_ (release operation)
capabilities should be always available, to allow releasing previously
isolated hosts after a product downgrade.

To do this we always include the `host_isolation_all` and
`host_isolation_exceptions_all` subFeatures in the base configuration,
but they only contain _read_ and _delete_ capabilities by default, only
when the product tier allows the proper appFeatures the _write_
capability is added to the same subFeatures privileges.


## Endpoint Authz module

### Remove "superuser" specific check
This specific check:
```
  // user is superuser, always return true
  if (isSuperuser) {
    return true;
  }
```
Has been removed, this has no behavioral impact, superuser has all
capabilities enabled anyway.

### Remove usage of `endpointRbacEnabled` and `endpointRbacV1Enabled`
experimental flags

They are already enabled by default. superuser will still have the
authorization to access all the features. The only change is the
endpoint sub-features will always be visible in the Kibana Privilege
section of the Role management page, they were hidden when these
experimental flags were disabled.

![Role Security
sub-features](98a9dcd8-0f03-439a-a924-a5175c59d2d5)

### Remove double _write_ check for _read_ authorizations:
We were doing unnecessary checks for the _write_ capabilities in the
_read_ authorizations, like: ```
const canReadEndpointList = canWriteEndpointList ||
hasKibanaPrivilege(fleetAuthz, 'readEndpointList');
```. Sub-features already add _read_ and _write_ capabilities on the
`all` privilege, so these double checks were unnecessary.

### Extract `hasHostIsolationExceptionsItems` flag

This flag was used to grant _read_ and _delete_ authorization for Host
Isolation Exceptions (HIE) when there is data, basically turning them
free features when there is data to perform the actions. This is needed
to allow users to remove HIE after a license downgrade scenario, which
is good.
However, we needed to do this API call from outside the auth module, in
every place we needed to call `calculateEndpointAuthz`, and we were also
adding the responsibility to do some auth-specific logic with licenses
outside the auth module, which is not good.
In addition, it is not very consistent to make authorization depend on
the existence of data to perform an action. Authorization should be
based only on the role capabilities and tiers/licenses, if some parts of
the application want to show/hide stuff depending on the data, that's
not the auth module's responsibility.
I checked all the places where we use the HIE _read_ and _delete_
authorizations, and the only place where we really need them to be
denied (when there is no data) is in the _links_, we need to remove the
HIE link from the app in this situation.
So, this PR moves the data check to the links.ts module, making the
_read_ and _delete_ permissions always granted without a license (they
will still be useless without data), the same way the `canUnIsolateHost`
authorization works. And then doing the async data check to remove the
HIE link in the _management/links.ts_ module itself, only in the last
case where we really need to know it:


4d9f0c3a6f/x-pack/plugins/security_solution/public/management/links.ts (L257-L262)

This flag extraction is unrelated to the integration of the new
architecture, I included it only to extract complexity from the _authz_
module and simplify its usage, but this change can be rolled back if we
consider it.

# Testing

- To start the application in ESS (non-serverless) mode, run it normally
with `yarn start`. Everything should keep working as usual with all
features available and capabilities should only be restricted by the
user role.

- To start the application in Serverless mode run with `yarn
serverless-security`. It sets a random root path, so access the main URL
at "http://localhost:5601/" to be redirected.
By default the "Endpoint Complete" product line is selected in the
_serverless.security.yml_ config, so everything should be available as
in ESS with the default config.


686bc2eeaa/config/serverless.security.yml (L11-L15)

Once in Serverless mode, in order to see the difference between product
types, we can change the _Endpoint_ `product_tier` to `essentials`, as
per the pli_config, this change should remove all the capabilities
included by the `endpointResponseActions` appFeatures config.
To check how the application behaves without the `endpointExceptions`
PLI, we can remove the _Endpoint_ `product_line` entirely from the
product array, leaving the _Security_ `product_line` alone.

# Next steps

## Upselling page

The product upselling page has not been registered for endpoint pages in
this PR, so when any of these pages are unauthorized because of the
serverless product tier, and they are accessed directly by URL they
still show the `Privileges required` screen.


![Privileges_required_page](675076c3-3c97-4347-bc0a-90845607b50f)

This is arguably not entirely correct. However, an upselling page can be
registered to display a "Buy a higher tier" message when the privilege
is denied because of the product type, if it is unauthorized because of
the user role the "Privileges required" page will still show.
I did not include the endpoint upselling page in this PR to keep it
simple, but the registry is already implemented in the main proposal, we
can define and register them in a follow-up PR.

## Superuser role in authz module

Almost all "superuser" role conditionals have been removed from the
Endpoint authz module, but there is only one check left here:


24330f2356/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.ts (L85)

This `canAccessEndpointManagement` flag looks deprecated, and it seems
to be used incorrectly in the few places where it is checked. If we
could fix the places that it is used, checking the proper authz flag, we
could definitively remove the `userRoles` parameter from the
`calculateEndpointAuthz` function, this will have an impact in the
different places where this function is called since they will no longer
need any async logic.

---------

Co-authored-by: Pablo Neves Machado <pablo.nevesmachado@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-09 03:03:21 -07:00
Achyut Jhunjhunwala
ec7ba022e1
[APM] Add logic to setup default landing page for serverless (#158916)
Closes https://github.com/elastic/kibana/issues/158457
## Summary

This PR add default landing page for serverless based on comments
provided here -
https://github.com/elastic/kibana/issues/158457#issuecomment-1570760274
2023-06-07 17:27:27 +02:00
Achyut Jhunjhunwala
ac2fc4c3be
[APM] Serverless Onboarding with Custom Tutorials (#158228)
Closes https://github.com/elastic/kibana/issues/155371
## Summary

PR adds Serverless Onboarding flow using Custom Integration. This would
also lay the foundation for us to complete get rid of Home Tutorial App
and move the remaining `onPrem` and `cloud` tutorials which are
currently still loaded using Home Tutorial App.

1. Adds new Custom Integration for Serverless Onboarding (Toggling Home
AApp Tutorial Integration)
2. Since we are migrating away from the Home App Tutorials, lot of
existing code has been duplicated and refactored for the custom
implementation. Home App Tutorial would require the Server to register
all the steps and the client to only register a custom component which
then would be loaded by Home App Tutorial component. We don't need to
follow this approach any more. All the UX logic has now been moved to
the Public folder with only Custom Integration done on the
`server/plugin.ts`.
3. As we are not sure how the solutions will be informed about being
running on Serverless or not, I have introduced a new variable in
`serverless.oblt.yml` file called `xpack.apm.serverlessOnboarding:
true`. With this the development has been done. This can be changed to
actual logic once we know more.

4. A new configuration `xpack.apm.managedServiceUrl` for accessing
Managed Service URL is also being added by Control Plane team as part of
https://elasticco.atlassian.net/browse/CP-2403. Hence this PR expects
this property to be present for Serverless.

5. Unit tests to toggle between `secret_token` and `api_key` depending
on availability has been added. No API Tests were added as no new API
created. Cypress Tests cannot be added due to Serverless

## Need help reviewing the PR ?

1. `config/serverless.oblt.yml` - Adds the new flag which would enable
this flow
2. `x-pack/plugins/apm/common/tutorial/tutorials.ts` - Defines the
configuration required to register the APM's Tutorial Custom Integration
3. `x-pack/plugins/apm/public/components/app/tutorials/commands` - This
directory contains all the agent specific data required to load the
TABLE with settings required for configuring APM MIS.
4. `x-pack/plugins/apm/public/components/app/tutorials/instructions` -
This folder contains all the individual agent specific instructions in
the format used by
[EuiSteps](https://eui.elastic.co/#/navigation/steps#complex-steps)
5. `x-pack/plugins/apm/public/components/routing` - Here we register our
custom route
6. Changes on the server side a quite small and they only register the
custom integration.
7.
`x-pack/plugins/apm/public/components/app/tutorials/serverless_instructions.tsx`
- This file currently defines all the logic for registering Serverless
instructions. We will soon have similar files for `onPrem` and `cloud`
instructions

### Risk Matrix


| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| The flow depends on presence of a flag in `kibana.yml` file. | Low |
High | By default this flow will be disabled and would fallback to
traditional onboarding in absence of the flag. |

### Demo



d60f0610-1fea-4540-86f5-2d72ab97f640

### Updated Demo with Create API Button inside the table


e84d8d6c-a048-4638-9b63-45080feca90b

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-07 07:20:50 -07:00
Yngrid Coello
3073ad2787
[Observability onboarding] Enable observability onboarding by default (#159100)
Since the only way to reach logs onboarding is manually entering the url
it has been decided to enabled this plugin by default.

In serverless it was already enabled by default through the config.
2023-06-07 14:43:45 +02:00
Thom Heymann
0f6eca7aa0
Hide create spaces button when limit is reached (#159102)
Resolves #159028 
Resolves #159047

## Summary

Hide create spaces button when limit is reached. 

## Screenshot


![Spaces-Management-Disabled](587dc47b-0377-4f72-8faa-7e6652cdab96)

## Testing

1. Set the maximum number of allowed spaces to 1

```yml
xpack.spaces.maxSpaces: 1
```

2. Verify that the create spaces button is hidden and that a callout is
displayed

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-07 13:24:55 +01:00
Alex Szabo
c57589ec57
Fix config stacking order (#158827)
## Summary
Fixes: #155154 (introduced in #149878), builds on #155436 .

- Adds tests to ensure the configuration merging order, check those for
reference.
- Updates the README to explain the intention
 
For the tests, I needed to output something to the logs. I hope it's not
a big issue to log it. If needed, I might hide that behind a verbose- or
feature flag.

### 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>
2023-06-05 15:15:07 +02:00
Sergi Massaneda
0fe67b2c04
[Security Solution][Serverless] AppFeatures improvements (#158935)
## Summary

issue: https://github.com/elastic/kibana/issues/158810
follow-up of: https://github.com/elastic/kibana/pull/158179

Improves the Security AppFeatures architecture:
- SubFeatures now preserve always the same order in the Security Kibana
config, despite the order of processing of enabled appFeatures.


![Security_sub_features](3fefa80d-dec6-4336-92db-66e43970fefc)

- Change the `productTypes` config format
- Update `getProductAppFeatures` to:
  - process the new `productTypes` format.
- include _essentials_ tiers PLIs inside _complete_ tiers automatically.
- AppFeatures module now receives an array of PLIs instead of an object
- AppFeatures config now uses only SubFeature IDS instead of
`subActions` config objects directly
- Upselling components updated and `useProductTypeByPLI` implemented to
display the Product Type required
2023-06-02 11:18:10 -07:00
Alejandro Fernández Haro
09b236fb9e
[Serverless] Disable plugin interactiveSetup (#158921) 2023-06-02 18:08:18 +02:00
Pablo Machado
88aa68aec8
[Security Solution][Serverless] PLI features base architecture (#158179)
[Documentation](https://docs.google.com/document/d/1Ms8d8d_fbTTRHlBroEAKGNMNk3jFFgOAkVDRhqLxAPQ/edit?pli=1#)


issue: https://github.com/elastic/kibana/issues/158810
## Summary

This PR is a cleanup to make [this
POC](https://github.com/elastic/kibana/pull/155420) production ready

- Serverless PLI features splitting in Security Solution, to allow/deny
access to configured functionalities, using the current Kibana RBAC
service.
- Create the Upselling service to display Serveless-specific prompts in
the application when features are not available
- Create a `SecurityRoutePageWrapper` component that wraps Pages and
displays the upsell when necessary.
- We will refactor the code base to use `SecurityRoutePageWrapper`
everywhere on another PR.
- Create an Upsell page and section for entity analytics


bd8db822-2f4b-4545-9da7-bedc07d93f90


### test:
Serverless: `yarn serverless-security`. 
* To change the product line you have to update
`xpack.serverless.security.productLineIds` on
`config/serverless.security.yml`.

ESS: `yarn start`


### Glossary
* PLI - Product Line Item (`Alert Triage`, `Osquery`, `Cases` , ... )
* Product Line - The product that the user is subscribed to (Security
Essentials, Security Complete, ...)
* essSecurity - New plugin with code that only runs for ESS offer
(non-serverless).
* App Feature - A security solution feature or group of features that
can be disabled for a product line. It can be mapped to PLIs (`Alert
Triage`, `Osquery`, `Cases` , ... ).
* Capability - A string that when present represents that the user can
access a given feature. A capability could be of the type UI or API
(`read_cases`, `crud_cases`, ...).


### Current architecture

![Security
Features](https://user-images.githubusercontent.com/17747913/233414697-231940c2-7790-485b-9403-e971351fa655.jpg)

### New architecture

![Serverless Security
Features](https://user-images.githubusercontent.com/17747913/233414733-1fc0eef1-be20-46ef-8692-bc80867326d1.jpg)

### How does it work?
Every serverless product line (endpointEssentials, cloud essentials) can
define which features are enabled:

69d0fc15f4/x-pack/plugins/serverless_security/common/pli/pli_config.ts (L12-L19)

For ESS (non-serverless) offer we enable all features by default.

69d0fc15f4/x-pack/plugins/ess_security/server/constants.ts (L10-L13)


A feature can define privileges: 

69d0fc15f4/x-pack/plugins/security_solution/server/lib/app_features/security_kibana_features.ts (L177-L185)

When the feature is enabled the privileges get merged into the base
config and injected into kibana features.

69d0fc15f4/x-pack/plugins/security_solution/server/lib/app_features/app_features.ts (L61-L70)


### TODO
- [x] lazy load these components
- [x] Add unit test to:
- ~SecurityRoutePageWrapper
x-pack/plugins/security_solution/public/common/components/security_route_page_wrapper/index.tsx~
-
~x-pack/plugins/security_solution/public/common/hooks/use_upselling.ts~
-
~x-pack/plugins/security_solution/public/common/lib/capabilities/has_capabilities.ts~
-
~x-pack/plugins/security_solution/public/common/lib/upsellings/upselling_service.ts~
  - ~x-pack/plugins/serverless_security/common/pli/pli_features.ts~
-
~x-pack/plugins/serverless_security/public/components/upselling/register_upsellings.tsx~
-
~x-pack/plugins/security_solution/server/lib/app_features/app_features.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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-01 10:40:30 -07:00
Nicolas Chaulet
0ff50e14cd
[Fleet] Disable requirement for Fleet server with standalone fleet server (#158633) 2023-05-30 15:13:50 -04:00
Elena Stoeva
dd4e88e436
[Serverless] Disable Search Sessions (#158356)
Partially addresses https://github.com/elastic/kibana/issues/157756

## Summary

This PR disables the Search Sessions plugin for 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 Search Sessions app is not accessible and its path
(`app/management/kibana/search_sessions`) leads to the Stack Management
landing page.
2023-05-30 10:55:45 +01:00
Yngrid Coello
8638dedc84
[Serverless] Set observability onboarding as default page (#158440)
This PR set `observabilityOnboarding` as default page for serverless
observability


0ff9c462-0388-4ead-8e5e-7b67e26f6f93
2023-05-26 17:22:18 +02:00
Elena Stoeva
574d334f07
[Serverless] Disable Migrate plugin (#157881)
## Summary

This PR makes the Migrate plugin disable-able for serverless.

Partially addresses https://github.com/elastic/kibana/issues/157756

**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 Migrate plugin doesn't show up in the nav bar and its
path (`management/data/migrate_data`) leads to the Stack Management
landing page.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-18 17:31:06 +01:00
Jeramy Soucy
ba0050249d
Harden security response headers for serverless offering (#158000)
Closes #150884

## Summary

Adds both strictTransportSecurity and disableEmbedding to the
serverless.yml config file, which sets the defaults for Kibana running
in a serverless configuration. Note that the disabling of embedding is
for the serverless MVP, with a plan to more strategically and explicitly
allow embedding of specific resources in future releases.

- `server.securityResponseHeaders.strictTransportSecurity:
max-age=31536000; includeSubDomains`: Adds the
`strict-transport-security` response header. The browser should remember
that a site, including subdomains, is only to be accessed using HTTPS
for 1 year.
- `server.securityResponseHeaders.disableEmbedding`: true adds the
`X-Frame-Options` response header with a avalue of `SAMEORIGIN` and adds
`frame-ancestors 'self'` to the `content-security-policy` response
header.

Note: if you are running without TLS enabled locally, you can disable
the `strict-transport-security` response header by overriding the
setting in kibana.dev.yml (see Testing step 8 below).

### Testing (locally)
1. Start Elasticearch
3. Start Kibana with `yarn start --serverless`
4. Sign into Kibana and open your browser's dev tools
5. In the network tab, inspect one of the requests for localhost
6. In the Headers tab, verify the above defined headers and values are
present
7. Stop Kibana, and restart normally with `yarn start`
8. Repeat the process in steps 4-6 and verify that the above defined
headers and values are not present
9. Stop Kibana, edit the Kibana.dev.yml file by adding
`server.securityResponseHeaders.strictTransportSecurity: null`
10. Start Kibana with `yarn start --serverless`
11. Repeat the process in steps 4-6 and verify that the headers and
values associated with disableEmbedding are present while the
`strict-transport-security` response header is not present.
2023-05-18 08:44:28 -04:00
Rodney Norris
2e4858b216
[Serverless Search] M0 Navigation (#157994)
## Summary

- Updates the project navigation to match latest design with a single
combined left nav
- Disables & removes `enterprise_search` plugin usage as we are not
linking to any ent-search pages for this milestone

*Note: the "Getting started" nav item will always show as active until
the Navigation component is updated to determine the selected nav item,
which will be done with other upcoming work.

## Screenshots

![image](fc54e4c3-a264-493c-bf1e-e5ae45126aeb)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-17 11:40:40 -05:00
Katerina Patticha
1f99a04134
[Observability] Add side navigation for serverless observability (#157360)
## Summary

The PR introduces the first iteration of the side navigation bar for
serverless observability. Part of
https://github.com/elastic/kibana/issues/153777

### Run locally

```
yarn serverless-oblt
```

#### Screenshots 


![image](b4a8a4d8-f18e-41e8-bf0e-798a75848885)



39ded143-0d4b-4ea6-9534-0ca87b80662d




### Fixes
- Fix rendering the icon for the nested navigation items  
-
24ee4dc616

### Notes

- There is an issue where the selected navigation item is not properly
highlighted and loses focus when the user clicks anywhere else on the
page. (atm out of the scope of the PR)
- The navigation tree is subject to change as there is an ongoing
discussion about the naming and order

---------

Co-authored-by: Søren Louv-Jansen <soren.louv@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-12 20:14:48 +02:00
Giuseppe Santoro
8df9c0489c
[Fleet] [Serverless] Disable Agent ID verification for Observability projects (#157400)
## Summary

We want to disable agentIdVerification to get rid of the final pipeline
for the o11y project type in the serverless solution
2023-05-12 12:40:33 +01:00
Sander Philipse
faa79e6bbe
[Serverless Search] Create overview page (#157021)
## Summary

This adds the basics of the planned Serverless Search overview page to
the Serverless Search plugin.

I added these pages to the `serverless_search` plugin rather than rely
on the existing Enterprise Search plugin for a few reasons:
1) These pages don't need any of the overhead and frameworks we've built
into the Enterprise Search plugin, keeping it in its own plugin makes
this much lighter-weight and easier to maintain and decouple.
2) This is all specific to Serverless Search, and won't be used in
Enterprise Search (at least for the foreseeable future).

There's still quite a lot that needs to be added:
1) A bottom section with links to specific pages elsewhere in Kibana. 
2) A section to create API keys
3) The integration links still need to go somewhere
4) This page needs some work on smaller screens, and the sidebar
overlaps the content on smaller screens.


https://user-images.githubusercontent.com/94373878/236879351-13af0162-4510-4bb0-a815-afa61249542c.mov


### 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] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] 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))
- [ ] 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))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-10 20:00:57 +02:00
Christiane (Tina) Heiligers
7bbe92f085
Enables preventing access to internal APIs (#156935)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-10 04:25:15 -07:00
Alejandro Fernández Haro
937f8ed3cb
[Serverless] Telemetry default config (#156874) 2023-05-09 00:50:29 +02:00
Clint Andrew Hall
b217dbf001
[serverless] Create Security Serverless plugin (#156104)
> Derived from https://github.com/elastic/kibana/pull/153274
> Builds upon https://github.com/elastic/kibana/pull/155582

## Summary

This PR creates the Serverless Security plugin, based on the work from
https://github.com/elastic/kibana/pull/153274:

- creates the plugin,
- adds API to hide the solution navigation from Security,
- calls that API if the chrome style is `project`.

<img width="1688" alt="Screenshot 2023-04-27 at 12 37 46 PM"
src="https://user-images.githubusercontent.com/297604/234979670-425bfb12-8194-4916-8f92-efff7804b577.png">

## Next Steps

- render the left nav from https://github.com/elastic/kibana/pull/153274
using an API provided by @elastic/appex-sharedux
  - this low-level API should be coming in the next few days.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-02 05:42:55 -07:00
Clint Andrew Hall
4e88645b59
[serverless] Create Observability Serverless plugin (#156118)
> Derived from https://github.com/elastic/kibana/pull/153274
> Builds upon https://github.com/elastic/kibana/pull/155582

## Summary

This PR creates the Serverless Observability plugin, based on the work
from https://github.com/elastic/kibana/pull/153274:

- creates the plugin,
- adds API to hide the solution navigation from Enterprise Search,
- calls that API if the chrome style is `project`.

<img width="1610" alt="Screenshot 2023-04-27 at 5 03 44 PM"
src="https://user-images.githubusercontent.com/297604/234990765-d6770650-41b3-4e94-ad7f-c6a22778d39a.png">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-01 09:27:32 +02:00
Clint Andrew Hall
965b327ca6
[serverless] Create Search Serverless plugin (#156037) 2023-04-27 21:49:59 -04:00
Alejandro Fernández Haro
de64ff5edf
[Serverless] Select project type via config (#155754) 2023-04-26 22:49:44 -06:00
Clint Andrew Hall
8e37b38417
[serverless] Create the Serverless Plugin (#155582)
> Derived from https://github.com/elastic/kibana/pull/153274 for
production.

## Summary

This PR creates the `serverless` plugin for Kibana Serverless projects.


![image](https://user-images.githubusercontent.com/297604/233892935-b3713575-a2f7-4e82-a9dd-e8c11823683f.png)


It uses the methodology proven out in the proof-of-concept
(https://github.com/elastic/kibana/pull/153274) and prepares it for
production:

- Adds chrome style and related API to the `chrome` services.
- Creates the `serverless` plugin.
- Invokes the new chrome style API for all serverless projects.
- Alters `yarn` scripts to support all project types, and switching
between them.
- Creates the new "Project Switcher" component for use in the new chrome
header for Serverless.
- Creates a Storybook config for this and future components.
- Adds API endpoint to trigger project switching and `Watcher` restarts.

<img width="1598" alt="Screenshot 2023-04-26 at 10 44 01 AM"
src="https://user-images.githubusercontent.com/297604/234612654-fdcf38ea-8c48-4066-bc85-507f40c984aa.png">


## Next steps

- [x] Creating a PR for enabling/disabling related plugins for
Serverless. (https://github.com/elastic/kibana/pull/155583)
- [ ] Creating product plugin PR based on
https://github.com/elastic/kibana/pull/153274.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-26 11:48:23 -07:00
Clint Andrew Hall
6690c445e3
[serverless] Add ability to disable certain plugins for Serverless. (#155583)
> Derived from https://github.com/elastic/kibana/pull/153274

## Summary

This PR extracts configuration settings for enabling/disabling plugins
in Serverless projects based on current requirements.

It seemed prudent to create an independent PR to K.I.S.S, rather than
include in PRs with more ornate changes, (e.g.
https://github.com/elastic/kibana/pull/155582)
2023-04-26 13:44:31 -04:00
Marco Antonio Ghiani
b40b89e711
[Logs UI] Redirect Logs UI to Discover when in serverless mode (#154145)
## 📓 Summary

Closes #153890

The implementation creates a new LogsApp service where we should keep
any logic concerned with what `target_app` parameter is configured and
the actions related to a specific configuration. I thought it could be a
good approach to avoid drilling down the global config till we need it
and keep it cleaner by injecting only the service with predefined
actions.

In this first case, we create a redirect to discover using its locator,
and the exposed method can be used anywhere across the app for
triggering the redirect.

## 🧪 Testing

### Normal behaviour

When Kibana is used as always, we want to keep the current behaviour and
the user will stay on the Logs UI pages.
- Launch the Kibana dev environment with `yarn start`
- Navigate to Logs UI
- Verify the navigation works normally and that no redirect to Discover
occurs

### Serverless behaviour

When Kibana is used in serverless mode, we want to redirect any user
landing to Logs UI to the Discover page, configuring the same data view
or creating an ad-hoc one starting from the index pattern
- Launch the Kibana dev environment with `yarn serverless-oblt`
- Navigate to Logs UI
- Verify to be redirected to Discover and a temporary data view is
created from the current index pattern

---------

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-19 08:30:45 -07:00
Nicolas Chaulet
394174eedf
[Fleet] Disable ILM policy in serverless (#154460) 2023-04-10 09:38:45 -07:00
Nicolas Chaulet
4c6779429c
[Fleet] Configure Fleet for serverless (#152712) 2023-03-07 08:59:53 -05:00
Spencer
065dbe759c
[serverless] split serverless config files (#150616)
We are currently expecting serverless environments to be broken up into
several different envs, this config structure allows us to customize the
config based on that environment without major modifications to the
config loading system.
2023-02-08 13:28:47 -07:00
Spencer
e07a65ef05
[serverless] add support for loading serverless specific config locally (#149878)
This adds the `--serverless` CLI arg (only available in dev mode, you
can also use `yarn start-serverless`), which will load the new
`config/kibana.serverless.yml` file. For now, this file is not included
in the build artifact, though we might include a `--serverless` flag
which replaces the `kibana.yml` file with `kibana.serverless.yml`.
@jbudz will follow up after this PR with the build related changes to
get this working with PR cloud deploys, which will be enough changes for
us to start iterating on UI specific changes based on running in a
serverless environment.

Additionally, support for the undocumented `KBN_CONFIG_PATHS` env var is
added, which should contain a comma-separated list of paths to kibana
config files. These files are loaded, in the specified order, before any
of the config files listed in the CLI but after the kibana.yml config
file.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-01-30 15:12:46 -07:00
Nodir Latipov
7c01257055
[Unified Search] Move autocomplete logic to unified search plugin (#129977)
* feat: move autocomplete logic from data plugin to unified search

* minor fix after comments

* updated Documentation: data.autocomplete -> unifiedSearch.autocomplete

* changed renameFromRoot order for autocomplete

* removed extra renameFromRoot in config deprecations, updated test

* added configPath for unified search plugin

* Update kibana.json

* updated path to autocomplete

* fix conflict

* fix conflict

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* fix Linting

* fix functional_with_es_ssl test
2022-04-22 11:02:56 +05:00
Gerard Soldevila
bbddc4233b
Allow customizing ES client maxSockets (#126937)
* Allow customizing ES client maxSockets

* Make maxSockets required (schema defaults to Infinity)

* Fix UTs

* Misc tweaks + extra UTs

* Update asciidoc

* Code cleanup

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-03-16 11:16:22 -07:00
Ahmad Bamieh
ccf961f8b7
[i18n] Integrate 8.2.0 Translations (#127309) 2022-03-10 13:40:10 +02:00
Pierre Gayvallet
1eea7a32d4
Allow to enable compression for communications with ES (#124009)
* Allow to enable compression for communications with ES

* update generated doc

* fix types in test

* update another snapshot
2022-02-01 08:02:29 +01:00
Rudolf Meijering
9ec41f70a0
Fix elasticsearch.queries -> elasticsearch.query (#119941)
* Fix elasticsearch.queries -> elasticsearch.query

* Fix another elasticsearch.queries -> elasticsearch.query
2021-11-30 13:39:06 +01:00
Christiane (Tina) Heiligers
29382a0608
Update default kibana.yml-follow up (#117676)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-05 19:07:30 +00:00
Christiane (Tina) Heiligers
ff7e77ad54
Updates and refactors main config (#117597) 2021-11-05 07:22:49 -07:00
Pierre Gayvallet
106183551a
[8.0] remove kibana.index config property (#112773)
* remove kibana config

* remove kibanaConfig usages

* prettier fix

* fix some globalConfig.kibana.index access

* fix xpack_legacy globalConfig usage

* fix home globalConfig usage

* fix canvas globalConfig usage

* fix action globalConfig usage

* fix (all?) remaining usages

* fix more plugins

* fix more plugins bis

* yet more usages

* fix ml usages

* fix security_solution

* fix lens

* fix monitoring

* remove from settings docs

* move doc update

* fix unit tests

* update generated doc

* improve test

* adapt new usage in security_solution

* fix security_solution config

* fix createConfig, again

* fix mock config
2021-10-25 14:25:24 -07:00
Jonathan Budzenski
7d66002da2
Bump node to 16.11.1 (#110684)
* Bump node to ^16

* fix comment

* use jest timers

* bump mock-fs

* Fix core type errors

* Unskipping tests that work on my machine

* skip new unhandled promise rejection

* Fix Nodejs v16 regression due to https://github.com/nodejs/node/issues/38924

* Fix failing concurrent connections collector test

* Fix types after merge from master

* update servicenow test

* Skip unhandledRejection tests

* Skip tests with unhandled promise rejection

* Fix discover jest failures

* bump node to 16.11.1

* revert timeout increase

* skip unhandled promise rejection

* rm jest import

* skip unhandled promise rejection

Co-authored-by: Rudolf Meijering <skaapgif@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Tim Roes <tim.roes@elastic.co>
2021-10-16 16:21:58 -05:00
Pierre Gayvallet
21c3675caf
fix default appender config example (#115159)
* fix default appender config example

* fix doc examples

* use json layout in example
2021-10-15 16:24:05 +02:00
Jonathan Budzenski
9df3db075f
[config] Remove leading spaces from logging configuration (#114168)
* [config] Remove leading spaces from logging configuration

This is a consistency check with other areas of the stack and other
configurations in kibana.yml.

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

* Update kibana.yml
2021-10-06 17:46:33 -05:00
Pierre Gayvallet
a4b74bd398
[8.0] Remove legacy logging (#112305)
* remove kbn-legacy-logging package

* remove legacy service

* remove legacy appender

* remove LegacyObjectToConfigAdapter

* gix types

* remove @hapi/good / @hapi/good-squeeze / @hapi/podium

* remove `default` appender validation for `root` logger

* remove old config key from kibana-docker

* fix FTR config

* fix dev server

* remove reference from readme

* fix unit test

* clean CLI args and remove quiet option

* fix type

* fix status test config

* remove from test config

* fix snapshot

* use another regexp

* update generated doc

* fix createRootWithSettings

* fix some integration tests

* another IT fix

* yet another IT fix

* (will be reverted) add assertion for CI failure

* Revert "(will be reverted) add assertion for CI failure"

This reverts commit 78d5560f9e.

* switch back to json layout for test

* remove legacy logging config deprecations

* address some review comments

* update documentation

* update kibana.yml config examples

* add config example for `metrics.ops`

Co-authored-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-10-05 13:30:56 +02:00