Commit Graph

775 Commits

Author SHA1 Message Date
Nik Everett d46f83c53b Fix compilation error
Core changed...

Original commit: elastic/x-pack-elasticsearch@c80d5fd042
2016-07-12 22:47:20 -04:00
Ryan Ernst ed3b4afca9 Sync createComponents signature with core
Original commit: elastic/x-pack-elasticsearch@7874ff411f
2016-07-12 15:06:51 -07:00
Ryan Ernst 464e1bee37 Merge branch 'master' into deguice1
Original commit: elastic/x-pack-elasticsearch@078230ed0d
2016-07-12 15:04:49 -07:00
Ryan Ernst 8b2cdebf88 Merge pull request elastic/elasticsearch#2788 from rjernst/license1
Internal: Simplify creation of trial license

Original commit: elastic/x-pack-elasticsearch@1c92544b65
2016-07-12 13:44:21 -07:00
javanna 50c24ba4ce RestClient: simplify ssl configuration
Original commit: elastic/x-pack-elasticsearch@1600743249
2016-07-12 12:31:40 +02:00
javanna 107ab2d71d Rest Client: add callback to customize http client settings
The callback replaces the ability to fully replace the http client instance. By doing that, one used to lose any default that the RestClient had set for the underlying http client. Given that you'd usually override one or two things only, like a couple of timeout values, the ssl factory or the default credentials providers, it is not uder friendly if by doing that users end up replacing the whole http client instance and lose any default set by us.

Original commit: elastic/x-pack-elasticsearch@03adca6f62
2016-07-12 12:31:40 +02:00
Alexander Reelsen 4360cccad7 Watcher: Prevent NPE on chained input toXContent (elastic/elasticsearch#2776)
If a chained input was aborted with an exception, then toXContent ran
into a NPE instead of rendering.

Closes elastic/elasticsearch#2774

Original commit: elastic/x-pack-elasticsearch@a3795f2290
2016-07-12 09:33:32 +02:00
Ryan Ernst a9ace27107 Internal: Simplify creation of trial license
Currently each node monitors the cluster state for a license, and if it
does not find one, it sends a request to the master to generate a trial
license. However, the master node has this same logic. Since the master
node is the only thing that can change the cluster state, we know that
once some node becomes master, it will notice the lack of license,
generate a trial license, and send a cluster state update. The trigger
from every node telling the master to generate the trial license is not
needed.

This change removes the register_trial_license action that the non
master nodes used. It removes the need for the TransportService in the
LicensesService, which will help with deguicing.

Original commit: elastic/x-pack-elasticsearch@a71656847e
2016-07-11 22:37:23 -07:00
Ryan Ernst dd89a7b061 Remove guice from watcher http client and related classes.
This is the first deguicing for xplugins to use the new
createComponents(). The removal was very straightforward. One thing to
note is HttpAuthFactory only has one implementation (basic auth), but I
kept the registry and such for now. Also, HttpRequest.Parser is only
used in 2 tests, not at all in main code, it should probably be removed.

Original commit: elastic/x-pack-elasticsearch@839e7e4900
2016-07-11 18:05:33 -07:00
Areek Zillur 149df1fd44 [FIX] adapt licensing rest tests to new spec-api name
Original commit: elastic/x-pack-elasticsearch@c307c2afda
2016-07-11 18:27:05 -04:00
Ryan Ernst e92860f552 Plugin node modules/services rename to guice related
See elastic/elasticsearchelastic/elasticsearch#19371

Original commit: elastic/x-pack-elasticsearch@40f7e43cc5
2016-07-11 14:28:47 -07:00
Karel Minarik 87ea79bad6 License Plugin: Removed installing a special license in the delete REST test
We can rely on the automatically installed license being present.

Related: elastic/elasticsearch#2782

Original commit: elastic/x-pack-elasticsearch@a038ac71e9
2016-07-11 23:08:49 +02:00
Karel Minarik 22c19acbcf License Plugin: Added a `teardown` to put license back
Since the "Should throw 404 after license deletion" test deletes the license,
a subsequent test run fails for many tests in other components.

This patch adds a `teardown` section to install back a trial development license.

Closes elastic/elasticsearch#2782

Original commit: elastic/x-pack-elasticsearch@45ec5d4244
2016-07-11 23:08:34 +02:00
Ryan Ernst 7438177313 Internal: Create CryptoService without guice
This change creates the CryptoService during xpack plugin construction,
and also collapses the only implementation of CryptoService into a
class instead of an interface.

Original commit: elastic/x-pack-elasticsearch@7f00a5d6ef
2016-07-11 12:18:39 -07:00
Ryan Ernst 2827c686bd Fix spacing in watcher test class
Original commit: elastic/x-pack-elasticsearch@49b94780d7
2016-07-11 11:48:51 -07:00
Ryan Ernst f13764dbc0 Merge branch 'master' into clock_init_without_guice
Original commit: elastic/x-pack-elasticsearch@8a1e4758c9
2016-07-11 11:48:29 -07:00
Karel Minarik 96b1bd9b64 License Plugin: Added a "setup" action to the REST test for delete
The delete test has been relying on the license already being installed
in the cluster from the other test. However, many runners run tests
in arbitrary order, so it has been failing.

This patch adds a "Trial Development" license as the first action
in the test.

Related: elastic/elasticsearch#2777

Closes elastic/elasticsearch#2778

Original commit: elastic/x-pack-elasticsearch@cd198cf67a
2016-07-11 20:46:13 +02:00
Karel Minarik d0fa318d22 License Plugin: Fixed the incorrect namespace and indentation for the REST tests
The actions in the `do` sections of tests definitions have not been indented, which
confused the Ruby YAML parser.

Also, the calls to `license.*` have not been prefixed with the `xpack` API.

Related: elastic/elasticsearch#2777

Original commit: elastic/x-pack-elasticsearch@b2da7d2703
2016-07-11 20:46:13 +02:00
Karel Minarik 28d6fbd782 License Plugin: Added the `xpack` namespace to the REST API definition
In order to be consistent with the other X-Pack APIs, the `license.*` APIs
have been prefixed with `xpack`.

Closes elastic/elasticsearch#2777

Original commit: elastic/x-pack-elasticsearch@cd35a2d4aa
2016-07-11 20:46:03 +02:00
Karel Minarik 427563132e Watcher: Added `teardown` sections to the REST tests
The tests have been failing because they haven't cleaned up the environment
after their run, leaving documents with watches behind.

This patch adds `teardown` sections which delete the documents
created by tests.

Related: elastic/elasticsearch#2648

Closes elastic/elasticsearch#2690

Original commit: elastic/x-pack-elasticsearch@e34e40d879
2016-07-11 18:47:30 +02:00
Karel Minarik ec3b11d802 Watcher: Changed check for `_status.version` in the REST tests
The check is failing, because even when the document is deleted before
the test, the version of the document in Elasticsearch sticks around
for a while.

I have changed the test to use the `is_true` operator to check for
the presence of the field only.

Original commit: elastic/x-pack-elasticsearch@308ffe34f0
2016-07-11 18:47:26 +02:00
Karel Minarik 4fae88f943 Watcher: Fixed YAML syntax for `xpack.watcher.stats` calls in REST tests
The shorthand format has been failing in the Ruby runner. Not sure if
this is particular to the Ruby YAML library, but I think there's no
harm in making the syntax standard.

Original commit: elastic/x-pack-elasticsearch@d753cad64a
2016-07-11 18:47:16 +02:00
Karel Minarik dc6e78a62c Graph: Moved the index creation to a `setup` section in the REST test
Closes elastic/elasticsearch#2679

Original commit: elastic/x-pack-elasticsearch@51a4a5e530
2016-07-11 18:42:03 +02:00
Karel Minarik 0b3c97c083 Graph: Fixed incorrect API call in the REST test
Related: elastic/elasticsearch#2678

Original commit: elastic/x-pack-elasticsearch@3157c97ca2
2016-07-11 18:42:03 +02:00
Karel Minarik 7d6a68fd0a Graph: Added the `xpack` namespace to the Graph API JSON specification
The `graph.explore` API has not been prefixed with `xpack`, as the other X-Pack APIs.

Closes elastic/elasticsearch#2678

Original commit: elastic/x-pack-elasticsearch@4501fb5b63
2016-07-11 18:39:03 +02:00
Ryan Ernst 5ea799cf51 Merge pull request elastic/elasticsearch#2772 from rjernst/remove_secret_service
Internal: Remove SecretService

Original commit: elastic/x-pack-elasticsearch@65981535dc
2016-07-11 09:06:33 -07: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
Ryan Ernst b862db93d0 Ensure CryptoService is not null for node only services
Original commit: elastic/x-pack-elasticsearch@b17e3620b5
2016-07-11 08:38:12 -07:00
Ryan Ernst eade405b8f Merge pull request elastic/elasticsearch#2770 from rjernst/simpler_crypto_api
Internal: Simplify CryptoService api

Original commit: elastic/x-pack-elasticsearch@de3f270cbb
2016-07-11 08:36:13 -07:00
jaymode c364a71310 test: output users array on anonymous failure
See elastic/elasticsearch#2773

Original commit: elastic/x-pack-elasticsearch@24871ee1ea
2016-07-11 09:49:26 -04:00
Simon Willnauer 9dab9eb762 Followup from elastic/elasticsearchelastic/elasticsearch#19332
Added missing IOException and simplified filtering out mock transports
for security integration tests.

Relates to elastic/elasticseachelastic/elasticsearch#19332

Original commit: elastic/x-pack-elasticsearch@8a5c015c3d
2016-07-11 12:16:53 +02:00
javanna f783dc1db8 Fix some SSL related deprecation warnings
Original commit: elastic/x-pack-elasticsearch@311e3d626b
2016-07-11 09:37:49 +02: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
Ryan Ernst 6bcf79dd6c Internal: Remove SecretService
The SecretService implements a subset of the api provided by the
CryptoService. Currently the CryptoService is simply bound to null when
in the transport client or when security is disabled. This change
converts all users of the SecretService to the CryptoService, and any
tests using SecretService.Insecure to simply using null.

Original commit: elastic/x-pack-elasticsearch@8251c65ffe
2016-07-11 00:04:14 -07:00
Ryan Ernst 1c10efc60f Internal: Simplify CryptoService api
The CryptoService currently has a lot of variations of methods that are
unused. It really only uses sign/unsign, encrypt/decrypt. This change
trims the api down to those needed methods.

Original commit: elastic/x-pack-elasticsearch@92e83efeb7
2016-07-10 14:47:48 -07:00
Ryan Ernst 4d72a29b63 Security: Load system key at startup only
This change removes the polling xpack did for changes to the system key.

closes elastic/elasticsearch#2768

Original commit: elastic/x-pack-elasticsearch@fe009071a8
2016-07-09 15:25:08 -07:00
Ryan Ernst 6b5aea138f Internal: Initialize Clock directly instead of with guice
The Clock interface, which basically allows testing in watcher to "time
warp" is currently constructed using guice. This change constructs it
using a protected method on XPackPlugin which can be overriden in tests.
This allows removing the ClockModule. For now, the Clock still needs to
be bound in guice, but this at least removes one guice construction, and
shows how other things can be overriden for tests.

Original commit: elastic/x-pack-elasticsearch@7addaea086
2016-07-08 08:54:23 -07:00
Areek Zillur 005304afa9 Merge branch 'master' into simplify_license_service_scheduling
Original commit: elastic/x-pack-elasticsearch@91258f1a3c
2016-07-07 17:54:46 -04:00
Areek Zillur adce8215ab Removed redundant tests from the days when license was a separate plugin
Original commit: elastic/x-pack-elasticsearch@def1c5092a
2016-07-07 17:38:29 -04:00
Nik Everett 87e84bf9e1 Handle core's cleanup of terms aggregation
Original commit: elastic/x-pack-elasticsearch@c764d11867
2016-07-07 17:06:07 -04:00
Areek Zillur 57544b8688 incorporate feedback
Original commit: elastic/x-pack-elasticsearch@f10ea80143
2016-07-07 16:22:42 -04:00
Chris Earle d1e08c5dd4 [Security] Log Deprecation Warnings for old API usage
This makes use of the registerAsDeprecatedHandler method to automatically warn users when they're using deprecated functionality.

This will also automatically provide a Warning header for anyone using HTTP clients (though they have to be looking for it...).

Security portion only

Original commit: elastic/x-pack-elasticsearch@ab1a50fe06
2016-07-07 12:10:35 -04:00
Robert Muir 0b52cedf60 Merge pull request elastic/elasticsearch#2736 from rmuir/fls_cache
support lucene query cache when using FLS

Original commit: elastic/x-pack-elasticsearch@5b7054b702
2016-07-07 12:06:31 -04:00
Robert Muir 3a0aa13127 support lucene query cache when using FLS
Original commit: elastic/x-pack-elasticsearch@d1e8b9605d
2016-07-07 10:28:10 -04:00
Alexander Reelsen a4fe1da401 Tests: Fix xpack usage stats rest test
Original commit: elastic/x-pack-elasticsearch@cc6d2b9a35
2016-07-07 15:50:51 +02:00
Tanguy Leroux f861bb1661 MockScriptEngine and associated plugin has changed in ES core
Original commit: elastic/x-pack-elasticsearch@bb31b7b7c9
2016-07-07 15:27:04 +02:00
Alexander Reelsen 2c31e343b0 Watcher: Add usage stats
This adds the following stats to the usage stats

* Across all active watches
  * Number of triggers per type
  * Number of inputs per type
  * Number of transforms per type
  * Number of conditions per type
  * Number of actions per type
* Total number of watches
* Total number of active watches
* Per action
  * Execution time total
  * Execution time mean
  * Invocation count
* Total use of watch metadata

Internally this uses a `Counters` helper class, so that creating counters does not require
you to decide about the map structure.

Relates elastic/elasticsearch#2210

Original commit: elastic/x-pack-elasticsearch@e6f95ba290
2016-07-07 14:45:00 +02:00
Areek Zillur 7e3fac9b35 add comment regarding scheduling license with future issue date
Original commit: elastic/x-pack-elasticsearch@7d4094da1e
2016-07-06 17:29:10 -04:00
Areek Zillur c67beb1359 add expiry callback documentation
Original commit: elastic/x-pack-elasticsearch@03326406d1
2016-07-06 17:19:46 -04:00
Areek Zillur 827d68c7b0 initialize scheduler in constructor
Original commit: elastic/x-pack-elasticsearch@283ddf3aa3
2016-07-06 17:11:08 -04:00