Commit Graph

1521 Commits

Author SHA1 Message Date
Ali Beyad 5aae30f722 [TEST] fixes known handler test
Original commit: elastic/x-pack-elasticsearch@98a8f23d23
2017-01-18 16:42:08 -05:00
Ali Beyad 159bf63cd4 [TEST] fix security's request handler tests to check in the
knownHandlers set, not the knownActions

Original commit: elastic/x-pack-elasticsearch@63f3744853
2017-01-18 12:19:42 -05:00
Simon Willnauer 5b5c77f573 Follow up for elastic/elasticsearchelastic/elasticsearch#22677 (elastic/elasticsearch#4670)
This commit picks up some improvments from elastic/elasticsearch#22677 that streamlines correct restore of stored contexts.

Original commit: elastic/x-pack-elasticsearch@0259de50c8
2017-01-18 16:18:10 +01:00
Simon Willnauer 533b525b13 Add cross cluster search proxy actions
Original commit: elastic/x-pack-elasticsearch@13f78dffe4
2017-01-18 10:25:40 +01:00
Tim Brooks 17492777a9 Wrap ServerSocket usage in doPrivileged blocks (elastic/elasticsearch#4631)
This is related to elastic/elasticsearch#22116. In the tests there are multiple usages of
server implementations that `accept()` socket connections. To avoid
throwing `SecurityException` when using the `SecurityManager` these
operations must be privileged. Additionally, x-pack:elasticsearch
requires `accept` permission. This was added in the plugin-security
policy file.

Original commit: elastic/x-pack-elasticsearch@057e2abb1f
2017-01-17 09:33:41 -06:00
Tanguy Leroux 06259f1836 Use ElasticsearchException.generateThrowableXContent() and metadataToXContent() (elastic/elasticsearch#4655)
This is the x-pack siblings of elastic/elasticsearchelastic/elasticsearch#22611

Original commit: elastic/x-pack-elasticsearch@57924a6f1a
2017-01-17 15:45:53 +01:00
Simon Willnauer 9e1f81d1e4 fix line len
Original commit: elastic/x-pack-elasticsearch@15d060560b
2017-01-16 21:17:22 +01:00
Simon Willnauer 6ebeaae972 Followup for elastic/elasticsearchelastic/elasticsearch#22636 (elastic/elasticsearch#4634)
Original commit: elastic/x-pack-elasticsearch@a6b2c88610
2017-01-16 21:06:30 +01:00
Jason Tedor f677f3e327 Expose logs base path
This commit responds to a change in core Elasticsearch to expose
different properties for configuring the log files.

Relates elastic/elasticsearch#4633

Original commit: elastic/x-pack-elasticsearch@4caab617bf
2017-01-16 07:40:29 -05:00
Simon Willnauer 507e8d5461 Followup for elastic/elasticsearchelastic/elasticsearch#22618 (elastic/elasticsearch#4625)
Original commit: elastic/x-pack-elasticsearch@366253f46f
2017-01-15 13:36:03 +01:00
Lee Hinman 1ee5ac8a89 [TEST] Fix issue with bulk security rejections
Now that /_bulk requests are handled on a shard level, the entire request isn't
rejected, instead, each individual request is rejected. This changes the assert
accordingly.

Relates to elastic/elasticsearch#4441

Original commit: elastic/x-pack-elasticsearch@7ca777b574
2017-01-13 11:49:37 -07:00
Lee Hinman 4db2d7101a Merge remote-tracking branch 'z-areek/enhancement/use_shard_bulk_for_single_ops'
Original commit: elastic/x-pack-elasticsearch@bb4265d026
2017-01-13 10:46:20 -07:00
Simon Willnauer d50ffd6dc3 Fix compilation after elastic/elasticsearchelastic/elasticsearch#22608
Original commit: elastic/x-pack-elasticsearch@5ce843283a
2017-01-13 16:51:28 +01:00
Suyog Rao 89405c783f [Logstash monitoring] Fix template to match event structure (elastic/elasticsearch#4613)
CPU stats were wrongly nested under "load". The correct nesting is os->cpu->load_average

Original commit: elastic/x-pack-elasticsearch@e3dc3765f6
2017-01-12 16:55:26 -08:00
Lee Hinman 53f2dbe8e6 switch shard-level actions to static final vars, use separate method
Instead of shoehorning everything into `isCompositeAction`, add a new
`isTranslatedToBulkAction` method.

Original commit: elastic/x-pack-elasticsearch@053faae505
2017-01-12 15:04:57 -07:00
Lee Hinman 0136b095d0 Add BWC indices for 5.1.2 (elastic/elasticsearch#4607)
Original commit: elastic/x-pack-elasticsearch@8f2311aca8
2017-01-12 14:31:41 -07:00
Lee Hinman 41f4d1784d Remove `_all` configuration
Since the `_all` field is now disabled by default and no longer allowed to be
configured, these should be removed from the mapping templates.

Relates to https://github.com/elastic/elasticsearch/pull/22144

Original commit: elastic/x-pack-elasticsearch@3b17c2b9c6
2017-01-12 09:29:09 -07:00
javanna 2c5aeba418 remove unused arguments from RestGraphAction private parse method
Original commit: elastic/x-pack-elasticsearch@f0f41fb0a7
2017-01-12 14:44:02 +01:00
javanna dcf5ce7a4e Remove ParseFieldMatcher usages from QueryParseContext
Original commit: elastic/x-pack-elasticsearch@93423ca15c
2017-01-12 14:44:02 +01:00
javanna 51302608cb remove some more ParseFieldMatcher usages
Original commit: elastic/x-pack-elasticsearch@4d3b7574cc
2017-01-12 14:44:02 +01:00
Lee Hinman a21f64fef2 Revert "Don't add shard-specific versions of index/delete to isComposite"
This reverts commit elastic/x-pack@4b97fb70b5.

Original commit: elastic/x-pack-elasticsearch@1777134975
2017-01-11 14:17:40 -07:00
Jay Modi c5cab37db6 security: always restore the ThreadContext after invoking an action
This change ensure that the ThreadContext is always restored after an action has been invoked when
going through the SecurityActionFilter and authentication and authorization is enabled.

Original commit: elastic/x-pack-elasticsearch@5da70bd6fa
2017-01-11 13:41:14 -05:00
Chris Earle 33e670e3aa [Monitoring] Improve Exporter "skipped" logging for Cloud (elastic/elasticsearch#4581)
This removes the "skipped exporter" logging at the info level in favor of debug level. The LocalExporter has been updated so that non-elected master nodes will log a "waiting for elected master node..." message when they're ready, but are stuck waiting for the master node to setup indices.

Original commit: elastic/x-pack-elasticsearch@3f8b58bc37
2017-01-11 13:38:27 -05:00
Lee Hinman f64b1ea3eb Merge branch 'master' into enhancement/use_shard_bulk_for_single_ops
Original commit: elastic/x-pack-elasticsearch@f71ce64fb3
2017-01-11 10:09:08 -07:00
Nik Everett 818c4e9791 Handle core removing SearchRequestParsers
Original commit: elastic/x-pack-elasticsearch@e2f0ef773b
2017-01-11 08:49:16 -05:00
Lee Hinman 66f96a4666 Don't add shard-specific versions of index/delete to isComposite
Original commit: elastic/x-pack-elasticsearch@3777e9db8b
2017-01-10 10:39:53 -07:00
Alexander Reelsen 56e3e107d4 Tests: Fix watcher test using DNS resolution (elastic/elasticsearch#4576)
Turns out that this test became flaky on dev machines with specific DNS setup.
This test uses an index action to provoke an error, thus there is no dependency
on anything network specific.

The reason it was uncovered now, was due to the change to the Apache HTTP client which is doing DNS lookups. This DNS lookup happened inadvertantly because of a bug in the test, which had a URI like http://http://127.0.0.1.... However having web request was not needed at all, so it was replaced.

Closes elastic/elasticsearch#4561

Original commit: elastic/x-pack-elasticsearch@158516b5e5
2017-01-10 17:26:54 +01:00
Yannick Welsch a890cfb81e Keep NodeConnectionsService in sync with current nodes in the cluster state
Companion commit to elastic/elasticsearchelastic/elasticsearch#22509

Original commit: elastic/x-pack-elasticsearch@d46a46bf68
2017-01-10 13:32:11 +01:00
Lee Hinman 320ec6716d Merge branch 'master' into enhancement/use_shard_bulk_for_single_ops
Original commit: elastic/x-pack-elasticsearch@23761f3e16
2017-01-09 16:27:42 -07:00
Nik Everett 66a2f0d49e Handle core replacing Suggesters with namedObject
Original commit: elastic/x-pack-elasticsearch@e68d82569f
2017-01-09 16:51:47 -05:00
Lee Hinman 8326b6d83b Merge branch 'master' into enhancement/use_shard_bulk_for_single_ops
Original commit: elastic/x-pack-elasticsearch@98f4e74d2e
2017-01-09 14:22:18 -07:00
Jay Modi e0f0b4b7b8 rename the kibana role to kibana_system
This commit renames the kibana role to kibana_system and provides a backwards compatibility
layer so that kibana access still works properly during a rolling upgrade.

Closes elastic/elasticsearch#4525

Original commit: elastic/x-pack-elasticsearch@5c5796e53a
2017-01-09 16:06:50 -05:00
Lee Hinman e311ce0794 IndexAction is now handled at the shard level, so don't test it
Original commit: elastic/x-pack-elasticsearch@0398acb10c
2017-01-09 13:41:51 -07:00
Lee Hinman 0b64c9e550 MockIndicesRequest should implement CompositeIndicesRequest
Original commit: elastic/x-pack-elasticsearch@094a31d379
2017-01-09 13:33:13 -07:00
Lee Hinman 93720505b8 Merge branch 'master' into enhancement/use_shard_bulk_for_single_ops
Original commit: elastic/x-pack-elasticsearch@089fa9977d
2017-01-09 11:39:37 -07:00
Lee Hinman 8c3b05fa32 Re-add index and delete actions to AuthorizationServiceTests
Original commit: elastic/x-pack-elasticsearch@719db23c02
2017-01-09 11:16:49 -07:00
Lee Hinman 99f96862b4 Add subrequest versions of index and delete actions to `isCompositeAction`
Original commit: elastic/x-pack-elasticsearch@0e0a74eaea
2017-01-09 11:16:08 -07:00
Nik Everett ac260505af Handle core moving Aggregation parsing to namedObject
Original commit: elastic/x-pack-elasticsearch@a968c54e86
2017-01-09 13:05:56 -05:00
Nik Everett c597d37fbb Hande SearchExtParsers replaced by namedObject
Original commit: elastic/x-pack-elasticsearch@9691f9b772
2017-01-09 08:22:01 -05:00
jaymode a0090ac556 test: ensure the roles store is called when verifying mock interations
The CompositeRolesStoreTests#testNegativeLookupsAreCached test had a bug where it was expected to
retrieve the superuser role but the mockito verification on the call failed. This was because there
is also randomization on the number of times to call, which could be 0.

Closes elastic/elasticsearch#4562

Original commit: elastic/x-pack-elasticsearch@5c62df15b7
2017-01-09 08:05:59 -05:00
Tim Vernum 525364cf0e Add TRACE logging for LDAP traffic (elastic/elasticsearch#4551)
We frequently have support requests to diagnose LDAP realm problems.
One of the tools that would be useful in those cases is to be able to turn on trace logging and be able to see the LDAP searches and their results

Original commit: elastic/x-pack-elasticsearch@632d8e4f19
2017-01-09 11:26:22 +11:00
Jason Tedor c1d44d7d71 Mark failing action throttle test as awaits fix
This commit marks ActionThrottleTests#testFailingActionDoesGetThrottled
as awaits fix as this test fails reliably.

Original commit: elastic/x-pack-elasticsearch@465c48b603
2017-01-08 16:47:54 -05:00
javanna 8d31827f28 Migrate ToXContent impls to ToXContentObject
Original commit: elastic/x-pack-elasticsearch@b09f537ef4
2017-01-06 23:32:05 +01:00
javanna 0b93bc98bf WatchSourceBuilder to extend ToXContentToBytes
Original commit: elastic/x-pack-elasticsearch@b97ad8f92c
2017-01-06 23:32:05 +01:00
javanna c23de42f29 Adapt to ToXContentObject introduction
Changes required are for two reasons:

1) SearchResponse is a self contained valid object which doesn't need to be wrapped in a new object anymore
2) RestToXContentBuilderListener requires ToXContentObject, hence GraphExploreResponse needs to be moved over

Original commit: elastic/x-pack-elasticsearch@12277d0220
2017-01-06 23:32:05 +01:00
javanna 80dc895450 remove ParseFieldMatcher usages from Script parsing code
Original commit: elastic/x-pack-elasticsearch@4be5f83084
2017-01-05 19:33:15 +01:00
Tim B f71733ec4d Replace com.sun.net.httpserver.Http/Https server usages with MockHttpServer. (elastic/elasticsearch#4476)
Original commit: elastic/x-pack-elasticsearch@4b2d184f53
2017-01-05 11:29:31 -06:00
Tanguy Leroux b72dd8a2d1 [Monitoring] Schedule data collection instead of sleeping (elastic/elasticsearch#4266)
This commit renames the current AgentService into MonitoringService and changes the way it works: it was previously based on thread sleeping and it now use thread scheduling instead. 

At every given time interval, a MonitoringExecution is executed. It first checks if monitoring data can be collected and if so it will collect data from Collectors and then export the data using the Exporters. There are cases where the data cannot be collected: when the service is stopping, when the interval has been set to -1 after the MonitoringExecution has been scheduled, or when the previous data collection is not yet terminated. In this last case, MonitoringExecution will still be executed at the given interval but will not collect any data.

All tasks are executed on the generic thread pool.

closes elastic/elasticsearch#2866

Original commit: elastic/x-pack-elasticsearch@d37b4d3731
2017-01-05 17:45:17 +01:00
Alexander Reelsen 63f4bbba98 Watcher: Use Apache HttpClient for internal Watcher HttpClient (elastic/elasticsearch#4434)
Watcher: Use Apache HttpClient for internal Watcher HttpClient

The current implementation based on URLConnection has several drawbacks.

* If server returned HTTP header but then got stuck, no timeout would help, the connection remained stuck
* GET requests with a body were not supported, the method was silently changed to POST
* More complex handling of input/error stream handling, the body could not be read from a single input stream

NOTE: This is a BWC breaker. From now on every part of the URL needs to be encoded properly before it is configured in the requeust builder. This requires an upgrade of all watches.

Closes elastic/elasticsearch#1141

Original commit: elastic/x-pack-elasticsearch@bbc8f85dd8
2017-01-05 14:25:58 +01:00
Alexander Reelsen 9f43a5320e Watcher: Fix test failure in case watch alias was created before
An integration test was failing due to the possibility of the
.watch index being an alias (which only happens rarely).

Original commit: elastic/x-pack-elasticsearch@d53a4ebdd4
2017-01-05 11:44:41 +01:00