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

---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## 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

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>
> 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)
## 📓 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>
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.
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>
* [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
* 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>
* chore(NA): load NODE_OPTIONS from options files across environments
* chore(NA): move node.ci.options to config folder
* docs(NA): update docs to explain how to set node options from the cfg fil
* chore(NA): removed test npm scripts
* fix(NA): typo on setup script for CI
* chore(NA): add debug info
* chore(NA): export options on CI
* chore(NA): remove debug info
* chore(NA): support for configurable config folder using env var
* chore(NA): add node.options file into docker img
* fix(NA): use calculated config dir on node options for ci
* chore(NA): node bin scripts bootstrap and node_with_options implementation for bash
* chore(NA): complete node_with_options scripts with bat version
* chore(NA): add bin/node dev script and remove cli for run_with_node_options
* chore(NA): increase default maxBuffer
* chore(NA): remove run with options script from package.json
* chore(NA): include kbn-node script and underlying usage of it
* chore(NA): remove change on eslint
* chore(NA): correct typo on kbn node script comment
Co-authored-by: Tyler Smalley <tylersmalley@me.com>
* chore(NA): correct typo on kbn node script comment
Co-authored-by: Tyler Smalley <tylersmalley@me.com>
* chore(NA): add line to describe each option should be specified in a separated line
* chore(NA): remove node options from dev and ci env
* chore(NA): remove changes from package.json
* chore(NA): fix docker image build
* chore(NA): change value for example of --max-old-space-size in the node.options file
Co-authored-by: Tyler Smalley <tylersmalley@me.com>
* chore(NA): remove --no-warnings from node.options and force it in the bin scripts
* chore(NA): prevent 'The system cannot find the file' error message
* chore(NA): introduce slash when building path for %DIR%
* chore(NA): read options from file only if it exists
Co-authored-by: Jonathan Budzenski <jbudz@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Tyler Smalley <tylersmalley@me.com>
* Instrument Kibana with APM RUM agent
* make route-change transaction work with properl url
* extract page-load transaction url from app link
* check if app is hidden and set active:false
* make distributed tracing work and merge config
* remove config/apm.js and address review
* address review comments
* add apm.js to build tassks
* move apm from dev to src
* add @types/hoist-non-react-statics which is required by react rum
* apply changes correctly from master
Instruments Kibana with Elastic APM by adding the Node.js agent to the
source code. The agent is not turned on by default but can be enabled by
setting the environment variable `ELASTIC_APM_ACTIVE=true` or by
creating an apm config file called `config/apm.dev.js` and setting
`active: true` inside of it.
This implementation is not meant to be used by end-users of Kibana as it
lacks integration with the regular Kibana config file. For now, this is
meant as a useful internal tool for Elastic employees when developing
Kibana.
By default, it's pre-configured with a `serverUrl` pointing to an APM
Server hosted on Elastic Cloud. The data is stored in an ES cluster
accessible only by Elastic employees. These defaults can easily be
overwritten using environment variables or via the custom config file.
It would be good to see a list here, as long as we will add more languages.
A user will not have to look into any other document to find a language code.
That will be more easier for any one who configure this file.
According to @tvernum, this is a common source of misconfiguration.
Since we already recommend that users use the `kibana` reserved user for
this setting, this should hopefully help some users out.
* set kibana locale in kibana.yml config
* remove accept-language-parser
* remove unnecessary tests
* fix readme description, fix description for locale in kibana.yml
* add point, that i18n.locale option should have exact match
* update kbn/i18n README
* Update README.md
* use getUiTranslations in render_mixin, remove i18n_mixin
* move registering translation files to mixin function