Commit graph

17820 commits

Author SHA1 Message Date
Tyler Smalley 860daa257a
Bump to 6.5.0 (#21210)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-07-25 08:25:05 -07:00
Stacey Gammon 0034ad95f5
bump reporting timeout (#20833) (#21173) 2018-07-25 09:15:42 -04:00
Pete Harverson 3131ea1871
[ML] Prevents conditions on rules for rare, metric and lat_long (#21198) (#21200) 2018-07-25 14:12:01 +01:00
Tim Roes 91f50afead
TypeScriptify visualize loader (#21025) (#21190)
* TypeScriptify Vis loaders

* Fix issue with undefined timeRange

* Fix chrome typing

* Fix unit tests

* Fix this issue

* Add missing uiState to request handler

* Implement Felix's suggestions

* Add timefilter listener
2018-07-25 09:22:26 +02:00
Tyler Smalley 390d9bcd63
[security] Improve communication for ES/X-Pack being unavailable (#21124) (#21183)
Previously if Elasticsearch was unavailable in the Kibana default distribution,
you would be prompted with a disabled login screen stating "Login is currently
disabled. Administrators should consult the Kibana logs for more details". This
was rather confusing for users who have a Basic license.

This now provides the user with a screen providing only the required
messaging.

Additionally, if you were using Kibana with a Basic license with an OSS
distribution of Elasticsearch, you would see the same disabled login
screen as mentioned previously.

This also separates the messaging there to provide clear details for the
user to resolve the issue.
2018-07-24 20:37:35 -07:00
Spencer 928e6f0898
[esArchiver] replace windows line-endings on parse (#21111) (#21180)
* [esArchiver] replace windows line-endings on parse

* [esArchiver/parse/tests] feed a little extra data so replaceStream buffer is flushed
2018-07-24 19:43:33 -07:00
Brandon Kobel afe0ad08a2
RBAC Phase 1 (#19723) (#21164)
* partial implementation for OLS Phase 1

* Allow Saved Objects Client to be wrapped

* Add placeholder "kibana.namespace" configuration property

* revert changes to saved objects client

* Remove circular dependency

* Removing namespace setting, we're using xpack.security.rbac.application

* Adding config.getDefault

* Expose SavedObjectsClientProvider on the server for easy plugin consumption

* migrate x-pack changes into kibana

* Beginning to use the ES APIs to insert/check privileges (#18645)

* Beginning to use the ES APIs to insert/check privileges

* Removing todo comment, I think we're good with the current check

* Adding ability to edit kibana application privileges

* Introducing DEFAULT_RESOURCE constant

* Removing unused arguments when performing saved objects auth check

* Performing bulkCreate auth more efficiently

* Throwing error in SavedObjectClient.find if type isn't provided

* Fixing Reporting and removing errant console.log

* Introducing a separate hasPrivileges "service"

* Adding tests and fleshing out the has privileges "service"

* Fixing error message

* You can now edit whatever roles you want

* We're gonna throw the find error in another PR

* Changing conflicting version detection to work when user has no
application privileges

* Throwing correct error when user is forbidden

* Removing unused interceptor

* Adding warning if they're editing a role with application privileges we
can't edit

* Fixing filter...

* Beginning to only update privileges when they need to be

* More tests

* One more test...

* Restricting the rbac application name that can be chosen

* Removing DEFAULT_RESOURCE check

* Supporting 1024 characters for the role name

* Renaming some variables, fixing issue with role w/ no kibana privileges

* Throwing decorated general error when appropriate

* Fixing test description

* Dedent does nothing...

* Renaming some functions

* Adding built-in types and alphabetizing (#19306)

* Filtering out non-default resource Kibana privileges (#19321)

* Removing unused file

* Adding kibana_rbac_dashboard_only_user to dashboard only mode roles (#19511)

* Adding create default roles test (#19505)

* RBAC - SecurityAuditLogger (#19571)

* Manually porting over the AuditLogger for use within the security audit
logger

* HasPrivileges now returns the user from the request

* Has privileges returns username from privilegeCheck

* Adding first eventType to the security audit logger

* Adding authorization success message

* Logging arguments when authorization success

* Fixing test description

* Logging args during audit failures

* RBAC Integration Tests (#19647)

* Porting over the saved objects tests, a bunch are failing, I believe
because security is preventing the requests

* Running saved objects tests with rbac and xsrf disabled

* Adding users

* BulkGet now tests under 3 users

* Adding create tests

* Adding delete tests

* Adding find tests

* Adding get tests

* Adding bulkGet forbidden tests

* Adding not a kibana user tests

* Update tests

* Renaming the actions/privileges to be closer to the functions on the
saved object client itself

* Cleaning up tests and removing without index tests

I'm considering the without index tests to be out of scope for the RBAC
API testing, and we already have unit coverage for these and integration
coverage via the OSS Saved Objects API tests.

* Fixing misspelling

* Fixing "conflicts" after merging master

* Removing some white-space differences

* Deleting files that got left behind in a merge

* Adding the RBAC API Integration Tests

* SavedObjectClient.find filtering (#19708)

* Adding ability to specify filters when calling the repository

* Implementing find filtering

* Revert "Adding ability to specify filters when calling the repository"

This reverts commit 9da30a15db.

* Adding integration tests for find filtering

* Adding forbidden auth logging

* Adding asserts to make sure some audit log isn't used

* Adding more audit log specific tests

* Necessarly is not a work, unfortunately

* Fixing test

* More descriptive name than "result"

* Better unauthorized find message?

* Adding getTypes tests

* Trying to isolate cause of rbac test failures

* Adding .toLowerCase() to work around capitalization issue

* No longer exposing the auditLogger, we don't need it like that right now

* Removing some unused code

* Removing defaultSettings from test that doesn't utilize them

* Fixing misspelling

* Don't need an explicit login privilege when we have them all

* Removing unused code, fixing misspelling, adding comment

* Putting a file back

* No longer creating the roles on start-up (#19799)

* Removing kibana_rbac_dashboard_only_user from dashboard only role
defaults

* Fixing small issue with editing Kibana privileges

* [RBAC Phase 1] - Update application privileges when XPack license changes (#19839)

* Adding start to supporting basic license and switching to plat/gold

* Initialize application privilages on XPack license change

* restore mirror_status_and_initialize

* additional tests and peer review updates

* Introducing watchStatusAndLicenseToInitialize

* Adding some tests

* One more test

* Even better tests

* Removing unused mirrorStatusAndInitialize

* Throwing an error if the wrong status function is called

* RBAC Legacy Fallback (#19818)

* Basic implementation, rather sloppy

* Cleaning stuff up a bit

* Beginning to write tests, going to refactor how we build the privileges

* Making the buildPrivilegesMap no longer return application name as the
main key

* Using real privileges since we need to use them for the legacy fallback

* Adding more tests

* Fixing spelling

* Fixing test description

* Fixing comment description

* Adding similar line breaks in the has privilege calls

* No more settings

* No more rbac enabled setting, we just do RBAC

* Using describe to cleanup the test cases

* Logging deprecations when using the legacy fallback

* Cleaning up a bit...

* Using the privilegeMap for the legacy fallback tests

* Now with even less duplication

* Removing stray `rbacEnabled` from angularjs

* Fixing checkLicenses tests since we added RBAC

* [Flaky Test] - wait for page load to complete (#19895)

@kobelb this seems unrelated to our RBAC Phase 1 work, but I was able to consistently reproduce this on my machine.

* [Flaky Test] Fixes flaky role test (#19899)

Here's a fix for the latest flaky test @kobelb

* Now with even easier repository access

* Sample was including login/version privileges, which was occasionally (#19915)

causing issues that were really hard to replicate

* Dynamic types (#19925)

No more hard-coded types! This will make it so that plugins that register their own mappings just transparently work.

* start to address feedback

* Fix RBAC Phase 1 merge from master (#20226)

This updates RBAC Phase 1 to work against the latest master. Specifically:
1. Removes `xpack_main`'s `registerLicenseChangeCallback`, which we introduced in `security-app-privs`, in favor of `onLicenseInfoChange`, which was recently added to master
2. Updated `x-pack/plugins/security/server/lib/watch_status_and_license_to_initialize.js` to be compliant with rxjs v6

* Retrying initialize 20 times with a scaling backoff (#20297)

* Retrying initialize 20 times with a scaling backoff

* Logging error when we are registering the privileges

* Alternate legacy fallback (#20322)

* Beginning to use alternate callWithRequest fallback

* Only use legacy fallback when user has "some" privileges on index

* Logging useLegacyFallback when there's an authorization failure

* Adding tests, logging failure during find no types fallback

* Switching to using an enum instead of success/useLegacyFallback

* Using _execute to share some of the structure

* Moving comment to where it belongs

* No longer audit logging when we use the legacy fallback

* Setting the status to red on the first error then continually (#20343)

initializing

* Renaming get*Privilege to get*Action

* Adding "instance" to alert about other application privileges

* Revising some of the naming for the edit roles screen

* One more edit role variable renamed

* hasPrivileges is now checkPrivileges

* Revising check_license tests

* Adding 2 more privileges tests

* Moving the other _find method to be near his friend

* Spelling "returning" correctly, whoops

* Adding Privileges tests

* tests for Elasticsearch's privileges APIs

* Switching the hard-coded resource from 'default' to *

* Throw error before we  execute a POST privilege call that won't work

* Resolving issue when initially registering privileges

* Logging legacy fallback deprecation warning on login (#20493)

* Logging legacy fallback deprecation on login

* Consolidation the privileges/authorization folder

* Exposing rudimentary authorization service and fixing authenticate tests

* Moving authorization services configuration to initAuthorization

* Adding "actions" service exposed by the authorization

* Fixing misspelling

* Removing invalid and unused exports

* Adding note about only adding privileges

* Calling it initAuthorizationService

* Throwing explicit validation  error in actions.getSavedObjectAction

* Deep freezing authorization service

* Adding deepFreeze tests

* Checking privileges in one call and cleaning up tests

* Deriving application from Kibana index (#20614)

* Specifying the application on the "authorization service"

* Moving watchStatusAndLicenseToInitialize to be below initAuthorizationService

* Using short-hand propery assignment

* Validate ES has_privileges response before trusting it (#20682)

* validate elasticsearch has_privileges response before trusting it

* address feedback

* Removing unused setting

* Public Role APIs (#20732)

* Beginning to work on external role management APIs

* Refactoring GET tests and adding more permutations

* Adding test for excluding other resources

* Adding get role tests

* Splitting out the endpoints, or else it's gonna get overwhelming

* Splitting out the post and delete actions

* Beginning to work on POST and the tests

* Posting the updated role

* Adding update tests

* Modifying the UI to use the new public APIs

* Removing internal roles API

* Moving the rbac api integration setup tests to use the public role apis

* Testing field_security and query

* Adding create role tests

* We can't update the transient_metadata...

* Removing debugger

* Update and delete tests

* Returning a 204 when POSTing a Role.

* Switching POST to PUT and roles to role

* We don't need the rbacApplication client-side anymore

* Adding delete route tests

* Using not found instead of not acceptable, as that's more likely

* Only allowing us to PUT known Kibana privileges

* Removing transient_metadata

* Removing one letter variable names

* Using PUT instead of POST when saving roles

* Fixing broken tests

* Adding setting to allow the user to turn off the legacy fallback (#20766)

* Pulling the version from the kibana server

* Deleting unused file

* Add API integration tests for roles with index and app privileges (#21033)

* Rbac phase1 functional UI tests (#20949)

* rbac functional tests

*  changes to the test file

* RBAC_functional test

*  incorporating review feedback

* slight modification to the addPriv() to cover all tests

* removed the @ in secure roles and perm file in the describe block  and made it look more relevant

* Fixing role management API from users

* Set a timeout when we try/catch a find, so it doesn't pause a long time

* Changing the way we detect if a user is reserved for the ftr

* Skipping flaky test
2018-07-24 19:53:54 -04:00
Nathan Reese 1aab00b3b5
highlight sample data section for new users (#20953) (#21174)
* highlight sample data section for new users

* do not set state on unmounted component

* do not block render of home component

* add jest tests for isNewKibanaInstance

* remove unneeded async from home jest test
2018-07-24 16:50:59 -06:00
Tim Sullivan dc09750087
Stats API: do not convert arrays to objects (#21053) (#21114)
* Stats API: do not convert arrays to objects

* handle nested arrays in toApiFieldNames

* add early return
2018-07-24 14:24:24 -07:00
Tim Sullivan 2de9d268c6
Remove xpack usage module (#21099) (#21158) 2018-07-24 14:24:12 -07:00
James Gowdy 91d536a296
[ML] Disabling results buttons on row select (#21144) (#21168) 2018-07-24 21:56:06 +01:00
Felix Stürmer 530b9adedf
Extend Chrome TypeScript type (#21076) (#21172) 2018-07-24 22:53:39 +02:00
Lisa Cawley 44aa34e4f4 [DOCS] Adds more 6.3.2 PRs to release notes (#21167) 2018-07-24 13:50:15 -07:00
Søren Louv-Jansen dfdc3b9774
[APM] Remove ML docs link (#21137) (#21161) 2018-07-24 22:31:12 +02:00
Søren Louv-Jansen e0546dbda3
Remove old dashboard instructions (#21147) (#21159) 2018-07-24 22:30:54 +02:00
Chris Earle 20c97e56cb [Monitoring] Ignore Duplicate Shards (#21057)
[Monitoring] Ignore Duplicate Shards

This eliminates duplicate shards from the shard table by actively ignoring
them from the response.
2018-07-24 16:10:05 -04:00
Lukas Olson 3bbb9c5b20 Extract KQL autocomplete to a plugin (#20747)
* fix: move autocomplete to x-pack basic

* fix: apm support

* fix: renames

* [uiExports] switch to new autocompleteProviders export type

* fix: remove unnecessary stuff from the plugin spec
2018-07-24 12:34:08 -07:00
debadair 2c9b3de71a [DOCS] Removed coming in 6.3.2. 2018-07-24 12:15:57 -07:00
Tim Sullivan d6e6f6ff96
[6.x] Monitoring Angular directives to use React components (#19183) (#21011)
* Monitoring Angular directives to use React components (#19183)

* remove some webpack aliases for jest

* remove status icon angular directive

* fix some component import problems

* prop name fix
2018-07-24 12:13:18 -07:00
Brandon Kobel ed354d6682
Modifying the displayed URL when we can't connect to Elasticsearch (#21133) (#21160)
The test has been modified to no longer rely upon @kbn/test as it was
providing very little benefit, and introduced some variability in
ensuring we were displaying the proper URL.
2018-07-24 15:11:24 -04:00
Bill McConaghy df431c1287
fixing flaky management settings test (#21123) (#21155)
* fixing flaky management settings test

* fix for the fix (awaiting results of find)
2018-07-24 14:13:20 -04:00
liza-mae 67addab4eb
Shell script to run kibana tests on cloud via Jenkins (#21107) (#21120)
* Shell script to run kibana tests on cloud via Jenkins

* Add comment explaining cloud setup
2018-07-24 11:51:47 -06:00
Søren Louv-Jansen 942d2b28df
[APM] sync stored_objects with files from APM Server. (#21096) (#21153)
* [APM] sync stored_objects with files from APM Server.

Sync dashboards and index-pattern with files created and used by
server, to ensure consistency no matter how the files are loaded.

* Remove title from index pattern.

* fix failing test.
2018-07-24 19:25:26 +02:00
James Gowdy d62e6b0ea3
[ML] Renaming jobs list directory (#21130) (#21152)
* [ML] Renaming jobs list new to jobs list

* moving missing files
2018-07-24 18:16:09 +01:00
Chris Roberson d31e9978f7
[Monitoring] Remove kibana_stats.requests.status_codes from bulk uploader (#20855) (#21149)
* Remove `status_codes` from bulk uploader

* Remove more references to `status_codes`
2018-07-24 12:53:43 -04:00
Nathan Reese 2170ab08de add autoRefreshFetch event to timefilter (#20863) (#21148)
* add autoRefreshFetch event to timefilter

* replace fetchAndRender with reloadVis remove listener from editor

* unsubscribe correct handler
2018-07-24 18:23:01 +02:00
Pete Harverson 59b8c8ea2c
[ML] Adds icon to the Anomalies Table if detector has rules (#21135) (#21142)
* [ML] Adds icon to the Anomalies Table if detector has rules

* [ML] Edit to tooltip message on anomalies table detetor rule icon
2018-07-24 16:32:47 +01:00
James Gowdy 340178a77f
[ML] Create watch from new jobs list (#21112) (#21132)
* [ML] [WIP] Create watch from new jobs list

* removing comments

* adding interval calculation

* adding checkbox to start datafeed modal

* adding proptypes check to SelectSeverity

* fixing typo

* changes based on review

* correcting input labels
2018-07-24 14:56:13 +01:00
James Gowdy fc5dac69eb
[ML] Adding rules and filters permission checks (#21097) (#21129)
* [ML] Adding rules and filters permission checks

* fixing disabled link check
2018-07-24 14:36:44 +01:00
Brandon Kobel 1e298d538b
Skip the Server logging configuration integration tests, they're flaky (#21141) (#21143) 2018-07-24 09:33:34 -04:00
James Gowdy 5452c30cb8
[ML] Adding missing default privilege values (#21131) (#21136) 2018-07-24 14:32:48 +01:00
Søren Louv-Jansen 082ed457fb
[APM] Add apm_core plugin and query errors, spans, transactions from separate indices (#21022) (#21108)
* [APM] Change index pattern

* WIP: change how indicies are queried in APM

* Create apm_core plugin

* Update config keys from `xpack.apm` to `apm_core`

* Revert tutorial formatting changes

* Rename to apm_oss
2018-07-24 12:57:57 +02:00
Pete Harverson c23d72b9d6
[ML] Converts the custom URL editor to EUI / React (#21094) (#21127) 2018-07-24 11:43:27 +01:00
Walter Rafelsberger 18a73f9f41
[6.x] [ML] Job validation uses fieldCaps to check aggregatable fields to avoid triggering Elasticsearch errors. (#21087) (#21104)
While the output in the UI was fine, certain job configurations containing non-aggregatable fields could trigger errors on the Elasticsearch side.
This PR fixes it by adding an additional query for fieldCaps to check first which fields are actually aggregatable.
2018-07-24 10:41:15 +02:00
Walter Rafelsberger e20495786c
[ML] More helpful job validation success messages. (#21079) (#21110)
This provides more helpful texts for job validation success messages. Previously only a list of checks was shown to the user without any further explanation. This PR addresses this issue in the following way:
- At the bottom of the modal an introductory brief text about job validation including a link to documentation is inserted.
- The success messages in the list now provide a more helpful text including (where applicable) a deep link to documentation
- The messages now support a richer Callout layout including a header and additional text.
2018-07-24 09:23:27 +02:00
dave.snider@gmail.com bb7b22f674
Upgrade xpack to eui@3.0.0 (#20930) (#21064)
* upgrade to eui@3.0.1
2018-07-23 19:08:52 -07:00
Tim Sullivan cb39132115
[Test/Cleanup] Remove console.log (#21002) (#21007) 2018-07-23 14:29:21 -07:00
archana 725782ebb7 Deprecate test:ui commands (#21092)
* Deprecate test:ui commands
2018-07-23 14:49:21 -05:00
gchaps 0a61ab778e [DOCS] GS: Added note about hosted Kibana (#21037) 2018-07-23 12:46:19 -07:00
Søren Louv-Jansen 6013c7641d
Bump backport to 4.2.0 (#21083) (#21088) 2018-07-23 20:05:53 +02:00
Bill McConaghy a4ed92a409
fixing accessibility issue with include system indices checkbox in index creation wizard (#21034) (#21090)
* fixing accessibility issue with include system indices checkbox in index creation wizard

* updating snapshots
2018-07-23 13:34:51 -04:00
Tim Roes 78951efa05
TypeScriptify visualization components (#20940) (#21086)
* Refactor vis components to TypeScript

* Fix issue with ResizeChecker

* Fix calling onInit for no data

* Explicit named export

* Add title to vistype

* Fix error in test file

* Move onInit to no VisualizationNoResults

* Make listenOnChange changeable

* Add memoize util

* Use memoize for no results check

* Address issue with uiState

* Optimize memoize function
2018-07-23 18:44:56 +02:00
Walter Rafelsberger 9170bc667b
[ML] Job validation no longer reports an error when categorization job is properly setup. (#21075) (#21082)
For categorization jobs, job validation would report that mlcategory isn't an aggregatable field. This fix checks the job configuration and only reports the error if the job config isn't using categorization_field_name and the detector field isn't set to mlcategory.
2018-07-23 16:53:14 +02:00
Søren Louv-Jansen 8d30e2d381
[APM] Performance marks for RUM agent (#20931) (#21081)
* [APM] Performance marks for agent

* Fixed formatting and design

* Update snapshot

* Fixed tooltip id
2018-07-23 16:28:58 +02:00
James Gowdy 2970bb1e34
[ML] Adding validation to the edit job flyout (#21041) (#21078)
* [ML] Adding validation to the edit job flyout

* removing a bit of lodash

* tiny code clean up

* fixing validation check
2018-07-23 14:11:22 +01:00
Nathan Reese 286843ac64
avoid day long gaps in sample data (#20897) (#21070)
* avoid day long gaps in sample data

* avoid using toISOString to avoid an timezone problems

* unskip sample test now that problem is fixed

* use much better cj algorithm for translating time

* cjcenizal review updates

* update funtion name in install.js

* push source reference date back a week
2018-07-23 06:20:01 -06:00
Walter Rafelsberger 0a253604f5
[ML] Migrates ml-form-label to EUI/React. (#21059) (#21074)
- Migrates the ml-form-label directive to use EUI/React.
- Exposes both FormLabel and JsonTooltip as React components from individual files so they can be used in a React context when the wrapping element also has been already ported to React.
- Adds jests based tests for the FormLabel and JsonTooltip components. They try where possible to make the same assertions like the mocha based tests. The mocha based tests are kept in the code for now so the code gets still tested in a angular based context and as a reference to have the same mocha/jest based tests side by side as a reference for migration.
- The FormLabel component is done in a way so it supports transclusion in both cases when used with React alone (using the children prop) and angularjs (using a ref callback and angular's transclude()).
2018-07-23 13:12:29 +02:00
Pete Harverson 5561cfe340
[ML] Adds editor for configuring detector rules (#20989) (#21067)
* [ML] Adds editor for configuring detector rules

* [ML] Edits to Rule Editor flyout following review
2018-07-22 15:49:18 +01:00
James Gowdy d5a8277f29
[ML] Adding filters privileges (#21021) (#21063) 2018-07-22 14:52:50 +01:00
gchaps ee8574de23 [DOCS] Release Notes for 6.3.2 (#21012)
* [DOCS] Release Notes for 6.3.2

* [DOCS] Clarified bbox in Release Notes

* [DOCS] Created section for Important Notes]
2018-07-20 17:25:26 -07:00