Commit graph

1302 commits

Author SHA1 Message Date
Pierre Gayvallet 2426811bca
Migrate instance uuid logic to new platform (#52060)
* move and migrate uuid code to new platform

* create and wire uuid service

* handle legacy compatibility

* update generated docs

* add `set` to LegacyConfig interface

* Fix types

* fix config access

* respect naming conventions for uuid

* remove hardcoded config paths

* rename manageInstanceUuid to resolveInstanceUuid

* moves legacy config uuid set from uuid to legacy service

* log specific message depending on how uuid was resolved

* resolve merge conflicts

* use fs.promises

* add forgotten @public in uuid contract

* add explicit errors and tests

* ensure uuid is valid in configuration

* fix read/write tests
2019-12-17 09:25:21 +01:00
Tiago Costa 30196ace92
Increases log rotation file size minimum limit (#53169)
* fix(NA): increase log rotation minimum log filesize to rotate limit

* chore(NA): correct interval

* docs(NA): add comments to explain everyBytes limits
2019-12-17 02:30:11 +00:00
Brandon Morelli 4a211a83f6
[docs][APM] Add APM settings page (#53172) 2019-12-16 13:50:55 -08:00
Patrick Mueller 3cc513e373
change kibana.yml xpack.actions.whitelistedHosts to default to ['*'] (#52827)
resolves https://github.com/elastic/kibana/issues/52597

The previous default was `[]`, which meant no hosts were whitelisted,
which would require a Kibana admin to set this value for any actions
that accessed 3rd party services (currently email and webhook, longer
term slack and pagerduty).
2019-12-16 14:59:30 -05:00
Kaarina Tungseth f6c30199d8
[DOCS] Compresses images to 1MB or less (#51496)
* [DOCS] Compresses images to 1MB or less

* Changed lens_data_info to png
2019-12-16 11:15:00 -06:00
Kaarina Tungseth 6cef462c8b
[DOCS] Updates for API usage (#51989)
* [DOCS] Updates for API usage

* Changes from Larry

* Update docs/api/using-api.asciidoc

Co-Authored-By: Larry Gregory <lgregorydev@gmail.com>

* Comments from Larry

* Comment from Larry
2019-12-16 11:03:38 -06:00
Pierre Gayvallet 408139bf0b
Allow loggers to create child loggers via 'get' method (#52605)
* add 'Logger.get' method

* updates generated doc

* resolve merge conflicts
2019-12-16 10:41:14 +01:00
Eli Perelman 614bde927e
Move CSP options to new platform (#52698)
* Move CSP options to new platform

* Expose SharedGlobalConfig from root

* Derive CSP options from config

* Consolidate CSP configuration with HTTP config

* Fix outstanding config renames

* Remove legacy CSP configuration calls, migrate to platform properties

* Revise docs

* Fix test from type change

* Expose ICspConfig, consolidate and simplify CSP defaults access

* Rebase and update docs

* Remove legacy API from route definition params, review nits

* Clean up config path usages for consistency

* Regenerate docs
2019-12-13 15:57:17 -06:00
Josh Dover 0dac43516e
Update docs to not use AppMountContext (#52962) 2019-12-13 13:00:54 -06:00
Joe Portner 3e6270737a
Change session timeout values to use duration instead of number (#52520) 2019-12-13 13:58:40 -05:00
Josh Dover ec2134d221
Add lint rule to prevent server code being imported into client (#52447) 2019-12-13 12:26:04 -06:00
Pierre Gayvallet eb3d9b118a
Implements config deprecation in New Platform (#52251)
* implements 'rename' and 'unset' deprecations

* introduce usage of ConfigDeprecationProvider

* adapt RawConfigService to only returns unmodified raw config

* apply deprecations when accessing config

* register legacy plugin deprecation in new platform

* implements ConfigService#validate

* add exemple config deprecation usage in testbed

* documentation

* export public config deprecation types

* fix new test due to rebase

* name ConfigDeprecationFactory

* update generated doc

* add tests for unset and move it to src/core/utils

* add tests for renameFromRoot and unusedFromRoot

* cast paths as any as get expects a fixed-length string array

* use specific logger for deprecations

* add additional test on renameFromRoot

* update migration guide

* migrate core deprecations to NP

* add integration test

* use same log context as legacy

* remove old deprecation warnings integration tests, now covered in NP

* migrates csp deprecation to NP

* removes deprecationWarningMixin from legacy

* remove legacy core deprecations

* remove unused import

* rename setupConfigSchemas to setupCoreConfig

* update generated doc
2019-12-13 09:49:56 +01:00
Josh Dover 2d3698972b
Add getStartServices API (#50231) 2019-12-12 13:21:35 -06:00
gchaps db2d4bdf11
[DOCS] Adds example of assigning roles in Reporting (#52757)
* [DOCS] Adds example of assigning roles in Reporting

* [DOCS] Updates reporting security doc with review comments

* [DOCS] Incorporates review comments in reporting doc
2019-12-11 16:03:12 -08:00
Jonathan Budzenski 618764355e
[docs] max-old-space-size (#52310)
* [docs] max-old-space-size

* Update docs/setup/production.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/setup/production.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* _max_

* Update docs/setup/production.asciidoc

Co-Authored-By: Tyler Smalley <tylersmalley@me.com>

* max example

* move comma

* Update production.asciidoc
2019-12-11 17:36:55 -06:00
Nathan Reese eb8c0e33dd
[Maps] clean up source settings (#52644)
* [Maps] clean up source settings

* update es_search_source editor

* geo grid source

* pew pew source

* fix i18n

* doc updates for changing UI

* docs re-wording

* use correct image name

* update snapshot

* review feedback
2019-12-11 13:53:58 -07:00
Melori Arellano 7a1db7f23b
[DOCS]Clarify that by default server.host only allows local connections (#52802)
* [DOCS]Clarify that by default server.host only allows local connections

* Update docs/setup/access.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/setup/settings.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/setup/settings.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>
2019-12-11 13:22:45 -07:00
Lukas Olson 8395596159
[Search service] Add timeout parameter from config to requests (#52352)
* Add timeout parameter to requests

* export SharedGlobalConfig from `core/server`
2019-12-11 10:57:19 -07:00
Brandon Morelli b91c24c0b3
docs: unknown route (#52703) 2019-12-11 09:53:44 -08:00
Aleh Zasypkin 2ec82d3dd9
Migrate the rest of the API endpoints to the New Platform plugin (#50695) 2019-12-11 18:35:49 +01:00
Josh Dover a91e53f18f
Add asResponse option to HttpService methods (#52434) 2019-12-11 10:53:17 -06:00
gchaps 6e476e845d
[DOCS] Updtes description of elasticsearch.requestHeadersWhitelist (#52675) 2019-12-10 12:30:11 -08:00
Spencer 6ea1b2ccee
[ftr/lifecycle] refactor to be typesafe (#52453)
* [ftr/lifecycle] refactor to be typesafe

* update test fixture
2019-12-09 18:46:45 -07:00
Tiago Costa 6d5c8caadc
Adds support for log rotation (#49750)
* chore(NA): add log options to config yml

* chore(NA): remove unwanted option from config declaration

* chore(NA): add the bootstrap for the logging rotate feature

* feat(NA): base interface setup for log rotation feature

* docs(NA): add documentation for the new logging rotate options. chore(NA): added new schema validations

* chore(NA): base lifecycle methods and logic

* feat(NA): monitor logic for log rotate feature

* fix(NA): basic log rotation lifecycle

* chore(NA): fix typo on config file

* feat(NA): add rotate files feature to log rotator

* chore(NA): fix log rotate config

* chore(NA): some tests to try logging rotate lifecycle

* feat(NA): correct log rotation logic

* fix(NA): lifecycle for the log rotator

* test(NA): add a test case

* chore(NA): correctly add the new defaults to the config schema

* test(NA): change dir generation for test

* chore(NA): mock log rotate for logging service test

* test(NA): fix temp dir permission issue

* test(NA): try to fix test

* chore(NA): remove usage of mkdtemp

* refact(NA): feature logging rotation reimplementation in order to make it work across platforms

* fix(NA): bug on file size monitor handle

* fix(NA): remove wrong commented out code

* chore(NA): correctly identify if we should use polling

* chore(NA): fix some code comment

* refact(NA): minor implementation details

* chore(NA): change the order of logging mix

* test(NA): add some more test cases

* test(NA): add the majority of the test cases

* test(NA): add last test case

* test(NA): fallback conditions

* chore(NA): add logging rotate config keys to the docker image

* chore(NA): move logging.rotate.enable setting to enabled

* chore(NA): clarify documentation for logging rotate

* chore(NA): use regular instead of logWithMetadata

* chore(NA): move chokidar to a prod dep

* chore(NA): add log explaining why we had fallback to use polling

* test(NA): fix unit tests

* test(NA): fix unit tests

* chore(NA): correctly place this.running condition

* chore(NA): remove redundant call

* fix(NA): log filename containing numbers would produce invalid sorting

* chore(NA): remove existsSync function call from readRotatedFilesMetadata function

* chore(NA): Update docs/setup/settings.asciidoc

Co-Authored-By: Tyler Smalley <tylersmalley@me.com>

* chore(NA): Update docs/setup/settings.asciidoc

Co-Authored-By: Tyler Smalley <tylersmalley@me.com>

* chore(NA): Update docs/setup/settings.asciidoc

Co-Authored-By: Tyler Smalley <tylersmalley@me.com>

* chore(NA): Update docs/setup/settings.asciidoc

Co-Authored-By: Tyler Smalley <tylersmalley@me.com>

* chore(na): update src/legacy/server/logging/rotate/index.js

Co-Authored-By: Tyler Smalley <tylersmalley@me.com>

* chore(NA): remove unused config line from docker vars

* chore(NA): update documentation to include info about non exact limits

* chore(NA): remove redudant if clause

* fix(NA): correctly work with new keepFiles limit after start

* fix(NA): warning log for logging rotate

* chore(NA): replace logwithmetadate with log

* docs(NA): correct log to right terms

* docs(NA): add comment about usage of slice(-1)

* refact(NA): changing polling interval from seconds to milliseconds

* docs(NA): fix comments for shouldRotate method

* chore(NA): update src/legacy/server/logging/rotate/log_rotator.js

Co-Authored-By: Mikhail Shustov <restrry@gmail.com>

* chore(NA): update src/legacy/server/logging/rotate/log_rotator.js

Co-Authored-By: Mikhail Shustov <restrry@gmail.com>

* refact(NA): small change

* refact(NA): bound stop

* refact(NA): shouldUsePolling test function

* refact(NA): move named truncate function to delete

* refact(NA): typescript conversion

* chore(NA): type update for log rotation index file

* docs(NA): add experimental tag on docs

* chore(NA): add call protection of clearTimeout

* refact(NA): cleanup comments and wrong added logs plus inline config

* chore(NA): replace ts-ignore by non null assertion operator

* docs(NA): extend documentation for _renameRotatedFilesByOne call

* chore(NA): fix type problems for process.emit on nodejs
2019-12-10 01:32:20 +00:00
Rudolf Meijering e9299092f0
Expose SavedObjectsStart from AppMountContext (#52059) 2019-12-09 12:37:54 +01:00
Maja Grubic 1f9f3a559b
Re-introducing docs on image url (#52458) 2019-12-07 14:54:56 +00:00
Nathan Reese d4479b8221
[skip-ci][Maps] Connecting to Elastic Maps Service from an internal network documentation (#48927)
* [skip-ci][Maps] Connecting to Elastic Maps Service from an internal network documenation

* use ascii docs list format

* review feedback
2019-12-06 14:34:34 -07:00
Tony Sleva b1eebaa2a5
Update most-frequent.asciidoc (#52241)
Backporting https://github.com/elastic/kibana/pull/52240
2019-12-06 12:24:14 -09:00
Mikhail Shustov 2ef6d8d8f7
Add pre-response http interceptor (#52366)
* add onPreResponse interceptor

* expose registerPreResponse to plugins

* address comments

* regen docs
2019-12-06 17:46:25 +01:00
Dan Roscigno 84bba66e1d Add tutorial for using RBAC with Spaces (#52197)
* add spaces with RBAC tutorial

* add tutorial

* removed extra dir

* revert

* init tutorial

* link tutorial

* fix images dir

* fixed links

* editing

* Update docs/user/security/rbac_tutorial.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/user/security/rbac_tutorial.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/user/security/rbac_tutorial.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/user/security/rbac_tutorial.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/user/security/rbac_tutorial.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* show path

* added path to crate user

* rearrange

* remove image

* specify admin role

* replace we with you

* Update docs/user/security/rbac_tutorial.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* remove excess words

* remove excess words

* spelling

* spelling

* Update docs/user/security/rbac_tutorial.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/user/security/rbac_tutorial.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* resolve reviewer comments

* review updates

* address review comments

* removed monitor cluster priv

* reviewer comments
2019-12-05 17:01:04 -08:00
Ahmad Bamieh 9fe302cf17
[Cloud] move cloud plugin to np (#51789)
* move cloud dir to plugins from legacy

* first iteration moving to NP

* config as observable

* finish plugin

* migrate xpack.cloud.apm.*

* self code review

* remove unused lodash get

* use lodash get to get configs

* export SerializedDatatable

* eslint fix

* eslint fix

* fix setup type

* fix monitoring tests

* fix test mock function

* resolve ELASTIC_SUPPORT_LINK in core

* running check_core_api_changes script

* review feedback

* mock setHelpSupportUrl

* update snapshots
2019-12-05 08:20:28 -05:00
Alejandro Fernández Haro bd3857a79b
[NP] Expose global config to the plugins (#51478)
* [NP] Expose global config to the plugins

* globalConfig in Plugin context: expose read-only methods only

* SharedGlobalConfig rework + Moving pkg, fromRoot & path utils from legacy to NP

* Updated API docs

* Fix test references to the moved utils

* Replace zip with combineLatest

* Change tests to describe/it + remove "(deprecated)" from the test description

* Moving path files to a folder + exposing the config path in the contract

* deepFreeze the globalConfig in the pluginContext

* Fix types in tests with new path.config

* Move fromRoot and package_json utils to core/server/utils

* Rename globalConfig to legacy.globalConfig$

* path.config renamed to path.configDir (not renaming path.data because it might be a breaking change)

* Change configDir in mocker as well

* Fix test after config renamed to configDir

* Fix API docs conflicts

* Rename the path properties when exposing them

* path.configDir removed from the path config-schema

* Remove path.configDir. It is already in env.configs

* Add Migration documentation and examples

* Fix 'kibana/server' imports in the MIGRATION docs
2019-12-05 10:25:32 +00:00
Michail Yasonik e8f3fa91d9
Updating accessibility guide and contributing readmes (#52038)
* updating accessibility guide and contributing readmes

* updating dev docs
2019-12-04 19:11:16 -06:00
Rudolf Meijering 7f4bdb2d57
static createRepository factory function (#52056)
* static createRepository factory function

* Fix API docs after master merge
2019-12-04 13:15:37 +01:00
Pierre Gayvallet 99c6396fd5
Migrate Capabilities to new platform (#51438)
* create service skeleton

* move registerCapabilitiesModifier to capabilities service and rename to registerCapabilitiesSwitcher

* starts to move capabilities logic to CapabilitiesService

* move capabilities route to service

* add initial integration test for capabilities route

* capabilitiesMixin now delegates to capability service

* use server-side Capabilities import in server code

* update generated doc

* remove capabilities from injectedMetadatas

* use applications sent from client instead of server-registered navLinks

* disable authRequired for capabilities route

* (temp) exposes two endpoints for capabilities

* Add fetch-mock on capabilities call for karma tests

* adapt xpack Capabilities test - first attempt

* adapt x-pack ui_capabilities test

* add '/status' to the list of anonymous pages

* Add documentation on Capabilities APIs

* move Capabilities to core/types

* update generated docs

* add service tests

* protecting resolveCapabilities against added/removed capabilities

* update generated docs

* adapt mocks due to rebase

* add forgotten exports

* improve capabilities routes registering

* name capabilities registering methods

* resolve conflicts due to merge

* address review issues

* add comment about reason for exposing two routes

* extract createHttpServer test helper

* fix merge conflicts

* improve documentation

* remove `/status` anon registration as now done in NP status plugin

* fix merge conflicts
2019-12-03 09:34:49 +01:00
Karen Metts f7f72cb737
[Doc]Replace outdated screenshots and change graphic format (#52017)
* Replace outdated screenshots and change graphic format

* Added screenshot role per review comments
2019-12-02 16:32:35 -05:00
Lisa Cawley e68b39b72d
[DOCS] Fixes xpack-ref links (#51936) 2019-12-02 09:43:25 -08:00
Joe Portner 5906801b4f
Http compression config (#50738)
HTTP compression for responses may be disabled entirely, or it may
be conditionally enabled based on a whitelist of trusted referrers.
2019-12-02 11:43:06 -05:00
Mikhail Shustov 0f8533730c
Unify uiSettingsClient contracts (#51167)
* introduce IUiSettingsClient on the client

* switch uiSettings service to  IUiSettingsClient

* update uiSettings service tests

* all plugins should use IUiSettingsClient

* stop is not public methods anymore

* remove savedobject attribute type references

* regen docs

* remove all references to UiSettingsClient class

* regen docs

* add migration example for uiSettings

* update consumer types and tests

* address comments
2019-11-28 22:53:02 +01:00
Alejandro Fernández Haro 066613e2a6
Allow routes to define some payload config values (#50783)
* Allow routes to define some payload config values

* Documentation typo

* Move hapi `payload` config under `body` + additional validations

* Update API docs

* Amend explanation in API docs

* Add stream and buffer types to @kbn/config-schema

* Fixes based on PR feedback:
- Add 'patch' and 'options' to valid RouteMethod
- Add tests for all the new flags
- Allow `stream` and `buffer` schema in the body validations (findings from tests)

* API documentation update

* Fix type definitions

* Fix the NITs in the PR comments + better typing inheritance

* API docs update

* Fix APM-legacy wrapper's types

* Fix KibanaRequest.from type exposure of hapi in API docs

* Move RouterRoute interface back to private + Expose some public docs

* Update @kbn/config-schema docs
2019-11-28 09:23:56 +00:00
Rudolf Meijering f29af1219d
Split legacy plugin discovery, expose SavedObjects scopedClient, wrappers, repository (#48882)
* Split legacy plugin discovery, expose internal SavedObjectsClient

* Expose internal SavedObjectsClient to plugins

* Add more documentation

* Expose client wrappers, repository, scoped client from SavedObjects

* Remove unused onBeforeWrite

* Refactor Service / Repository for testability

* Bind exposed clientProvider methods

* Fix eArchiver's KibanaMigrator

* Cleanup

* Use APICaller type

* Expose SavedObjectsServiceStart to plugins

* API documentation

* Rename API methods to be verbs
2019-11-27 16:47:22 +01:00
Joe Portner 7830946f6a
Fix infinite redirect loop when multiple cookies are sent (#50452)
Cookies are now checked for attributes that match the current
Kibana configuration. Invalid cookies are cleared more reliably.
2019-11-27 09:26:21 -05:00
Lisa Cawley a234e8b836
[DOCS] Fixes broken links (#51634) 2019-11-26 12:36:35 -08:00
Alexey Antonov c415311221 Move @kbn/es-query into data plugin (#51014) 2019-11-26 13:28:04 -07:00
Joe Portner 38c17d6c7d
Improve session idle timeout, add session lifespan (#49855)
This adds an absolute session timeout (lifespan) to user sessions.
It also improves the existing session timeout toast and the overall
user experience in several ways.
2019-11-26 10:47:40 -05:00
Søren Louv-Jansen e8e517475a
[Security] Add message to login page (#51557)
* [Security] Add loginAssistanceMessage to login page

* Fix tests

* Fix login_page.test.tsx

* Fix defaultValue

* Render login assistance message independently of other messages and use EuiText instead of EuiCallOut

* Use small text

Co-Authored-By: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Flip order of message around
2019-11-26 13:19:11 +01:00
Pierre Gayvallet 7fef618ea6
Add compatibility wrapper for Boom errors thrown from route handler (#51157)
* add wrapErrors method to router

* add RouteRegistrar type

* update generated doc

* add migration example

* rename wrapErrors to handleLegacyErrors
2019-11-26 10:21:49 +01:00
Josh Dover fff493e54e
Build bundles for all new platform plugins (#51525) 2019-11-25 16:29:35 -06:00
Catherine Liu bcd0c09899
[Canvas][Docs] Updates function reference (#50393)
* Updates Canvas function reference doc

* Added context examples

* Addressed feedback

* escapes curly braces

* Updated location help text

* Fixes doc build error
2019-11-22 16:05:09 -07:00
Spencer b2e200437e
[master] Update where log files are written using systemd (#47… (#51463)
At least for kibana-oss 7.4, this is how I can access Kibana logs. 
The file `/var/log/kibana` is not created and if I set it as a log file, kibana does not have permission to write there. 
See also:
https://github.com/elastic/kibana/issues/6579
2019-11-22 09:53:25 -07:00