Commit Graph

891 Commits

Author SHA1 Message Date
Jason Tedor 8579dbf80b Remove nocommit from Security
This commit removes a nocommit from Security so that work can continue.

Original commit: elastic/x-pack-elasticsearch@4d35ef6174
2016-08-02 17:11:32 -04:00
Jason Tedor c88aea19d8 Migrate Netty 4 unit tests
This commit migrates some unit tests to Netty 4.

Original commit: elastic/x-pack-elasticsearch@a38dc82706
2016-08-02 16:43:07 -04:00
jaymode c3cecad027 add channel is closed check
Original commit: elastic/x-pack-elasticsearch@04bcdf8308
2016-08-02 15:50:17 -04:00
jaymode 7a3932de94 add some debugging info to assert
Original commit: elastic/x-pack-elasticsearch@ef3c68e4db
2016-08-02 15:36:00 -04:00
jaymode fc8e787325 update security rest filter
Original commit: elastic/x-pack-elasticsearch@9a4f0bc184
2016-08-02 14:47:06 -04:00
Jason Tedor 8fa06fbab7 Security Netty 4 HTTP server implementation
This commit is a work-in-progress commit on a Netty 4-based HTTP server
implementation.

Original commit: elastic/x-pack-elasticsearch@705a202574
2016-08-02 14:33:42 -04:00
jaymode af16eec512 fix PKI cert extraction
Original commit: elastic/x-pack-elasticsearch@9c68611557
2016-08-02 14:07:16 -04:00
jaymode b525891212 Netty 4 transport working
Original commit: elastic/x-pack-elasticsearch@081e68c087
2016-08-02 13:43:16 -04:00
Jason Tedor b498fd32a2 Enable core to default networking to Netty 4
This commit enables core to set the default transport and HTTP
implementation to use transport-netty4.

Relates elastic/elasticsearch#2999

Original commit: elastic/x-pack-elasticsearch@cb0efa29ab
2016-08-02 12:19:34 -04:00
Ali Beyad 287f4da0b9 Fix tests that use write consistency level in favor of ActiveShardCount
Original commit: elastic/x-pack-elasticsearch@4c463c8d7b
2016-08-02 08:59:46 -04:00
Tanguy Leroux 62d3c19db5 [TEST] Make MockMustacheScriptEngine less strict
Since elastic/elasticsearch#19621 MockScriptEngine is stricter and expects scripts to be defined before being used in tests. Because watcher makes heavy use of scripts without really need of custom logic, this commit changed the MockMustacheScriptEngine implementation so that it always returns the script's source as a result.

Original commit: elastic/x-pack-elasticsearch@09cffa9517
2016-08-01 18:13:43 +02:00
Nik Everett 2297c493e4 Handle renaming DocWriteResponse.Operation
It is now DocWriteResponse.Result. The enum constants have changed a bit
as well.

Original commit: elastic/x-pack-elasticsearch@395e7c15bb
2016-08-01 10:43:15 -04:00
Nik Everett 585837dbd3 Handle core moving RestUtils
Original commit: elastic/x-pack-elasticsearch@01cda72d62
2016-07-29 20:37:01 -04:00
Nik Everett c0df62e0e9 Stop using isCreated and isFound
These are going away in core and being replaced by `getOperation`.

Original commit: elastic/x-pack-elasticsearch@7413b12911
2016-07-29 14:22:11 -04:00
Nik Everett 240a052cbf Stop using isCreated and isFound
These are going away in core and being replaced by `getOperation`.

Original commit: elastic/x-pack-elasticsearch@d02e745318
2016-07-29 13:43:02 -04:00
jaymode c82f1be386 security: move reloading of ssl configuration to its own class
This commit moves the reloading and monitoring of files from the trust/key configuration
classes into a separate class that will reload for the whole SSLConfiguration object.
SSLContexts are loaded lazily by most of security, so a listener interface was added to
notify the reloader that there may be other paths to monitor.

Original commit: elastic/x-pack-elasticsearch@1633cc14a7
2016-07-29 12:26:37 -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
Nik Everett 59cb8f2271 Fix rest spec for graph explore
Original commit: elastic/x-pack-elasticsearch@293b5c9ebd
2016-07-28 16:37:30 -04:00
Chris Earle 4d81792a56 [Graph] 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...).

Graph portion only

Original commit: elastic/x-pack-elasticsearch@d6452a75c1
2016-07-28 12:11:10 -04:00
Ryan Ernst 9d6d858449 Merge pull request elastic/elasticsearch#2958 from rjernst/move_license
Move License into xpack

Original commit: elastic/x-pack-elasticsearch@6b86ce6f14
2016-07-28 08:41:23 -07:00
Alexander Reelsen 39d614bd17 Watcher: Fix HTTP proxy port setting (elastic/elasticsearch#2961)
The value of the setting name had a typo.
Also added a message to show the value of globally configured proxy on startup
to help admins spot if this is configured.

Original commit: elastic/x-pack-elasticsearch@bdc41ff733
2016-07-28 16:10:02 +02:00
jaymode ba1ced9096 security: adapt realms usage stats output and add anonymous
This changes the usage stats for the realms to not use nested objects but to instead group
values by the realm type. Additionally, the realms now return the actual size of the users that
are contained or have recently logged in (in case of LDAP/AD).

Additionally, the audit section will always contain an enabled flag and a new field has been
added to capture whether anonymous access is enabled or not.

See elastic/elasticsearch#2210

Original commit: elastic/x-pack-elasticsearch@9cc2852585
2016-07-28 08:05:21 -04:00
Martijn van Groningen 3d3eb0fc48 test: renamed test cases
Original commit: elastic/x-pack-elasticsearch@c05bfecb97
2016-07-28 12:59:40 +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
Tanguy Leroux 7a6ed965b9 Update LICENSE.txt
The previous LICENSE.txt file still referred to Marvel Software. This commit updates the content of the license for X-Pack for both Elasticsearch and Kibana plugins.

closes elastic/elasticsearch#2644

Original commit: elastic/x-pack-elasticsearch@bace98250e
2016-07-28 09:24:25 +02:00
Ryan Ernst 8514b1422e Move License into xpack
We currently have the license:base project, as well as license:licensor.
Xpack depends on license base. This change moves all the base license
code into xpack, and makes the license-tools (previously called
licensor) depenend on x-pack.

Original commit: elastic/x-pack-elasticsearch@7fd462ad6a
2016-07-28 00:16:18 -07:00
Ryan Ernst fedd3b4f4a Convert FileWatchListener to an interface
Original commit: elastic/x-pack-elasticsearch@da9f6eddc1
2016-07-27 15:32:52 -07: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
Areek Zillur 92e357f838 Remove bwc code to read 1.x licenses from cluster state
In 2.x, 1.x license format in cluster state was upgraded
to the 2.x format.  This commit removes the code to read
1.x license format from cluster state in 5.x, as 2.x clusters
will already upgrade the license format to 2.x format.

Original commit: elastic/x-pack-elasticsearch@77f18ffc76
2016-07-27 11:56:13 -04:00
Ryan Ernst d53315b613 Merge branch 'master' into deguice15
Original commit: elastic/x-pack-elasticsearch@38f0a6f641
2016-07-26 15:07:20 -07:00
Ryan Ernst 4089ae0775 move license utils back to public, for now
Original commit: elastic/x-pack-elasticsearch@3e37e2a08f
2016-07-26 14:20:11 -07:00
Ryan Ernst 059bf323c4 Cleanup: Move all license related classes into a single package
This change moves all license related code in xpack under
org.elasticsearch.license. Some classes become package private (more can
become package private later with further deguicing). It also adds
package level javadocs. Note, I did not move anything from the actual
licensing jar.  This should be cleaned up in a followup.

Original commit: elastic/x-pack-elasticsearch@2413c4f288
2016-07-26 13:26:29 -07:00
Ryan Ernst b02b30ee0a Internal: Remove guice from monitoring
This change removes guice from construction of monitoring classes.
Additionally, it removes disk threshold watermark and enabled setting
from node stats collector. These were not node stats, just cluster
settings. If we want to add back actual percentage of disk threshold
used, it should be in node stats directly.

Original commit: elastic/x-pack-elasticsearch@4cd49557cf
2016-07-26 11:25:22 -07:00
Nik Everett 4d063eddbd Rename client yaml tests
Original commit: elastic/x-pack-elasticsearch@4d37d18090
2016-07-26 13:54:40 -04:00
Alexander Reelsen 462897e8c8 Watcher: Fix watch history template for failed inputs (elastic/elasticsearch#2928)
If the result of a search actions fails (i.e. because the index you queried does not exist yet),
the watch record failed to store into the Watch History because of a mapping issue, as the
template path match regular expression did not match properly.

Closes elastic/elasticsearch#2913

Original commit: elastic/x-pack-elasticsearch@3c2d4b3ca9
2016-07-26 18:22:34 +02:00
Ryan Ernst 8e0da2602d Fix license ack tests to ensure license change always results in ack
messages

Original commit: elastic/x-pack-elasticsearch@25029eb83e
2016-07-25 20:12:42 -07:00
Ryan Ernst 3e8bc2879f Add back disabling dependency licenses check
Original commit: elastic/x-pack-elasticsearch@51b76f6f89
2016-07-25 18:06:57 -07:00
Ryan Ernst 1ca2db1d88 Merge branch 'master' into deguice2
Original commit: elastic/x-pack-elasticsearch@c4151d75e1
2016-07-25 17:49:19 -07: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
Alexander Reelsen 0b2b50be94 Watcher: Put response code in payload in http input (elastic/elasticsearch#2888)
The response status code was stored in the result of an http input,
but inaccessible in the payload itself and could not be used in
scripts.

This puts the status code in the payload under the name '_status_code',
similar to the '_headers' variable, which already stores the headers.

Original commit: elastic/x-pack-elasticsearch@dff2a39535
2016-07-25 14:57:57 +02:00
Alexander Reelsen f02a9cdc35 Watcher: Ensure watch status needs to be udpated on unmet condition (elastic/elasticsearch#2863)
Background: When a watch has been acked, but the condition evaluates to false again,
the watch must be marked as dirty - which means it needs to be persisted to the watches
index - so in case of a master node switch this information is not lost.

This commit fixes the setting of the `dirty` field in the watch status, in case
the condition is not met, but some actions have been acked.

Original commit: elastic/x-pack-elasticsearch@1a55a45b14
2016-07-25 13:24:12 +02: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
Ryan Ernst 0ae6e53173 Internal: Collapse Licensee per feature into single XPackLicenseState
The license code currently has a Licensee implementation per feature,
which is updated by the license service. This meant maintaining a
listener type feature for the license service, and having an abstract
listener and such. The licensee class also mixed in stuff only needed by
the license service (acknowledgement messages).

This change collapses all the methods from licensees into
XPackLicenseState. The naming was inconsistent across licensee
implementations, so here it is standardized on `is*Allowed()`. There are
also a number of tests which should be consolidated for testing the
license service but that is left for a future change. I also removed
collector tests that were testing license: that is better left for the
direct tests of the license state in XPackLicenseStateTests.

Original commit: elastic/x-pack-elasticsearch@734871e870
2016-07-23 16:55:04 -07:00
Ryan Ernst d734d483c5 Merge pull request elastic/elasticsearch#2902 from rjernst/license_state_removal
Internal: Removed LicenseState enum

Original commit: elastic/x-pack-elasticsearch@13abacbb78
2016-07-22 14:25:19 -07: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
Ryan Ernst 7fcf05dcb1 Internal: Removed LicenseState enum
The LicenseState class exists to distinguish when a license is enabled,
vs being inside its grace period. However, the consumers of this state
do not care whether the license is in the grace period, they view that
and an active license as the same thing. The only part that cares about
the grace period is in the license service which logs a warning when a
license begins its grace period.

This change removes the LicenseState enum in favor of a simple boolean
indicating whether the license is active.

Original commit: elastic/x-pack-elasticsearch@5a90a0e3d4
2016-07-22 11:30:56 -07:00
Ryan Ernst dcb9145b93 Merge pull request elastic/elasticsearch#2891 from rjernst/license_service_name
Rename LicensesService to LicenseService

Original commit: elastic/x-pack-elasticsearch@e9c3058ca1
2016-07-22 08:47:06 -07: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