Commit Graph

196 Commits

Author SHA1 Message Date
javanna fdfc66a8ba Security: add tests for delete and update by query
Original commit: elastic/x-pack-elasticsearch@e85877d03f
2016-08-30 15:22:55 +02:00
jaymode bb4777b7d6 allow extensions to define settings filter
This change allows extensions to define their own filtered settings. This is used when there
may be sensitive credentials stored in a custom realm that should be filtered out of some
API calls.

Closes elastic/elasticsearch#2847

Original commit: elastic/x-pack-elasticsearch@952474daba
2016-08-30 07:20:00 -04:00
Martijn van Groningen f10fbeeb70 watcher: remove WatchScript class
Original commit: elastic/x-pack-elasticsearch@fb2f9a28f1
2016-08-22 09:39:13 +02:00
Tanguy Leroux 56be936ace Watcher: Use search template in Search Input/Transform REST tests
These tests would have caught the regression (introduced in elastic/x-pack@95a29c6a42 and fixed by elastic/x-pack@9b834b5f50) that cause search template to have "groovy" lang by default instead of "mustache"

Original commit: elastic/x-pack-elasticsearch@e27e5ae821
2016-08-19 09:30:24 +02:00
Martijn van Groningen f291f292bf watcher: Watcher search templates shouldn't serialize SearchSourceBuilder to a string, template that and turn it back into a SearchSourceBuilder
Instead watcher search template should be agnostic of SearchSourceBuilder and just work with BytesReference, so that serializing to a string before templating isn't needed.

Original commit: elastic/x-pack-elasticsearch@36d21ec819
2016-08-17 09:52:07 +02:00
Ryan Ernst 0039f9a2b2 Merge pull request elastic/elasticsearch#3032 from rjernst/deguice16
Internal: Deguice notification services

Original commit: elastic/x-pack-elasticsearch@9739742373
2016-08-08 14:10:52 -07:00
Tanguy Leroux b07394090f [Test] Re enable some messy Watcher tests
This commit reenable some Watcher tests that were muted in elastic/elasticsearch#724. It removes the Groovy dependency for tests that don't really use Groovy features and replace scripts with mocked scripts. It converts a GroovyScriptConditionIT test into a REST test and moves it in the smoke-test-watcher-with-groovy project.

closes elastic/elasticsearch#724

Original commit: elastic/x-pack-elasticsearch@f4c8161946
2016-08-08 10:06:30 +02:00
Ryan Ernst 42076f89ce Internal: Deguice notification services
This change removes guice from creating notification componenents. It
also removes the Notification helper class, as it just makes looking at
what stuff xpack adds more obfuscated.

Original commit: elastic/x-pack-elasticsearch@69b8ea4735
2016-08-03 15:32:56 -07:00
jaymode 00e963fef9 ensure transport is set for external cluster clients take 2
Original commit: elastic/x-pack-elasticsearch@b92943303e
2016-08-03 08:12:05 -04:00
jaymode 417bc49230 ensure transport is set for external cluster clients
Original commit: elastic/x-pack-elasticsearch@ee8aa8600a
2016-08-03 08:11:19 -04:00
Jason Tedor dd181e3e13 Cleanup HTTP and transport security settings
After this commit, we have "security3" and "security4" as possible
transport and HTTP settings, we default to "security4" if it is not set,
and we randomize the selection in some of the integration tests.

Original commit: elastic/x-pack-elasticsearch@e56718911a
2016-08-03 00:23:58 -04:00
Martijn van Groningen 62353ff8bc test: removed messy xpack mustache test module
The tests have been moved back to xpack, turned into a rest test or removed.
For example testing specific inline, file or stored mustache template functionality is already covered in the `lang-mustache` module. The smoke-test-watcher-with-mustache should tests watcher mustach specific things like the if the watcher variables are available.

Original commit: elastic/x-pack-elasticsearch@e434bcd3fa
2016-07-29 11:00:42 +02:00
Martijn van Groningen 49a1f8a4e5 test: Removed the mustache dependency on a number of tests and moved them back the xpack
There are still tests left to be cleanup, but these tests need to be turned into a rest test and moved the smoke test xpack with mustache module.

Original commit: elastic/x-pack-elasticsearch@3b88b15b97
2016-07-28 10:01:02 +02:00
Nik Everett b9e1bdfce6 Test reindex-from-remote with security
Original commit: elastic/x-pack-elasticsearch@7e3530a958
2016-07-27 14:19:01 -04:00
Chris Earle ac43e72aec [Monitoring] Change xpack.monitoring.collection.exporters to xpack.monitoring.exporters
Removes the exporters from the collection settings.

Original commit: elastic/x-pack-elasticsearch@e721e5cb6d
2016-07-27 14:05:36 -04:00
Martijn van Groningen dc6672693b test: make sure that tests are actually ran
Original commit: elastic/x-pack-elasticsearch@b1a4015779
2016-07-27 15:40:21 +02:00
Alexander Reelsen 20481083e3 Watcher: Update to tests to use slack token for team slack, easier to check
Original commit: elastic/x-pack-elasticsearch@8a511a1f31
2016-07-27 11:47:24 +02:00
Nik Everett 4d063eddbd Rename client yaml tests
Original commit: elastic/x-pack-elasticsearch@4d37d18090
2016-07-26 13:54:40 -04:00
Martijn van Groningen 0bb6fed89f extend from WatcherRestTestCase to make sure watcher gets restarted after each test
Original commit: elastic/x-pack-elasticsearch@6932cfd185
2016-07-26 08:59:19 +02:00
Ryan Ernst b9a3fa3079 Build: Turn on license header checks
This is dependent on elastic/elasticsearchelastic/elasticsearch#19589. It also fixes the
existing files that either were missing the license header or had the
open source license header.

Original commit: elastic/x-pack-elasticsearch@2642c20381
2016-07-25 17:09:54 -07:00
Nik Everett 3ec40d67a5 Handle core renaming ESRestTestCase
Original commit: elastic/x-pack-elasticsearch@c47a7f839d
2016-07-25 17:58:13 -04:00
Martijn van Groningen d33e639d4c security: Added templating support to DLS' role query.
Closes elastic/elasticsearch#410

Original commit: elastic/x-pack-elasticsearch@2b91ea9eed
2016-07-25 08:11:28 +02:00
javanna 9b73b26b7d Merge branch 'master' into feature/async_rest_client
Original commit: elastic/x-pack-elasticsearch@e58a8d9484
2016-07-22 22:22:14 +02:00
Alexander Reelsen efc5de782b Watcher: Refactor integration test into rest test (elastic/elasticsearch#2864)
As the specified integration tests were better suited as REST tests, I changed them into
those and removed the (partially already unused) java classes.

Original commit: elastic/x-pack-elasticsearch@f26d8d94e8
2016-07-22 17:01:57 +02:00
javanna 748962e626 Merge branch 'master' into feature/async_rest_client
Original commit: elastic/x-pack-elasticsearch@cb4f022353
2016-07-22 15:52:44 +02:00
Alexander Reelsen 81382262ec Watcher: Hardcode index names for auto index create validation (elastic/elasticsearch#2834)
This is broken in 2.x and returns a wrong index name. We should just use
the indices, that are hardcoded in the error message.

Relates elastic/elasticsearch#2831

Original commit: elastic/x-pack-elasticsearch@457be61013
2016-07-21 14:25:22 +02:00
Ryan Ernst f05005f667 Internal: Remove guice from authentication and authorization services
This change removes guice from most of the rest of security. It also
converts the last use of onModule in xpack extensions to a pull based
extension.

Original commit: elastic/x-pack-elasticsearch@9de072550e
2016-07-19 15:57:29 -07:00
javanna 63a5001837 [TEST] restore throws IOException clause on all sync performRequest callers
Original commit: elastic/x-pack-elasticsearch@d114419752
2016-07-19 16:51:07 +02:00
javanna ca557af48c Merge branch 'master' into feature/async_rest_client
Original commit: elastic/x-pack-elasticsearch@693e281d0d
2016-07-19 16:29:50 +02:00
Ryan Ernst 30b084d372 Merge pull request elastic/elasticsearch#2843 from rjernst/plugin_default_config
Switch to new plugin configuration for integ tests

Original commit: elastic/x-pack-elasticsearch@e2a5da4144
2016-07-18 14:19:52 -07:00
Ryan Ernst e2303f2584 Merge branch 'master' into deguice8
Original commit: elastic/x-pack-elasticsearch@8b273d3f8a
2016-07-18 13:54:43 -07:00
Ryan Ernst 07c9903e8f Merge branch 'master' into remove_script_proxy
Original commit: elastic/x-pack-elasticsearch@0046ab598a
2016-07-18 13:41:21 -07:00
Simon Willnauer 12c709ea3a Move over to dedicated TransportClient implementations (elastic/elasticsearch#2819)
Followup of elastic/elasticsearchelastic/elasticsearch#19435
Relates to elastic/elasticsearchelastic/elasticsearch#19412

Original commit: elastic/x-pack-elasticsearch@60f7047ea9
2016-07-18 15:43:29 +02:00
Martijn van Groningen 5b5e0bd787 Updated xpack for changed in elastic/elasticsearch#19425 related to templates
Original commit: elastic/x-pack-elasticsearch@7747f92b89
2016-07-18 08:34:11 +02:00
Ryan Ernst 91441bbd2a Internal: Remove script service proxy
ScriptServiceProxy is a thin wrapper around the ScriptService which does
a runAs the xpack user when compiling. But script services know nothing
about xpack users, so this has no real effect. I believe this is a
remnant of when we had indexed scripts, where the compilation may have
done a get on the scripts index.

This change removes the ScriptServiceProxy. It also renames Script in
watcher to WatcherScript, to remove confusion between elasticsearch's
Script and watchers Script.

Original commit: elastic/x-pack-elasticsearch@4e2fdbc518
2016-07-16 00:10:17 -07:00
Ryan Ernst 9df9957307 Remove guice from realms construction
This change makes the internal realms factories, as well as those added
by extensions, constructed directly instead of via guice. Adding realms
in extensions is now pull based. Finally, all of the generics for realms
and realm factories have been removed.

Original commit: elastic/x-pack-elasticsearch@f0de9d2340
2016-07-15 15:55:28 -07:00
Ryan Ernst 01dfb7481e Build: Switch to new plugin configuration for integ tests
This is the xplugins side of elastic/elasticsearchelastic/elasticsearch#19461

Original commit: elastic/x-pack-elasticsearch@bb29f9e948
2016-07-15 14:48:50 -07:00
Ryan Ernst 5d42de803c Merge branch 'master' into rest_headers
Original commit: elastic/x-pack-elasticsearch@b0d14d60e4
2016-07-14 19:04:09 -07:00
Jason Tedor 496e112c5e Rename transport-netty to transport-netty-3
This commit renames the Netty 3 transport module from transport-netty to
transport-netty3. This is to make room for a Netty 4 transport module,
transport-netty4.

Relates elastic/elasticsearch#2827

Original commit: elastic/x-pack-elasticsearch@e6487cefa2
2016-07-14 22:03:29 -04:00
Ryan Ernst 0c81f1b6ad Switch to using rest headers getting
This is the xplugins side of elastic/elasticsearchelastic/elasticsearch#19440. It adds a
getter on XPackExtension for extensions that add custom rest headers, in
addition to the headers registered for xpack itself.

Original commit: elastic/x-pack-elasticsearch@bd142b88c6
2016-07-14 18:55:28 -07:00
Lee Hinman 7e4b200f43 [TEST] ensure "index1" is yellow before searching in MigrateToolIT
If the search runs before the primary shards are initialized for the
"index1" index, the search may fail for unrelated reasons.

Resolves elastic/elasticsearch#2818

Original commit: elastic/x-pack-elasticsearch@654ba9e142
2016-07-14 10:18:33 -06:00
Simon Willnauer 1fe0f5c7ac Followup for elastic/elasticsearchelastic/elasticsearch#19428 (elastic/elasticsearch#2815)
elastic/elasticsearchelastic/elasticsearch#19428 removes `node.mode` and `node.local` this PR
fixes xplugins to configure networking explicitly.

Original commit: elastic/x-pack-elasticsearch@ee8daa36dd
2016-07-14 13:21:27 +02:00
Alexander Reelsen e124e211c9 Watcher: Move YAML test into own project to not interfere with client tests (elastic/elasticsearch#2804)
This particular test requires Elasticsearch to run on port 9400, which is not
guaranteed if the clients run their own tests, as it is a matter of configuration
in gradle.

Therefore these tests need to run in their project.

Original commit: elastic/x-pack-elasticsearch@da38407766
2016-07-13 16:08:13 +02:00
javanna c86c433aab Rest client: move to async client under the hood
Some configuration changes are needed due to the move to the async http client

Original commit: elastic/x-pack-elasticsearch@2f28dec0a0
2016-07-12 18:25:27 +02:00
Simon Willnauer 9204920d9a fix tests to use the transport-netty plugin
Original commit: elastic/x-pack-elasticsearch@65c0cd0cf2
2016-07-12 14:35:07 +02:00
jaymode 84a60d2548 test: mute audit trail test that fails periodically
Original commit: elastic/x-pack-elasticsearch@83972e5c2b
2016-07-11 15:08:32 -04:00
Chris Earle 16b3056b1f [Monitoring] Change xpack.monitoring.agent to xpack.monitoring.collection
This changes the xpack.monitoring.agent.* settings so that they fall under xpack.monitoring.collection.*.

- This also changes Kibana's equivalent data_collection to collection.

Original commit: elastic/x-pack-elasticsearch@a69bc18055
2016-07-11 12:03:01 -04:00
javanna 86d1805d40 Rest Client: use short performRequest methods when possible
Original commit: elastic/x-pack-elasticsearch@088d6c7ad8
2016-07-11 09:37:49 +02:00
Alexander Reelsen e8c1e7f9d8 Watcher: Dont hide exceptions during watch execution
When a painless exception is raised in the script condition, it was not bubbled up due to
catching exceptions on during execution. This removes the different catching of exceptions
and allows the watch record construct to contain an exception that is also serialized correctly
so that it can be stored in the watch history but also returned in the execute watch API.

This also updates the watch history template, so that exceptions are not indexed, but logged.

Relates elastic/elasticsearch#2587

Original commit: elastic/x-pack-elasticsearch@4dffb672bf
2016-07-05 09:33:44 +02:00
Jason Tedor 1cd53c41e2 Do not catch throwable
Today throughout the codebase, catch throwable is used with reckless
abandon. This is dangerous because the throwable could be a fatal
virtual machine error resulting from an internal error in the JVM, or an
out of memory error or a stack overflow error that leaves the virtual
machine in an unstable and unpredictable state. This commit removes
catch throwable from the codebase and removes the temptation to use it
by modifying listener APIs to receive instances of Exception instead of
the top-level Throwable.

Relates elastic/elasticsearch#2694

Original commit: elastic/x-pack-elasticsearch@7ecdd7d978
2016-07-04 08:41:08 -04:00