Commit graph

76 commits

Author SHA1 Message Date
Larry Gregory 632c63ab21
[6.x] Spaces Phase 1 (#21408) (#23639)
Backports the following commits to 6.x:
 - Spaces Phase 1  (#21408)
2018-10-01 09:53:43 -04:00
Justin Kambic 87f67eaa1a [Logstash Management] Euify pipeline (#22902)
* Begin replacing pipeline editor KUI elements.

* WIP build out EUI rendering of Create Pipeline view.

* Add settings components.

* Add close functionality.

* Add save functionality.

* Add temporary dependency hack for testing purposes until EUI XY Chart replaces jquery-flot.

* Add delete pipeline button/capability.

* Add delete modal.

* Remove TODO comment.

* Added toasts.

* Switch to global toast system.

* Add toast for inactive license and readonly state.

* Remove pipeline edit template.

* Add notify on PUT and DELETE errors.

* Add null check for username prop of securityService return value.

* Add disable save button if invalid ID.

* Remove pipeline id field when editing existing pipeline.

* Remove obsolete code.

* Move PipelineEditor component to dedicated file.

* Add EUI table to pipeline list view.

* Add search to pipelines table.

* Add create/delete pipelines buttons.

* Add pagination stubs. Complete after EUI bug resolved.

* Added unselectable for non-centrally-managed pipelines.

* Add clone button to pipelines list.

* Add min page height. Fix bug with edit pipeline link.

* Remove obsolete pipeline list code.

* Remove obsolete tooltip, edit, list code.

* Disable create pipeline if id is empty.

* Move PipelineList component to dedicated file.

* Add empty state to pipeline list. Add selection messages.

* Update loading message.

* Move methods to more logical positions in component.

* Add info alerts to pipeline list.

* Remove obsolete angular template.

* Remove obsolete imports from pipeline list directive.

* Define UpgradeFailure component.

* Move UpgradeFailure subcomponents to dedicated files. Write tests.

* Move PipelineEditor subcomponents to dedicated files.

* Write tests for pipeline editor subcomponents.

* Move bare strings into constants.

* Move PipelineEditor constant values into constants file.

* Break subcomponents of InfoAlerts component into dedicated files.

* Remove obsolete constants.

* WIP - write tests for PipelineList, break table into separate component, add error empty prompt message.

* Move ConfirmDeleteModal component to dedicated file and test.

* Add TODO comment.

* Add test tags to react components.

* Add 'data-test-subj' prop to fields for func tests. Minor layout update. Run prettier on some files.

* Add data-test-subj prop to button. Disable two tests until pagination is re-added.

* Re-enabled pagination for pipeline list.

* Remove wallaby hack.

* Update pagination options, remove obsolete code.

* Fix bug introduced in refactor to display delete button at appropriate time.

* Handle max_bytes setting correctly. Add theme/mode to code editor.

* Update snapshot for new pagination.

* Remove angular template for UpgradeFailure view.

* Move bare text from Modal functional component to constant file. Update test + snapshot.

* Ran prettier on all changed documents.

* Remove obsolete TODO comments.

* Re-enable disabled functional test. Clean up TODO code.

* Fix unresolved promise in functional tests.

* Pipeline delete button hidden unless enabled, move to left.

* Make filter title more readable.

* Apply width to clone column on Pipeline List.

* Modify pipeline edit view to use 's'-size icons.

* Change pipeline editor delete button to empty button.

* Move pipeline edit actions to bottom left of form.

* Add propTypes for PipelineEditor.

* Update test snapshots.

* Update pipeline list delete button func test.

* Add pipeline edit test. Add heading to pipeline edit page.

* Move constant files to modules where they are consumed.

* Move UPGRADE_FAILURE constants into module that consumes them.

* Remove redundant tests and remove text constant imports from tests.

* Give initial values to id and description text fields to make them controlled components.

* Clean up pipeline ID form regex validation and add tests.
2018-09-27 17:12:02 -04:00
Chris Roberson c51ec363a3
[Monitoring] APM Monitoring UI (#22975) (#23444)
* Merge in boilerplate branch

* Manually copy over the specific metrics and UIs

* Add api integration tests

* Fix tests

* Remove unused metrics

* Update snapshot

* Fix tests

* Remove types agg

* Use ApmClusterMetric

* provide description for apm-server monitoring metrics (#23331)

* Vis LESS to SASS (cont.) (#23199)

* Tweak migrations integraiton tests to have a stable sort (#23265)

* Fix: plugin api route with security enabled (#23334)

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

This is more of a quick fix than the final solution. The issue was that Canvas tries to check the plugins API without checking to see if the user it logged in. As a result, instead of the plugins response, it gets the HTML from the login page and that causes an error to be thrown when attempting to parse the results.

For now, this PR just disables the auth requirement on the Canvas plugin API endpoint.

* [migrations/tests] sort results before assertion (#23347)

There have been several failures in this test, seemingly caused by a lack of sorting in the results. It makes sense that since both migrations are run simultaneously that sometimes one would succeed and sometimes another would, so I've just sorted the results before checking.

![image](https://user-images.githubusercontent.com/1329312/45791153-44e9cc80-bc3d-11e8-88c4-760d4c7b35bd.png)

cc: @chrisdavies

* [ML] Moves custom URL editor Add button and form to top of flyout (#23326)

* [ML] Moves custom URL editor Add button and form to top of flyout

* [ML] Edits to custom URL editor class name

* Graph LESS to SASS (#23348)

* Developer documentation for integrating with the telemetry service (#23295)

* Developer documentation for integrating with the telemetry service

* open with a bang

* more faqs

* thing about tracking ui interactions

* talk to the plat team

* create and register

* Fix a bug where ES sends a string and migrations expect a boolean (#23313)

* chore: use cheerio in i18n.html.getDirectiveMessages (#23342)

this was only using jsdom to parse html, but cheerio allows parsing html without requiring a dom. cheerio was also already in the dependency list.

* [core/utils] add shareWeakReplay() operator (#23333)

* Chore: fix canvas test runner (#23336)

Blocked by https://github.com/elastic/kibana/pull/23342

This fixes the local test runner in Canvas. It should not affect anything else, including the CI test runner.

- Bumps JSDOM to ^12.0.0
  - I matched Kibana's version on migration, but nothing else in X-Pack uses JSDOM, so we can use the newer version (which has a very different API)
  - I had to match it because of a script that enforces version matching, but #23342 removed jsdom from Kibana, so we no longer have a version to match
- Restores the local `.babelrc` file
  - I thought it was only used for building plugins; I was wrong 😢

* Convert Discover open top nav to EUI flyout (#22971)

* move find logic to SavedObjectFinder component since savedObjectClient is no longer coupled to angular

* implement flyout open saved searches

* remove old open stuff

* add jest test for OpenSearchPanel and simplify panel title

* fix functional tests

* fix _lab_mode functional test

* Migrate save top nav in Discover and Visualize to EUI (#23190)

* extract reusable save component from DashboardSaveModal

* update discover search to use SavedObjectSaveModal

* create generic show_save_model that works for both discover and dashboard

* fix last bits of discover save

* remove old save functionallity

* migrate visualize save to EUI

* fix functional tests

* disable save button if title is empty

* mark title input as invalid when title is not provided

* fix funtional tests

* Moves styleSheetPath to uiExports (#23007)

This was previously defined in uiExports.app, which limited plugins which are not an app of providing a stylesheet. This allows any plugin to define a stylesheet which will be available on page load.

* Timelion less to sass (#23339)

* Consistent casing

* Fix snapshot

* Update tests
2018-09-24 14:44:33 -04:00
Caroline Horn 2971d7635e
[6.x] Graph LESS to SASS (#23348) #23363 2018-09-20 14:46:52 -04:00
Larry Gregory afd9e6602e
[6.x] Remove ability to implicitly find across all types (#23198) (#23312)
Backports the following commits to 6.x:
 - Remove ability to implicitly find across all types  (#23198)
2018-09-19 09:03:59 -04:00
Chris Davies c67791803f
[6.x] Add saved object index migrations (#20243) (#23262) 2018-09-18 09:46:58 -04:00
Joe Fleming 1346d1aeda
[6.x] Chore: canvas in xpack 6x (#22695) (#23201)
* chore: merge canavs into x-pack

squashed, since 6.x history isn't important and i want to be able to rebase...

* chore: eslint fixes in canvas

adds license headers and includes project linting overrides

* Chore: Reorg the x-pack gulp tasks (#22785)

- Removes deprecated, non-functional lint scripts
- Removes some unused (and barely used) dependencies
- Replaces deprecated `gulp-util` dependency
- Adds eslint rule to prevent future use of deprecated `gulp-util` dependency
- Moves all gulp tasks into `tasks` path
- Moves `gulp_helpers` into `tasks/helpers`
- All tasks in `gulpfile.js` were moved into `tasks` and broken up by domain

This is basically a no-op moving files around PR. All the existing tasks appear to work the same with these changes.

<img width="334" alt="screenshot 2018-09-06 15 42 45" src="https://user-images.githubusercontent.com/404731/45188971-8618c000-b1eb-11e8-9b26-b072ccc7ddb7.png">

* chore: rename files to match rules

* chore: copy canvas dependencies

* chore: reduce package.json to essentials

* chore: make canvas work in xpack

* chore: make browser tests work

* chore: fix include paths

node_modules is in a different relative path

* chore: fix ml tests with canvas code in x-pack

explicitely enable state management so the mlStateFactory tests pass

* chore: fix RBAC tests with canvas

* chore: split up the xpack prepare scripts

* chore: canvas tasks - dev, peg, and plugins

get dev, peg, and plugin building tasks working

* chore: canvas tasks - local tests

* chore: additional file cleanup

* chore: yarn lockfiles and eslint fixes

license headers and some small formatting stuff
2018-09-14 16:26:56 -07:00
Caroline Horn acd01a4881
Resolve conflicts (#23197) 2018-09-14 15:28:25 -04:00
Nathan Reese eadf7e847b
backport (#22949) 2018-09-11 17:07:48 -06:00
Lee Drengenberg 4b26d3fe3b
Fix rbac test (#22912) (#22933)
* conditionalize Monitoring tests for Cloud testing

* make security_page/login wait

* revert these files from another PR

* revert these files from another PR
2018-09-11 15:15:04 -05:00
Larry Gregory 8da5719582
[6.x] attempt to fix flaky tests (#22852) (#22888)
Backports the following commits to 6.x:
 - attempt to fix flaky tests  (#22852)
2018-09-10 14:33:52 -04:00
Larry Gregory aa1c265c1c
[6.x] Manage telemetry opt-in via a dedicated document (#22268) (#22877)
Backports the following commits to 6.x:
 - Manage telemetry opt-in via a dedicated document  (#22268)
2018-09-10 09:31:09 -04:00
Lee Drengenberg b2441c02fb
x-pack tests should use servers from other config files already loaded (#22739) (#22762)
* x-pack tests should use servers from other config files already loaded

* Fix es_test_config that was using TEST_KIBANA_USERNAME/PASSWORD
2018-09-06 11:32:12 -05:00
Marco Vettorello 6b504ed8af
Fix possible flakiness of saveVisualization action (#22356) (#22546)
* Updated saveVisualization to wait for toast instead of global indicator

* Fix RBAC tests.

The saveVisualization now fails directly if the visualization is not correctly saved.

* Change editor to use toast for errors

* Change saveVisualization method to new saveVisualizationExpectSuccess

For RBAC tests used also saveVisualizationExpectFail

* Fix wrong exists method call

* Fix missing exist function
2018-09-03 14:14:31 +02:00
Chris Davies 18ca9014e4
Merge puppeteer into 6.x (#22533) 2018-08-30 11:48:10 -04:00
Nathan Reese 27dd8c2919
Eui sharing top nav (#21997) (#22468)
* just getting the popover to open and start laying out the context menu

* pass getUnhashableStates to ShareMenu

* generate original and snapshot ids

* move state into ShareUrlContent

* start working on form

* use radio group

* add input for creating short URL

* display URL in alert until copy functionallity gets migrated to EUI

* allowEmbed prop

* replace share directive with showShareContextMenu

* fix button styling

* add jest test for share_context_menu

* use EuiCopy to copy URL, add jest test for ShareUrlContent component

* clean up

* display short URL create error message in form instead of with toast

* switch option order so disbaled option can not be first

* fix discover share functional tests

* add functions required by reporting

* typescript

* remove empty file

* fix typescript compile error

* move import so jest tests work

* fix Failed prop type: The proptextToCopyis marked as required inEuiCopy, but its value isundefined

* move shortUrl out of react state and into Component object

* getUnhashableStates type from any[] to object[]

* add comment about type change once EUI issue is solved

* add functional test for saved object URL sharing

* remove commit
2018-08-28 14:52:16 -06:00
Chris Roberson 4fe840e823
[Monitoring] Ensure the settings api always return the xpack/default_admin_email (#22220) (#22289)
* If the settings collector returns nothing, ensure the settings api still returns a null value for default_admin_email

* Update test

* Feedback from PR
2018-08-23 12:39:10 -04:00
Spencer 138f45698c
[accessibility] implement no-animation mode, auto enable for functional tests (#21629) (#22203) 2018-08-22 14:53:58 -07:00
Chris Davies 8b1ecbb804
Add a welcome screen for new Kibana instances (#21353) (#22164)
Add a welcome screen to Kibana home if this is a new Kibana instance.
New is determined by whether or not there are any index patterns
defined. Local storage is used to retain the user's decision to hide
the welcome screen.
2018-08-17 18:32:56 -04:00
Aleh Zasypkin 8e696b7369
[6.x] [Tests] Add http integration test setup (#22114)
* [Tests] Add http integration test setup

* Base path tests

* SSL tests

* Eslint fixes

* Remove env from config schema

* Rename folders so no_rewrite and rewrite match configs/tests

* wip

* Use self-signed cert for SSL test

* Improve basepath tests

* Run base path proxy server in dev mode for now

* Remove env from x-pack reporting config

* Remove redundant base-path tests

* Test SSL with redirectHttpFromPort set

* Test SSL with redirectHttpFromPort set

* Flesh out comments

* Remove some cruft

* Add SSL tests to CI run
2018-08-17 10:42:38 +02:00
Tyler Smalley aa9ef52c6d Skip flaky Grok syntax highlighting test (#22067)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-08-16 07:41:29 -07:00
dave.snider@gmail.com bd7c9f2423
[6.x] Convert all Less files to Sass in monitoring, use EUI variable scope (#20995) (#21939)
* Convert all Less files to Sass in monitoring, use EUI variable scope (#20995)
2018-08-13 18:15:37 -07:00
Chris Roberson cf03af7380
[Monitoring] Kibana settings api (#21100) (#21742)
* Kibana settings api

* Use different version of this utility

* Adding settings api test

* Fix these tests

* Update test
2018-08-07 14:49:26 -04:00
Stacey Gammon a5a313e747
Turn reporting snapshot tests back on with new baselines (#21441) (#21696)
* Turn reporting snapshot tests back on with new baselines

* Use snapshots generated from chromium.  Bump the threshold so phantom comparisons pass

* Increase timeouts because of chromium functional tests.

* remove accidentally checked in session snapshots

* add a better vis baseline, run once through at 0 to check expected threshold

* turn on verbose logs

* Use threshold, turn debug mode on in jenkins

* Wrap both convert pages in the retry

* Update baselines

Preserve layout one got messed up - it was actually a print layout.

* bump threshold even more
2018-08-06 14:53:59 -04:00
Chris Roberson c3026cbff7
[Monitoring] Support legacy use cases for passthrough (#21211) (#21487)
* Support legacy use cases for passthrough

* Support generic case too

* Add legacy flag

* Do not format api field names in legacy mode

* Add basic test for legacy parameter

* Add more tests
2018-08-02 17:36:18 -04:00
Bill McConaghy 7ea5f4a453
accounting for angular delay in disabling input to fix test (#21530) (#21585) 2018-08-02 09:36:08 -04:00
CJ Cenizal 320c81c6f3
Disable flaky Shard Allocation Per Index test. (#21577) (#21579) 2018-08-01 17:35:30 -07:00
Tim Sullivan 5657e9ff76
[Test] Add Reporting in test on kibana_stats telemetry (#21118) (#21254) 2018-08-01 16:56:06 -07:00
Larry Gregory 47ad4545a8 [Flaky Test] - Role Management Screen (#19988)
Fixes a flaky test by waiting for Kibana to finish all pending requests before continuing
2018-08-01 12:13:23 -04:00
Aleh Zasypkin 45d754e4b0
[6.x] Make /api/security/v1/login to return 204 status code if no payload is provided. (#21406) 2018-07-30 17:12:33 +02:00
Stacey Gammon 77f8cc3b6e
Retry the entire screenshotStitcher call (#20770) (#21377)
* Retry the entire screenshotStitcher call

* Go back to a single run

* Only retry for this specific error.  Post more information including the git issue link
2018-07-28 10:41:13 -04:00
Rashmi Kulkarni 8bdbd1f27d
rbac functional ui test (#21188) (#21283) 2018-07-26 10:47:23 -07:00
Nathan Reese a0d80131bd
decouple x-pack security tests from dashboard_mode tests (#21043) (#21228) 2018-07-25 12:42:05 -06:00
Chris Roberson 1e3d510376
[Monitoring] Use 0 as the default for shard count if the node is not found (#21000) (#21165)
* Use 0 as the default for shard count if the node is not found

* Remove debug

* Updating snapshot tests

* Update api integration test
2018-07-25 13:18:57 -04:00
Stacey Gammon 0034ad95f5
bump reporting timeout (#20833) (#21173) 2018-07-25 09:15:42 -04: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
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
Tim Sullivan cb39132115
[Test/Cleanup] Remove console.log (#21002) (#21007) 2018-07-23 14:29:21 -07:00
CJ Cenizal b003d29751
Convert notify.warning calls to use toastNotifications (#20767) (#21054)
* Replace notify.warning with toastNotifications in region map, vega, index_pattern, redirect_when_missing, graph, monitoring, and ML
* Link to index patterns from Graph toast.
* Delete RouteBasedNotifier.
* Remove courierNotifier and SearchTimeout and ShardFailure errors.
* Remove warning and custom notifier types.
2018-07-20 16:44:22 -07:00
Bill McConaghy 6c5d885c38
Reactify users roles (#20739) (#21028)
* partial progress on reactifying users

* progress on EUIfication of users screen

* removing Angular stuff

* adding data-test-subj="passwordConfirmationInput"

* removing data-test-subj="userFormEmailInput" refs from tests

* fixing selector for role assignment

* some functional test fixes

* fixing some functional tests

* fixing last functional test

* removing stray console log

* fixing warnings

* attempting to fix flaky test

* trying again to fix flaky test

* PR feedback

* PR feedback

* fixing issue where form tried to submit

* adding sleep to allow user to load

* Design edits

Mainly adding wrapper EUI page elements, but also shifted around form elements.

* Fixed console error and added responsive prop to table

* addressing PR feedback

* A few more PR feedback

- Fixed alignment of table
- Removed the tooltip from the lock icon and placed the description inline.
- Changed delete button to an empty button

* addressing more PR feedback

* adding email field back in

* adding back username validation

* restoring original error message

* fixing dumb null error
2018-07-20 10:15:32 -04:00
Tim Sullivan 9a6e665f2d
Remove /api/_xpack/usage and /api/_kibana/v1/stats (#20800) (#21008)
/api/_xpack/usage was added as a target for 6.4.0 but it will not be
used. Instead, the /api/stats response will include usage info on
everything that gets registered with the usage service in
/src/server/usage

/api/_kibana/v1/stats is a GET API that was added in 6.2, during a point
where we thought providing usage stats through a public API would be OK
for capturing internally, with the benefit of having it be visible.

However, we've pivoted away from that idea because it doesn't line up
too well with the existing flow of data, where usage stats are combined
with the "Kibana stats" such as process uptime and number of requests.
We want to shift how we collect stats from Kibana, but it will be
gradual. It might be a while before we have an architecture that makes
sense for a standalone public API for the usage stats

This endpoint was never documented, and isn't used anywhere in the code.
It does incur a maintenance cost though.

Therefore, instead of waiting for a next major version to remove this
API, I'm removing it for 6.4. It will be marked in the release notes as
a breaking change. Since it was never documented, it should not provide
a problem.
2018-07-19 17:45:51 -07:00
Tim Sullivan 8fc67c064a
Stats API: implement the "kibana status" spec from the Monitoring data model for stats (#20577) (#20956)
* [Stats API] Set API field names per spec

* fix jest tests

* fix api integration test

* trash the original metrics collector

- constantly accumulating stats over time does not align with the existing behavior, which is to reset the stats to 0 whenever they are pulled

* move some logic out of the collector types combiner into inline

- change the signature of sourceKibana

* Make a new stats collector for the API

- to not clear the data when pulling via the api
- fetching is a read-only thing

* isolate data transforms for api data and upload data

* no static methods

* remove external in bytes

* remove the _stats prefix for kibana and reporting

* update jest test snapshot

* fix collector_types_combiner test

* fix usage api

* add test suite todo comment

* reduce some loc change

* roll back mysterious change

* reduce some more loc change

* comment correction

* reduce more loc change

* whitespace

* comment question

* fix cluster_uuid

* fix stats integration test

* fix bulk uploader test, combineTypes is no longer external

* very important comments about the current nature of stats represented and long-term goals

* add stats api tests with/without authentication

* fix more fields to match data model

* fix more tests

* fix jest test

* remove TODO

* remove sockets

* use snake_case for api field names

* restore accidental removal + copy/paste error

* sourceKibana -> getKibanaInfoForStats

* skip usage test on legacy endpoint

* fix api tests

* more comment

* stop putting a field in that used to be omitted

* fix the internal type to ID the usage data for bulk uploader

* correct the kibana usage type value, which is shown as-is in the API

* more fixes for the constants identifying collector types + test against duplicates

* add a comment on a hack, and a whitespace fix
2018-07-19 12:03:57 -07:00
Stacey Gammon a28ba56340
Turn reporting tests back on (#20634) (#20731)
* unskip reporting tests

* Focus only on flaky test suite and run 10x

* Revert "Focus only on flaky test suite and run 10x"

This reverts commit a6616b1140c29d8d3f13666d20ae94db9a97267f.
2018-07-12 15:35:59 -04:00
archana 3c14ed0918 [Tests] Run es from snapshot locally in xpack (#20585) 2018-07-10 05:29:09 -05:00
Nathan Reese 47fa8abeac
disable flaky reporting tests (#20441) (#20444) 2018-07-03 19:08:55 -06:00
Tim Sullivan de2b2177d8
fix monitoring elasticsearch nodes listing sort and filtering (#20321) (#20382)
closes https://github.com/elastic/kibana/issues/20132
2018-07-02 12:29:45 -07:00
CJ Cenizal c6be289f21
Fix misspellings (#19981) (#20284) 2018-06-27 20:50:06 -07:00
Shaunak Kashyap 30c8ccd41c EUIFication: Grok Debugger (#20027)
* Move <kbn-dev-tools-app> Angular wrapper directive usage into route template

* Move sole directive into new directives folder

* WIP checkin: basic conversion to React components

* Fix sample custom patterns indentation

* Remove custom CSS

* Wrap button in EuiFormRow + define isSimulateDisabled

* Wire up simulate

* Cleanup

* Ace formatting options

* Better styling

* Adding spacing between custom patterns and simulate button

* Fixing form row widths

* Removing form row around button

* Add indentation/newlines in structured output

* Error handling

* Use constants

* Removing no-longer-used code

* Implement syntax highlighting via custom mode

* Making functional tests pass

* Adding trailing comma back

* Removing fixed heights

* Removing unnecessary styles

* Make Event Output form row full width as well

* Wrapping EuiCodeEditors in EuiPanels

* Adding spacer before callout; making spacing around callout consistent

* Clear out custom patterns from request if field is cleared out

* Clear out simulation results before attempting simulation

* Set state with untrimmed value
2018-06-22 11:54:13 -07:00
CJ Cenizal 85cf559033
Replace Watcher's watch-type-select directive with two buttons. (#19782) (#19884) 2018-06-14 08:06:48 -07:00
Tim Sullivan 77608f79b3
[Monitoring] Fix Node Advanced page (#19740) (#19749)
* [Monitoring] Fix Node Advanced page

* fix metrics snapshot
2018-06-07 18:22:13 -07:00