Commit Graph

1165 Commits

Author SHA1 Message Date
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
Jason Tedor f4ba670b25 Cleanup Netty handshake waiting handlers
This commit cleans up the Netty handshake waiting handlers. We rename
the Netty 3 implementation to include "Netty3" in the name, the Netty 4
implementation is not needed, and we improve the handling of waiting for
the handshakes to complete when connecting.

Original commit: elastic/x-pack-elasticsearch@f736fdc8f0
2016-08-02 23:55:20 -04:00
Ryan Ernst cdae14a5b9 Switch to NamedWriteable pull based extension in xpack
This is the xplugins side of elastic/elasticsearchelastic/elasticsearch#19764. It converts
the one use of registering custom NamedWriteable readers in xpack for
xpack feature sets to register them up front with the new pull based
registration.

Original commit: elastic/x-pack-elasticsearch@48e2020816
2016-08-02 16:00:06 -07:00
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
Daniel Mitterdorfer a8017c4968 Restore interruption flag correctly in life cycle service
Original commit: elastic/x-pack-elasticsearch@c9b0754811
2016-07-29 11:08:22 +02: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
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
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
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 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
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
Ryan Ernst a93a5fcd5b Rename LicensesService to LicenseService
We only have one license in 5.x. This change renames the service that
mantains the license state on each node to reflect that fact.

Original commit: elastic/x-pack-elasticsearch@bb241b30cb
2016-07-21 11:59:52 -07: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
Jim Ferenczi bd91603f6d Sort plugins in list x-pack extensions command
Fix tests that rely on deterministic order.

Original commit: elastic/x-pack-elasticsearch@324b0db514
2016-07-20 19:45:10 +02:00
Britta Weber 75362e70a3 fix compile
Original commit: elastic/x-pack-elasticsearch@d234e88c22
2016-07-20 19:24:56 +02:00
Ryan Ernst 59c76e1bc6 Merge pull request elastic/elasticsearch#2873 from rjernst/deguice11
Remove guice from authentication and authorization services

Original commit: elastic/x-pack-elasticsearch@323540a4eb
2016-07-20 08:52:25 -07:00
Jim Ferenczi 7467652b43 Add verbose mode for extension list command
This is a late follow up of https://github.com/elastic/elasticsearch/pull/18051
Closes elastic/elasticsearch#2806

Original commit: elastic/x-pack-elasticsearch@d1c9a3d7c5
2016-07-20 14:37:36 +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
Ryan Ernst 94b9b332d4 Internal: Remove interfaces for auth services
Both AuthenticationService and AuthorizationService are currently
interfaces with single implementations. This is unnecessary, and makes
it harder to deguice. This change removes the abstractions and leaves
just AuthenticationService and AuthorizationService.

Original commit: elastic/x-pack-elasticsearch@d04c897ae4
2016-07-19 14:38:51 -07:00
Ryan Ernst 6c7a9af7bf Internal: Remove use of AuditTrail interface in place of
AuditTrailService

We currently have a number of actions and components which try to write
to the audit trail. But they do so by expecting a bound AuditTrail
object. In reality, this should always be AuditTrailService, except when
security is disabled. This change removes the use of the AuditTrail
interface for that purpose, and instead makes the AuditTrailService
allow an empty list of trails, so that it is always bound when running
on a node.

Original commit: elastic/x-pack-elasticsearch@9559dbd6c1
2016-07-19 13:41:19 -07:00
jaymode 9be5c7df60 security: remove SelfReSchedulingRunnable
This commit removes the SelfReschedulingRunnable and changes the native stores
to use the threadpool for scheduling again since we have now fixed the issue in core.

Original commit: elastic/x-pack-elasticsearch@50030e31ff
2016-07-19 12:19:52 -04:00
Ryan Ernst 4552df11da Merge pull request elastic/elasticsearch#2860 from rjernst/deguice12
Internal: Simplify SecurityContext dependencies

Original commit: elastic/x-pack-elasticsearch@74d0036e80
2016-07-19 09:05:26 -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 5c31e20746 Use ContentType constant instead of RestClient#JSON_CONTENT_TYPE
Original commit: elastic/x-pack-elasticsearch@6f3165b569
2016-07-19 16:42:32 +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
Yannick Welsch ea7ad5d4c5 Add new transport handler introduced by elastic/elasticsearchelastic/elasticsearch#19287
Original commit: elastic/x-pack-elasticsearch@8e71782cba
2016-07-19 14:56:51 +02:00
Martijn van Groningen 7c12fa0eb6 Removed basic sanity test as it caused problems for the clients
Original commit: elastic/x-pack-elasticsearch@1bd7c82708
2016-07-19 10:59:23 +02:00
Martijn van Groningen cc7cfb7fd9 security: Added `set_security_user` ingest processor that enriches documents with user details of the current authenticated user
This is useful if an index is shared with many small customers, which are to small to have their own index or shard,
 and in order to share an index safely they will need to use document level security. This processor can then automatically
 add the username or roles of the current authenticated user to the documents being indexed, so that the DLS query can be simple. (`username: abc` only return data inserted by user abc)

Closes elastic/elasticsearch#2738

Original commit: elastic/x-pack-elasticsearch@f4df2f6d6f
2016-07-19 09:48:52 +02:00
Ryan Ernst a76a6b4e54 Internal: Simplify SecurityContext dependencies
Currently the security context is an object passed around to code
needing to check the user for the current request. Like recent
InternalClient changes, it current depends on the AuthenticationService,
but can be simplified by only knowing about the thread context and
crypto service. This change makes SecurityContext a class, instead of an
interface, and removes the dependency on AuthenticationService.

Original commit: elastic/x-pack-elasticsearch@b8af75e8cb
2016-07-18 17:00:55 -07:00
Ryan Ernst 41eea741b8 Ensure index audit trail is bound for security lifecycle service
Original commit: elastic/x-pack-elasticsearch@bbe7ec0802
2016-07-18 15:13:10 -07:00
Ryan Ernst 411b29e7fa Merge branch 'master' into deguice9
Original commit: elastic/x-pack-elasticsearch@2474231dc1
2016-07-18 14:25:49 -07: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 f03683fb18 Internal: Remove guice from audit trail construction
This change removes guice from audit trails.

Original commit: elastic/x-pack-elasticsearch@ace1f11dc4
2016-07-18 13:59:51 -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
jaymode 67f473a992 test: mute ldap timeout tests
See elastic/elasticsearch#2849

Original commit: elastic/x-pack-elasticsearch@318307073e
2016-07-18 11:20:52 -04: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
jaymode 34d04a8c78 security: mention comma-separated for IP and DNS name prompts
Original commit: elastic/x-pack-elasticsearch@3e58fc282a
2016-07-18 08:53:17 -04:00
jaymode 59fcb205b5 security: active directory and ldap realm improvements
This commit is a combination of enhancements and fixes to the active directory
and ldap realms. The active directory realm has been enhanced to add support
for authentication against multiple domains in a forest. The ldap realm has
been updated so that:

* attributes required for group resolution are loaded eagerly if possible
* user search can now be executed using unpooled connections
* the default search filter for groups now includes posixGroup and memberUid
to avoid users needed to understand ldap filters

Finally, the UnboundID LDAP SDK was upgraded to the latest version and some
long standing AwaitsFix were addressed.

Closes elastic/elasticsearch#20
Closes elastic/elasticsearch#26
Closes elastic/elasticsearch#1950
Closes elastic/elasticsearch#2145
Closes elastic/elasticsearch#2363

Original commit: elastic/x-pack-elasticsearch@63c9be2337
2016-07-18 08:39:57 -04:00
jaymode 5be3832889 security: add metadata to roles
This commit adds the ability to define metadata for roles. This metadata is currently
only used for the API and to indicate that a role is reserved. We can continue passing
on the metadata as needed, when necessary.

Closes elastic/elasticsearch#2036

Original commit: elastic/x-pack-elasticsearch@8b5f606138
2016-07-18 08:11:43 -04:00
jaymode f42f8cf756 security: add tool to simplify creation of certificate and csr files
This commit adds a CLI tool that can be used to generate a CA and signed certificates in PEM
format. The tool only requires a name of an instance to be provided by the user; ip and dns values
are supported but optional. By default, the tool is interactive and will prompt the user for input but
an option exists to provide a yaml file that contains the necessary information to generate certificates
or signing requests.

The output is in the form of a zip file with subfolders for each instance. Neither the zip file or the PEM
files are encrypted as some parts of our stack do not support encrypted PEM files.

Original commit: elastic/x-pack-elasticsearch@3dc0f8d495
2016-07-18 07:50:17 -04:00
Alexander Reelsen c7e4f51d56 Watcher: Prioritize configured response content type in HttpInput (elastic/elasticsearch#2790)
When a HTTP input has a configured response content, then this should
always be treated as preferred over the content type that is returned
by the server in order to give the user the power to decide.

This also refactors the code a bit to make it more readable.

Closes elastic/elasticsearch#2211

Original commit: elastic/x-pack-elasticsearch@ecdb4f931c
2016-07-18 10:54:48 +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 525562e48f Add tests for realm construction
Original commit: elastic/x-pack-elasticsearch@a35c103726
2016-07-15 21:36:22 -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
Chris Earle 1311935122 [Monitoring] Add Request Cache to returned stats for tests
Original commit: elastic/x-pack-elasticsearch@9bc34609c5
2016-07-15 12:51:43 -04:00
Areek Zillur 0db0e2f0c9 Implements cloud_internal license type
"cloud_internal" license type enables dynamically updating license operation mode via a config file.

When the installed license is "cloud_internal", the node level operation mode can be updated by writing
a `license_mode` file in the x-pack config directory (config/x-pack/license_mode). The file is expected
to have a string representing the desired license mode (e.g. "gold", "basic"). In case of a failure to
read a valid license mode from the `license_mode` file, the operation mode for "cloud_internal" license
defaults to PLATINUM.
This change also ensures that the correct operation mode is reported via the _xpack endpoint.

closes elastic/elasticsearch#2042

Original commit: elastic/x-pack-elasticsearch@6a2d788e45
2016-07-15 12:08:34 -04:00
Ryan Ernst 8407f6aaf6 Remove leftover guicyness from client ssl service
Original commit: elastic/x-pack-elasticsearch@f362097ad7
2016-07-15 08:25:59 -07:00
Ryan Ernst 07bb586f1e Remove guice from ssl services
This change removes guice from the client and server ssl services.

Original commit: elastic/x-pack-elasticsearch@d60f8ca474
2016-07-15 00:25:00 -07:00
Ryan Ernst fa26d3716b Merge branch 'master' into rest_headers
Original commit: elastic/x-pack-elasticsearch@28ee29cbe6
2016-07-14 20:20:10 -07:00
Ryan Ernst 394a4fc0c1 Remove unused var
Original commit: elastic/x-pack-elasticsearch@a0dd4600c2
2016-07-14 19:55:10 -07:00
Ryan Ernst f388ef01ed Merge branch 'master' into deguice2
Original commit: elastic/x-pack-elasticsearch@2d7264c2cf
2016-07-14 19:51:58 -07:00
Ryan Ernst b562a83c0b Fix subclasses that no longer need RestController
Original commit: elastic/x-pack-elasticsearch@d762c5f0bb
2016-07-14 19:31:58 -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
Jason Tedor 29387eab21 Monitoring index name resolver test awaits fix
This commit moves an awaits fix from
MonitoringIndexNameResolverTestCase#testResolver to
MonitoringIndexNameResolverTestCase#testSource as the previous commit
elastic/x-pack@98e76642ea marked the incorrect test as
awaits fix.

Original commit: elastic/x-pack-elasticsearch@62e9aaa628
2016-07-14 19:52:00 -04:00
Jason Tedor 3c0e83990b Monitoring index name resolver test awaits fix
This commit adds an awaits fix to
MonitoringIndexNameResolverTestCase#testResolver as awaits fix.

Original commit: elastic/x-pack-elasticsearch@586eb37f43
2016-07-14 19:46:05 -04:00
Ryan Ernst e3defb4dbd Internal: Remove guice cyclic dependency with InternalClient
The InternalClient is used by xpack code making requests to other nodes,
to add the xpack user to the thread context. To do this, it uses has a
dependency on the AuthenticationService, which in turn transitively
depends on InternalClient (eg IndexAuditTrail). But to add the xpack
user, the full authentication service is not necessary. Only having the
crypto service is needed in order to encrypt the header.

This change simplifes construction of InternalClient both making it a
real class instead of an interface, and removing the dependency on the
AuthenticationService. It also removes the use of
Provider<InternalClient> in users of the client.

Original commit: elastic/x-pack-elasticsearch@10f633bdf3
2016-07-14 13:46:07 -07:00
Ryan Ernst f481dea1d0 Internal: Remove use of Transport in audit trails
Both logfile and index audit trails currently depend on injection of
Transport in order to find the bound address of the local node. However,
the ClusterService provides access to information about the local node,
including the bound addresses. This change makes the audit trails use
the cluster service, and also makes the logging audit trail not use a
lifecycle.

Original commit: elastic/x-pack-elasticsearch@d747d64ee1
2016-07-14 11:22:41 -07:00
Chris Earle 4224d70986 [Monitoring UI] Use same Index Memory chart for Index page as Node page
This provides the same -- more useful -- index memory chart to the index page, instead of just "Lucene Memory", it now breaks down what it shows just like the Node page as as more generalized "Index Memory" chart. It also rolls Fielddata into the Index Memory. With Fielddata now in the Index Memory chart, I decided to add the Segment Count chart to the Index page.

Original commit: elastic/x-pack-elasticsearch@4e3490ce9c
2016-07-14 13:26:43 -04: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
Ryan Ernst 7f6788af1a Fix line length
Original commit: elastic/x-pack-elasticsearch@50e9ef0667
2016-07-13 17:05:32 -07:00
Ryan Ernst f82fa65d7d Internal: Remove guice construction of most license classes
This change removes some of the complexity around licensing classes in
xpack. It removes the interfaces for registration and management so the
remaining LicensesService class is the thing that components wanting to
interact with the license should use. It also removes complexity around
the Licensee interface, removing generics and the registration at
construction time, as well as making the licensees no longer have a
lifecycle. There is still more to be done with simplification of license
classes construction, but this is a step towards a simpler world.

Original commit: elastic/x-pack-elasticsearch@5307d67b5b
2016-07-13 14:23:23 -07:00
Chris Earle 870a855827 [License] Fix expected endpoint from [_xpack/_license] to [_xpack/license]
Original commit: elastic/x-pack-elasticsearch@7a48bc674c
2016-07-13 16:06:02 -04:00
Chris Earle 2c3a0db9ec [Watcher] Fix typoed deprecated endpoint
{actions/_ack was accidentally duplicated. It should be _ack/{actions} in the first case.

Original commit: elastic/x-pack-elasticsearch@38895522b5
2016-07-13 14:57:52 -04:00
Areek Zillur b674e016cb [TEST] ensure test license registration is always acknowledged
Original commit: elastic/x-pack-elasticsearch@3a928ba54a
2016-07-13 14:29:39 -04:00
Chris Earle a7c884be61 [License] 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...).

- This also adds deprecated `/_licenses` variants of the endpoint. Users are consistently making that mistake, and it's easy enough to support this way. Can remove it if people disagree though.

License portion only

Original commit: elastic/x-pack-elasticsearch@431c871fcf
2016-07-13 13:36:05 -04:00
Chris Earle 641caabdae [Watcher] 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...).

- This also changes from PUT _start, _restart, _stop (Watcher endpoints) to POST _start, _restart, _stop
    - The deprecated variant still honors PUT
- Nothing about the hijack endpoints was deprecated because they did not change from 2.x

Watcher portion only

Original commit: elastic/x-pack-elasticsearch@36f87a6526
2016-07-13 13:23:10 -04:00
Karel Minarik 63add2c959 Monitoring: Added `timeout: 60s` to the setup section of "Bulk indexing of monitoring data" test
When the monitoring tests are run in isolation, they succeed. However, when the whole suite of
REST tests is being run at the same time, the "Bulk indexing of monitoring data" intermittently
fails with a timeout. Therefore, a timeout of 60 seconds has been added.

Closes elastic/elasticsearch#2809

Original commit: elastic/x-pack-elasticsearch@d11dc7a2be
2016-07-13 17:40:20 +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
Simon Willnauer 89f98c60dc [TEST] Use valid file extension for mapping tests
Original commit: elastic/x-pack-elasticsearch@080699aeb8
2016-07-13 10:37:08 +02:00
Simon Willnauer 691bdfcf14 Merge pull request elastic/elasticsearch#2792 from elastic/modularize_netty
this is a followup for elastic/elasticsearchelastic/elasticsearch#19392 Modularizing Netty

Original commit: elastic/x-pack-elasticsearch@504c8110dd
2016-07-13 09:52:34 +02:00
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 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 6522f49d83 Add MockNettyPlugin to sidestep permissions assertion in pseudo integ tests
Original commit: elastic/x-pack-elasticsearch@9e7f6532fb
2016-07-12 17:56:06 +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
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 a2359d13f3 Add jar dependency on netty module
Original commit: elastic/x-pack-elasticsearch@f653855378
2016-07-11 23:57:08 -07: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
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
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
Areek Zillur 3150bfa876 Simplify expiry callback code
Original commit: elastic/x-pack-elasticsearch@56e8e19048
2016-07-06 17:09:20 -04:00
Robert Muir 2583e9cd97 support negated set (denied fields) in FieldSubsetReader
Original commit: elastic/x-pack-elasticsearch@0a54417175
2016-07-06 16:58:03 -04:00
Chris Earle dbe189b064 [Monitoring] Decouple Kibana Stats Publishing from Application Version
This changes the way that Kibana (and future applications) send their monitoring stats to Elasticsearch.

Instead of sending their payloads with the System ID (e.g., "kibana") and System Version (e.g., "5.0.0-alpha4"), it now expects the System ID and System _API_ Version (e.g., "2"). This means a few things:

- Future releases are automatically compatible with previous releases as long as the API version doesn't change.
- Users don't have to update Kibana at the exact same time as their cluster (which technically means rolling updates were temporarily blockers of Kibana monitoring before).
- We can accept old API versions (if we need to make a breaking change) and automatically up-convert them to the latest API version. (We are in full control of how far back we choose to accept)

In general, this change implies that users should be updating their Monitoring cluster before their _monitored_ cluster(s) to get the best opportunity of monitoring backwards compatibility. That way if any API change does occur, then it can up-convert as needed. Then, any ES node should be updated, and only then should Kibana be updated. This is not required in any way, but it will give the smoothest experience.

Original commit: elastic/x-pack-elasticsearch@d3c24936e1
2016-07-06 11:24:22 -04:00
Chris Earle acaefe89fa [Security] Check CryptoService for null before using
While testing another PR, I noticed that when Security is disabled, the _xpack/usage API throws a NullPointerException.

This checks for null before using it, and adds tests to verify behavior.

Original commit: elastic/x-pack-elasticsearch@6474af6569
2016-07-06 11:20:03 -04:00
Ryan Ernst dec8319d77 Merge branch 'master' into less_drugs
Original commit: elastic/x-pack-elasticsearch@fde8483759
2016-07-05 20:48:12 -07:00
Areek Zillur b1886ce978 address feedback
Original commit: elastic/x-pack-elasticsearch@f6b1d58c5b
2016-07-05 16:07:50 -04:00
Jason Tedor 3577389f95 Rename writeThrowable to writeException
This commit is a response to upstream change
elastic/elasticsearch@96f283c195.

Original commit: elastic/x-pack-elasticsearch@2e485d4e76
2016-07-05 14:46:50 -04:00
Areek Zillur ce10289540 update to master
Original commit: elastic/x-pack-elasticsearch@9bc098f879
2016-07-05 11:29:30 -04:00
Areek Zillur d88e1ddb27 Merge branch 'master' into simplify_license_service_scheduling
Original commit: elastic/x-pack-elasticsearch@faa20465e4
2016-07-05 10:51:40 -04:00
Areek Zillur 3c5fca12ba cleanup unit tests
Original commit: elastic/x-pack-elasticsearch@f759f45b7f
2016-07-05 10:15:01 -04:00
Adrien Grand 5533470959 master is now 5.0.0-alpha5
Original commit: elastic/x-pack-elasticsearch@ce2a255cde
2016-07-05 15:27:27 +02:00
jaymode e861608c59 security: extend usage stats
This commit extends the usage stats to include the usage of ssl, ip filtering, auditing,
system key, field and document level security, and the number of roles.

See elastic/elasticsearch#2210

Original commit: elastic/x-pack-elasticsearch@e44c5748ba
2016-07-05 08:57:25 -04: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 f1670a3845 Rename UserError
The top-level class Throwable represents all errors and exceptions in
Java. This hierarchy is divided into Error and Exception, the former
being serious problems that applications should not try to catch and the
latter representing exceptional conditions that an application might
want to catch and handle. This commit renames
org.elasticsearch.cli.UserError to org.elasticsearch.UserException to
make its name consistent with where it falls in this hierarchy.

Relates elastic/elasticsearch#2701

Original commit: elastic/x-pack-elasticsearch@589e159ec0
2016-07-04 19:22:46 -04:00
Boaz Leskes 8cc49b5b30 Remove DummyTransportAddress (elastic/elasticsearch#2048)
this is a partner PR to elastic/elasticsearchelastic/elasticsearch#17811

Original commit: elastic/x-pack-elasticsearch@1db11e4340
2016-07-04 21:09:53 +02:00
Tanguy Leroux bd0cf521aa Enable Checkstyle RedundantModifier
Original commit: elastic/x-pack-elasticsearch@7455e88dce
2016-07-04 15:17:50 +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
Colin Goodheart-Smithe b008a4de74 fixes package declarations in security tests
Original commit: elastic/x-pack-elasticsearch@09ed28aee3
2016-07-04 10:28:13 +01:00
Nik Everett 98f34c1120 Handle core removing addField
It is addStoredField now.

Original commit: elastic/x-pack-elasticsearch@c42c18894f
2016-07-04 09:36:36 +02:00
Ryan Ernst 03cbf82101 Remove WatcherSettingsValidation service
This looks like it predates settings validation in core, and only had a
single use inside the watcher ExecutionService. This change moves the
settings inside ExecutionService to be validated settings, and removes
the watcher specific validation.

Original commit: elastic/x-pack-elasticsearch@82843ce56c
2016-07-02 15:51:09 -07:00
Ryan Ernst d6ff6211eb Merge pull request elastic/elasticsearch#2685 from rjernst/uninject_htmlsanitizer
Uninject HtmlSanitizer

Original commit: elastic/x-pack-elasticsearch@4a6c8cdee6
2016-07-01 16:26:57 -07:00
Ryan Ernst 9f52066bdb Removed generics from LifecycleComponent
This is the xplugins side of elastic/elasticsearch#19225

Original commit: elastic/x-pack-elasticsearch@845a945552
2016-07-01 16:23:13 -07:00
Ryan Ernst 09c8418a50 Fix xpack tests with node info ctor changes
Original commit: elastic/x-pack-elasticsearch@c741a2d231
2016-07-01 14:15:19 -07:00
Ryan Ernst 36a8c24b6b Uninject HtmlSanitizer
This is just a utility used by the email action and does not need to be
injected.

Original commit: elastic/x-pack-elasticsearch@4555db634c
2016-07-01 13:45:16 -07:00
Tanguy Leroux 561fc86585 Fix checkstyle violations
Original commit: elastic/x-pack-elasticsearch@187f1cbd35
2016-07-01 17:13:08 +02:00
Tanguy Leroux 17684f1e76 Fix order of modifiers
Original commit: elastic/x-pack-elasticsearch@1f970e78ba
2016-07-01 16:54:53 +02:00
Simon Willnauer 158a6b5588 Cleanup BytesRefrence interface (elastic/elasticsearch#2670)
This is a followup of elastic/elasticsearchelastic/elasticsearch#19196

Original commit: elastic/x-pack-elasticsearch@1d0398e89a
2016-07-01 16:09:53 +02:00
Alexander Reelsen 6527683e48 Licensing: Return HTTP 403 forbidden instead of 401 in exception (elastic/elasticsearch#2673)
When a license exception is raised, we returned 401 as HTTP error code
in there. However this seems to have triggered some browsers to actually
ask for login credentials, which wont have any impact here.

Closes elastic/elasticsearch#1863

Original commit: elastic/x-pack-elasticsearch@cc63abdac8
2016-07-01 14:32:42 +02:00
javanna 4eb21f4c01 [TEST] eagerly parse response body at ObjectPath initialization and read content type from response headers
We are going to parse the body anyways whenever it's in json format as it is going to be stashed. It is not useful to lazily parse it anymore. Also this allows us to not rely on automatic detection of the xcontent type based on the content of the response, but rather read the content type from the response headers.

Original commit: elastic/x-pack-elasticsearch@11be4684ae
2016-07-01 09:49:47 +02:00
javanna 579baa2bca [TEST] make JsonPath independent of data format, rename to ObjectPath
The internal representation of the object that JsonPath gives access to is a map. That is independent of the initial input format, which is json but could also be yaml etc.
This commit renames JsonPath to ObjectPath and adds a static method to create an ObjectPath from an XContent

Original commit: elastic/x-pack-elasticsearch@bc84c68161
2016-07-01 09:49:47 +02:00
Ryan Ernst 8d6d96d2f8 Merge pull request elastic/elasticsearch#2658 from rjernst/rest_handler_client
Change rest handler interface to use NodeClient

Original commit: elastic/x-pack-elasticsearch@82da58cc0c
2016-06-30 11:00:14 -07:00
Jay Modi 060120b53d Merge pull request elastic/elasticsearch#2660 from jaymode/rest_test_teardown
test: move teardown logic into the rest tests

Original commit: elastic/x-pack-elasticsearch@81a273a4c7
2016-06-30 12:03:07 -04:00
Boaz Leskes 7c1bc0c8de adapt randomFrom to not use null as a first param, in preparation for https://github.com/elastic/elasticsearch/pull/19172
Original commit: elastic/x-pack-elasticsearch@50296d6cfc
2016-06-30 17:55:17 +02:00
Lee Hinman 8c54887ab8 Merge remote-tracking branch 'dakrone/migrate-tool-master'
Original commit: elastic/x-pack-elasticsearch@ce82529d4b
2016-06-30 09:53:52 -06:00
jaymode 4999f3a38c test: remove unnecessary teardown section in license test
Original commit: elastic/x-pack-elasticsearch@b457404452
2016-06-30 11:39:37 -04:00
Lee Hinman 238eed2075 Throw correct exception type, reduce boilerplate in boolean statement
Original commit: elastic/x-pack-elasticsearch@1e33c4d8f2
2016-06-30 09:34:08 -06:00
Ryan Ernst 82e4330e87 Merge branch 'master' into rest_handler_client
Original commit: elastic/x-pack-elasticsearch@7fcc120767
2016-06-30 08:16:50 -07:00
jaymode d1b945d1f2 security: remove user/role deletion logic in XPackRestTestCase
Original commit: elastic/x-pack-elasticsearch@d6064e520a
2016-06-30 11:15:05 -04:00
Karel Minarik 67706a9a19 [SECURITY] Changed the setup/teardown YAML structure in the integration test for roles
Related: 176fd6a

Original commit: elastic/x-pack-elasticsearch@90e210dbc2
2016-06-30 11:15:05 -04:00
Karel Minarik 6d535043f8 [SECURITY] Added a `teardown` section to the integration test for roles
Currently, the REST tests for security (and possibly others) don't clean up the environment
after they have run, eg. they don't delete the users and roles they create. This leads to
test failures, because in a subsequent run, a user or role already exists, so eg. a test
like `match: { role: { created: true } }` fails.

This patch adds a `teardown` section to the test, with `do` actions which are to be
executed _after_ the test runs.

This patch assumes that REST tests runners for all languages support the `teardown` directive
in a xUnimt nomenclature -- similarly to the `setup` directive, which they already support.

Original commit: elastic/x-pack-elasticsearch@70d0ff4ee9
2016-06-30 11:15:05 -04:00
Simon Willnauer 30dd9ab09c Follup PR fore elastic/elasticsearchelastic/elasticsearch#19096 (elastic/elasticsearch#2656)
This PR is a cleanup / follup for elastic/elasticsearchelastic/elasticsearch#19096

Original commit: elastic/x-pack-elasticsearch@052b9a85a7
2016-06-30 13:42:09 +02:00
Martijn van Groningen 7c988b78e1 test: test that DLS is applied before FLS
Original commit: elastic/x-pack-elasticsearch@c7c12cc8d6
2016-06-30 12:32:37 +02:00
Ryan Ernst b513f2bb6b Merge branch 'master' into script_service_deps
Original commit: elastic/x-pack-elasticsearch@d4269e190d
2016-06-29 23:35:29 -07:00
Ryan Ernst 0fcb52a794 Merge branch 'master' into rest_handler_client
Original commit: elastic/x-pack-elasticsearch@429edeea84
2016-06-29 17:03:27 -07:00
Ryan Ernst 7822f28d7b Simplify rest handler constructors
This is the xplugins side of moving the client dependency for rest
handlers to the handleRequest method

Original commit: elastic/x-pack-elasticsearch@ce66e35e7b
2016-06-29 16:30:55 -07:00
Nik Everett 672d91f2a4 Move rest handler registration to ActionPlugin
Original commit: elastic/x-pack-elasticsearch@b3bc7d4a9f
2016-06-29 18:32:58 -04:00
Lee Hinman 92637d2eec Use client http ssl settings if applicable
Original commit: elastic/x-pack-elasticsearch@c74116d40a
2016-06-29 15:00:39 -06:00
Lee Hinman 4d7d9ad5b9 get the SSL status from the node settings
Original commit: elastic/x-pack-elasticsearch@6fff3e6ce1
2016-06-29 10:07:23 -06:00
Lee Hinman 27fb1e036e switch to RoleDescriptor jsonification, rename esusersSettings -> fileRealmSettings
Original commit: elastic/x-pack-elasticsearch@a7181a329a
2016-06-29 09:56:52 -06:00
jaymode b06249279e security: REST spec cleanup and authenticate tests create user
This change cleans up the rest API specs and changes the documentation field to a link. Additionally,
the integration tests for xpack now use the elastic user rather than a dummy user from a file realm.

Closes elastic/elasticsearch#2458
Closes elastic/elasticsearch#2437

Original commit: elastic/x-pack-elasticsearch@8059a0d856
2016-06-29 11:42:44 -04:00
Lee Hinman b4c19734ac Fail hard if retrieving user/role fails or adding user/role fails
Original commit: elastic/x-pack-elasticsearch@d641dab31c
2016-06-29 09:37:59 -06:00
Lee Hinman 24d7472cea Fix compilation for missing client
Original commit: elastic/x-pack-elasticsearch@586c5d0716
2016-06-29 09:37:47 -06:00
Lee Hinman db39da77c5 Merge remote-tracking branch 'origin/master' into migrate-tool-master
Original commit: elastic/x-pack-elasticsearch@eaa4b2923f
2016-06-29 09:30:07 -06:00
Lee Hinman ca1d92409f Move setup into a @Before method
Original commit: elastic/x-pack-elasticsearch@21b8cb5be3
2016-06-29 09:29:46 -06:00
Lee Hinman 26000c324d Move comment to be in correct place
Original commit: elastic/x-pack-elasticsearch@51fb594e9b
2016-06-29 09:29:38 -06:00
Tanguy Leroux a06f4a02fd Rename Marvel packages and directories to Monitoring
related to elastic/elasticsearch#2383

Original commit: elastic/x-pack-elasticsearch@7f4001a031
2016-06-29 09:10:25 +02:00
Ryan Ernst 2d0055de35 Make script service a cluster state listener
Original commit: elastic/x-pack-elasticsearch@dc763f3d66
2016-06-28 14:06:53 -07:00
Areek Zillur 0e39df71f6 Merge branch 'master' into simplify_license_service_scheduling
Original commit: elastic/x-pack-elasticsearch@2f32594297
2016-06-28 13:11:52 -04:00
Yannick Welsch 1762d1d96c Fix wrong logger usages
Relates to elastic/elasticsearchelastic/elasticsearch#19126

Original commit: elastic/x-pack-elasticsearch@e644f2bd9c
2016-06-28 16:46:31 +02:00
Nik Everett 6f6426b444 Switch plugin action registration to pull
Original commit: elastic/x-pack-elasticsearch@2154918b6e
2016-06-28 08:56:54 -04:00
Jason Tedor b378ff780b Modify poll interval setting in native realm test
This commit modifies the construction of the poll interval setting in
the native realm tests in response to upstream change
elastic/elasticsearchelastic/elasticsearch#2f638b5a23597967a98b1ced1deac91d64af5a44.

Original commit: elastic/x-pack-elasticsearch@c6f60f51f4
2016-06-27 18:43:33 -04:00
Lee Hinman a289fbd168 Add a tool to migrate users/roles from file to native realm
This adds the `bin/shield/migrate` tool that allows migrating users and
roles from the files to the native (API-based) store.

It looks like this:

```
λ bin/shield/migrate native -U http://localhost:9200 -u test_user -p changeme -n lee,foo -r role1,role2,role3,role4,foo
starting migration of users and roles...
importing users from [/home/hinmanm/scratch/elasticsearch-2.4.0-SNAPSHOT/config/shield/users]...
found existing users: [test_user, joe3, joe2]
migrating user [lee]
{"user":{"created":true}}
no user [foo] found, skipping
importing roles from [/home/hinmanm/scratch/elasticsearch-2.4.0-SNAPSHOT/config/shield/roles.yml]...
found existing roles: [marvel_user, role_query_fields, admin_role, role3, admin, remote_marvel_agent, power_user, role_new_format_name_array, role_run_as, logstash, role_fields, role_run_as1, role_new_format, kibana4_server, user, transport_client, role1.ab, role_query]
migrating role [role1]
{"role":{"created":true}}
migrating role [role2]
{"role":{"created":true}}
role [role3] already exists, skipping
migrating role [role4]
failed to migrate role [role4] with body: {"indices":[{"names":["idx2"]},{"names":["idx2"]},{"names":["idx1"]}]}
java.io.IOException: {"error":{"root_cause":[{"type":"parse_exception","reason":"failed to parse indices privileges for role [role4]. missing required [privileges] field"}],"type":"parse_exception","reason":"failed to parse indices privileges for role [role4]. missing required [privileges] field"},"status":400}
  at org.elasticsearch.shield.authc.esusers.tool.ESNativeRealmMigrateTool$MigrateUserOrRoles.postURL(ESNativeRealmMigrateTool.java:206)
  at org.elasticsearch.shield.authc.esusers.tool.ESNativeRealmMigrateTool$MigrateUserOrRoles.importRoles(ESNativeRealmMigrateTool.java:389)
  at org.elasticsearch.shield.authc.esusers.tool.ESNativeRealmMigrateTool$MigrateUserOrRoles.execute(ESNativeRealmMigrateTool.java:171)
  at org.elasticsearch.common.cli.CliTool.execute(CliTool.java:153)
  at org.elasticsearch.shield.authc.esusers.tool.ESNativeRealmMigrateTool.main(ESNativeRealmMigrateTool.java:91)
Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL: http://localhost:9200/_shield/role/role4
  at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1840)
  at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
  at org.elasticsearch.shield.authc.esusers.tool.ESNativeRealmMigrateTool$MigrateUserOrRoles.postURL(ESNativeRealmMigrateTool.java:192)
  ... 4 more

no role [foo] found, skipping
users and roles imported.
```

Original commit: elastic/x-pack-elasticsearch@3ce47c0ffd
2016-06-27 14:20:45 -06:00
Nik Everett a673c44036 Support IndicesModule list constructor
Original commit: elastic/x-pack-elasticsearch@c88e2b82b7
2016-06-27 15:04:17 -04:00
Boaz Leskes 62a46a2e8d revert elastic/x-pack@0513ff4168 as https://github.com/elastic/elasticsearch/pull/18992 was reverted as well
Original commit: elastic/x-pack-elasticsearch@febaaff840
2016-06-27 20:19:20 +02:00
Luca Cavanna b5bb2d2fdc Merge pull request elastic/elasticsearch#2576 from javanna/fix/xpack-rest-testcase-watcher
[TEST] remove start and stop watcher from XPackRestTestCase

Original commit: elastic/x-pack-elasticsearch@192be0db8b
2016-06-27 14:52:39 +02:00
Alexander Reelsen ebf00cc9e5 Dependencies: Upgrade jimfs to 1.1 removed unneeded guava calls (elastic/elasticsearch#2614)
Guava should only be used by the HTML sanitizer and no other code

Original commit: elastic/x-pack-elasticsearch@6a20674768
2016-06-27 11:07:15 +02:00
Alexander Reelsen 32c9f86124 Watcher: Support for inline attachments (elastic/elasticsearch#2601)
If an attachment is configured of disposition type INLINE, and is referred to
in HTML body parts, then some email clients can display images inside of an HTML
email and refer to those attachments.

Watcher already had support for inlined attachments, however this could not be configured
from a watch, but just via the Java API. Also it was not tested.

This commit changes the attachment to decide on creation if it should be inline or a regular
attachment and adds a test.

Relates elastic/elasticsearch#2381
Relates elastic/elasticsearch#2464
Closes elastic/elasticsearch#2557

Original commit: elastic/x-pack-elasticsearch@84935ffb18
2016-06-27 10:45:10 +02:00
Lee Hinman 4990296a5c Remove too-strict validation of role names
When parsing the privileges, we now no longer throw an exception if
there haven't been any names parsed out. This is not an issue though,
because we validate that the `names` array is not empty when we parse
it, and that it's not `null` before returning from the function.

Adds a rest test that sends things out of order to test this still
works.

Resolves elastic/elasticsearch#2606

Original commit: elastic/x-pack-elasticsearch@62a38bea8f
2016-06-24 12:00:24 -06:00
Alexander Reelsen f78f848681 Watcher: Fix acknowledgement REST API endpoints
Add new REST API endpoint to acknoweldging actions. The old endpoints
have not been removed as part of this PR, but can be in the next major
version.

Update the documentation to remove the parameter based example, and
mention that the old endpoints are going to be removed in the future.

Closes elastic/elasticsearch#2517

Original commit: elastic/x-pack-elasticsearch@e2558e9e1f
2016-06-24 16:50:35 +02:00
Tanguy Leroux 6ed9f50457 Fix SearchInputIT.testSearchInlineTemplate
The search type is overridden from default to query_and_fetch by the search action if the number of shards to request is equal to 1

Original commit: elastic/x-pack-elasticsearch@a9552c697c
2016-06-24 09:19:59 +02:00
Yannick Welsch 74efdd4a94 Disable failing test NodeStatsTests.testNodeStats
Original commit: elastic/x-pack-elasticsearch@954badc4a4
2016-06-23 13:36:06 +02:00
Tanguy Leroux a20fb42b70 Fix SearchInputIT.testSearchIndexedTemplate
Original commit: elastic/x-pack-elasticsearch@4011a7bc9b
2016-06-23 12:33:49 +02:00