Commit Graph

2840 Commits

Author SHA1 Message Date
jaymode aa2eb15f31 fixes to allow bad apple tests to pass
This commit fixes the bad apple tests that failed when running them. The
IndexAuditTrailEnabledTest was removed and the test was folded into the
IndexAuditIT. Some watcher tests that relied on mustache were moved
into the QA tests with the mustache plugin.

Additionally, fixing these tests uncovered a issue with the privileges needed
for writing data into an index. If the mappings need to be updated because
of a write, then the update mapping action gets executed. In 2.x this was
handled by the system user, but now is executed under the user's context,
which is the correct thing to do. The update mapping action is now added to
the read, index, crud, and write privileges for an index.

Original commit: elastic/x-pack-elasticsearch@30711f9625
2016-02-08 09:48:10 -05:00
Jason Tedor 7f5349db57 Avoid cloning Mac instances
This commit modifies the HmacSHA1Provider to return a thread local
instance of Mac instead of using clone since some providers do not
support clone.

Closes elastic/elasticsearch#1468

Original commit: elastic/x-pack-elasticsearch@cb38f5f9e8
2016-02-06 09:12:39 -05:00
Alexander Reelsen e6784d5c7d Checkstyle: Adhere to checkstyle in all xpack .java files
In elastic/elasticsearch#1442 checkstyle checks were added, but also some files were freed from this.
If we have support for checkstyle, we should check this for all files and not allow
exceptions. This commit removes the file list to ignore any files and fixes all the
java files.

Original commit: elastic/x-pack-elasticsearch@99e6cbc5be
2016-02-05 16:57:41 +01:00
Simon Willnauer 878d244a96 Fix compilation failures
Original commit: elastic/x-pack-elasticsearch@4afbf84c20
2016-02-05 16:07:46 +01:00
Tanguy Leroux 4488cacdd8 Marvel: Add permission for HTTPExporter + SSL support
See elastic/elasticsearch#1451

Original commit: elastic/x-pack-elasticsearch@5e3d87149e
2016-02-05 15:21:27 +01:00
Alexander Reelsen 93a3d3f570 Watcher: Ensure that HTTP headers are case insensitive in response
According to RFC 2616 HTTP headers are case insensitive.
But `HttpResponse#contentType()` only looks up for Content-Type.

This stores all header responses lower cased in the HTTP response.

Closes elastic/elasticsearch#1357

Original commit: elastic/x-pack-elasticsearch@c009be8365
2016-02-05 14:59:27 +01:00
Jason Tedor 166e8786ea Fix compilation from upstream XContentType changes
This commit fixes a compilation issue that arose from upstream changes
in core where some method names on XContentType were changed.

Closes elastic/elasticsearch#1463

Original commit: elastic/x-pack-elasticsearch@0a3763dbb5
2016-02-05 07:28:47 -05:00
Jim Ferenczi cc8ae273c9 Merge pull request elastic/elasticsearch#1462 from jimferenczi/rename_plugin_cmd
bin/plugin is now bin/elasticsearch-plugin

Original commit: elastic/x-pack-elasticsearch@8ecf75af66
2016-02-05 12:52:54 +01:00
Yannick Welsch 3dfb38b99e Change path separator for Checkstyle suppressions to be Windows compatible
Original commit: elastic/x-pack-elasticsearch@8850f753c7
2016-02-05 12:15:47 +01:00
Tanguy Leroux d70b49f42d Marvel: Add source_node information to marvel documents
This commit adds a new `source_node` field to all marvel documents that holds various information (node's name/ip/host/id/transport address) about the node that emitted the document.

(cherry picked from commit elastic/x-pack@29a411a931)

Original commit: elastic/x-pack-elasticsearch@66e057d334
2016-02-05 11:50:07 +01:00
Jim Ferenczi e18e537bef bin/plugin is now bin/elasticsearch-plugin
Original commit: elastic/x-pack-elasticsearch@077f2a6357
2016-02-05 10:31:58 +01:00
Lee Hinman 3aca93a316 Merge pull request elastic/elasticsearch#1458 from dakrone/dir-locals-140-limit
Update .dir-locals.el for enforced line length

Original commit: elastic/x-pack-elasticsearch@144e4026a9
2016-02-04 14:57:45 -07:00
Lee Hinman c4a5b187f8 Update .dir-locals.el for enforced line length
Also add compilation command

Relates to https://www.github.com/elastic/elasticsearch/pulls/16413

Original commit: elastic/x-pack-elasticsearch@5063ca2865
2016-02-04 14:55:41 -07:00
Nik Everett 9501f65f7e Merge pull request elastic/elasticsearch#1442 from nik9000/line_length_suppress
Opt some files out of 140 character line length

Original commit: elastic/x-pack-elasticsearch@7e5aa4a802
2016-02-04 16:45:48 -05:00
Ryan Ernst 1e315d5e85 Fix skipping install/upload for x-plugins to actually work
Original commit: elastic/x-pack-elasticsearch@39eb2f5c0f
2016-02-04 13:21:18 -08:00
Ryan Ernst 7e8bbe8f28 Build: Disable publishing to sonatype, until we have it configured correctly
Original commit: elastic/x-pack-elasticsearch@081be69ed7
2016-02-04 13:07:37 -08:00
Nik Everett 3fce245768 More line length suppressions
These snuck in overnight

Original commit: elastic/x-pack-elasticsearch@f25341fc8a
2016-02-04 15:37:54 -05:00
Nik Everett 3d7374054c Opt some files out of 140 character line length
If elasticsearch merges https://github.com/elastic/elasticsearch/pull/16413
then the build will fail catastrophically without this. The goal here is to
opt these files out of the line length checks while they don't pass and we
can get them passing as time permits and opt them back in. In the mean time
all files that pass the line length check will have the check enforced.

This also gives you a spot to add x-plugins opt outs for core's checkstyle
rules in case you have generated files or something like that.

Original commit: elastic/x-pack-elasticsearch@63a1ad2f79
2016-02-04 15:02:53 -05:00
jaymode 8996a3710a shield: remove deleted transport handlers
Original commit: elastic/x-pack-elasticsearch@a9803509d8
2016-02-04 13:31:11 -05:00
jaymode 8d70501f25 fix compilation due to TestShardRouting changes in core
Original commit: elastic/x-pack-elasticsearch@51f17b5b67
2016-02-04 13:21:40 -05:00
Ryan Ernst ab95b33df5 Terminal cleanup
This is the xplugins side of elastic/elasticsearchelastic/elasticsearch#16443

Original commit: elastic/x-pack-elasticsearch@1ab1b4b941
2016-02-04 02:06:37 -08:00
Simon Willnauer 4fa690dbb5 Merge pull request elastic/elasticsearch#1445 from s1monw/fix_settings_filtering
Cleanup settings filtering after elastic/elasticsearchelastic/elasticsearch#16425

Original commit: elastic/x-pack-elasticsearch@b10dd0589c
2016-02-04 10:16:21 +01:00
Simon Willnauer 09c8374cfe Merge branch 'master' into fix_settings_filtering
Original commit: elastic/x-pack-elasticsearch@ba664a5b79
2016-02-04 09:29:07 +01:00
Simon Willnauer d430a2ab5e Apply feedback from @uboness
Original commit: elastic/x-pack-elasticsearch@cb7c347657
2016-02-04 09:27:53 +01:00
Nik Everett 3ebe266d13 Merge pull request elastic/elasticsearch#1428 from nik9000/trask_status
Support task status

Original commit: elastic/x-pack-elasticsearch@9e2ca22b4a
2016-02-03 18:30:22 -05:00
Simon Willnauer 1c5d04c99b Cleanup settings filtering after elastic/elasticsearchelastic/elasticsearch#16425
This change registers all filtered settings up-front and removes all
the unnecessary wrappers around SettingsFilter. This is a pretty big
change and needs some review but after all things are generally simplified and
settings are always filtered even if shield is not enabled which is the right thing
todo.

Relates to elastic/elasticsearchelastic/elasticsearch#16425

Original commit: elastic/x-pack-elasticsearch@c7df85492b
2016-02-03 21:53:08 +01:00
Simon Willnauer 5abc2f836e Merge pull request elastic/elasticsearch#1440 from s1monw/migrate_to_strict_settings
Converte to strict settings infrastructure elastic/elasticsearchelastic/elasticsearch#16365

Original commit: elastic/x-pack-elasticsearch@e3b37de4f4
2016-02-03 14:29:44 +01:00
Simon Willnauer 11d4e69267 Add missing setting
Original commit: elastic/x-pack-elasticsearch@59db7b52fd
2016-02-03 14:09:42 +01:00
Simon Willnauer 610bd8c820 Merge branch 'master' into migrate_to_strict_settings
Original commit: elastic/x-pack-elasticsearch@608c37fa4c
2016-02-03 13:22:27 +01:00
Martijn van Groningen 3bf5dc14f9 revert change: 'test: fix tests to not use mustache' and instead moved these test to qa module
Original commit: elastic/x-pack-elasticsearch@502d877c24
2016-02-03 12:56:54 +01:00
Simon Willnauer 422163445e Converte to strict settings infrastructure elastic/elasticsearchelastic/elasticsearch#16365
Original commit: elastic/x-pack-elasticsearch@c877a21e2d
2016-02-03 11:28:17 +01:00
Martijn van Groningen 4d30dadba9 test: fix tests to not use mustache
Original commit: elastic/x-pack-elasticsearch@4a88d0d458
2016-02-03 10:47:35 +01:00
Martijn van Groningen e617d8365f watcher: Removed custom xmustache script and use mustache script engine in lang-mustache module
The lang-mustache module has been extended to meet Watcher's needs:
* The ability to refer the specific slots in arrays.
* An `content_type` option controls whether json string escaping is used. Otherwise there is no escaping.

Closes elastic/elasticsearch#1116

Other changes:
* I changed tests that were just using mustache just because it was around to not use mustache
* I moved tests to `test-xpack-with-mustache` module that were testing mustache with Watcher
* added smoke test for watcher and mustache
* moved some tests around
* instead of using DefaultTextTemplateEngine in watcher tests use MockTextTemplateEngine
* added a mock mustache script engine
* Cleanup some messy tests to not rely on mustache and move them back into xpack module
* moved array access test to smoke test watcher with mustache module
* test: simplified the condition search test to take the time component out of it, while still simulation a condition
* removed the mustache dependency in the messy-test-watcher-with-groovy module

Original commit: elastic/x-pack-elasticsearch@6a2a4e885f
2016-02-03 09:18:50 +01:00
Joe Fleming 29fbaf233f Merge pull request elastic/elasticsearch#1437 from tsullivan/kibana-marvel-fix-version-check-and-scripts
kibana marvel - fix version check for x-pack context

Original commit: elastic/x-pack-elasticsearch@54f8242a9e
2016-02-02 18:36:30 -07:00
uboness 266917e1bc fix build
More places where String.format was missing a Locale

Original commit: elastic/x-pack-elasticsearch@6e3df91526
2016-02-03 00:16:24 +01:00
uboness db003cd2a4 fix build
Added Local to String.format

Original commit: elastic/x-pack-elasticsearch@2c7368c3de
2016-02-02 23:12:36 +01:00
Tim Sullivan 042f93b362 Merge pull request elastic/elasticsearch#1395 from w33ble/kibana-packager
Kibana X-Pack Packager

Original commit: elastic/x-pack-elasticsearch@c2c6f22fd4
2016-02-02 14:43:24 -07:00
Joe Fleming 4f1ddff974 Merge pull request elastic/elasticsearch#1427 from tsullivan/kibana-marvel-xpack-updates
Kibana Marvel: Updates for getting consistent other X-Pack UI code

Original commit: elastic/x-pack-elasticsearch@8f3e7f8217
2016-02-02 14:35:52 -07:00
Lukas Olson 65e04d09dd Merge branch 'master' into kibana-shield-skip-ssl-check
Original commit: elastic/x-pack-elasticsearch@0862f14c8f
2016-02-02 13:38:01 -07:00
uboness ffab6da42d fix build with latest core changes
`Terminal.println(..)` doesn't support varargs arguments anymore

Original commit: elastic/x-pack-elasticsearch@533a4f7919
2016-02-02 20:57:05 +01:00
uboness e039ef412f Shield refactoring for 5.0
- Consolidated `InternalMarvelUser`, `InternalWatcherUser` and `InternalShieldUser` into a single `XPackUser` - this is the single internal user for xpack that has all the permissions internally required by xpack (for marvel, watcher and shield)

 - Renamed `InternalSystemUser` to `SystemUser`

 - Removed the notion of "reserved roles". Now that we have a single internal user we know its role. The authz service now checks to see if the current user is the internal xpack user, and if so, it just uses its role (and not trying to resolve it from the role store). With this model, it's no longer possible for outside users to use the internal role (it's fully internal)

 - Consolidated the notion of an `InternalClient` (in Marvel it was knows as the `SecuredClient`). This is an ES client that xpack is using to manage itself. If shield is enabled, it will execute all request on behalf of the internal xpack user.

 - Removed the verification of the license plugin on plugin installation - no need to do it anymore as the license plugin is part of the distribution.

Original commit: elastic/x-pack-elasticsearch@c851410f93
2016-02-02 18:05:01 +01:00
Tanguy Leroux 766fc3273b Fix compilation errors
From elasticsearch core commit 10b5ffcda5

Original commit: elastic/x-pack-elasticsearch@d77909332f
2016-02-02 10:31:21 +01:00
Ryan Ernst 7519d035a7 Switch to UserError for cli tools
This is the xplugins side of elastic/elasticsearchelastic/elasticsearch#16359

Original commit: elastic/x-pack-elasticsearch@547b3f50e0
2016-02-01 17:38:42 -08:00
Nik Everett 8fe5afd8a7 Support task status
This is the x-content buddy of https://github.com/elastic/elasticsearch/issues/16344

Original commit: elastic/x-pack-elasticsearch@db216f7b46
2016-02-01 18:18:45 -05:00
Joe Fleming 025a3713e7 Merge pull request elastic/elasticsearch#1386 from w33ble/ssh-dep
ES client - use ssh instead of https

Original commit: elastic/x-pack-elasticsearch@2fe24ab634
2016-02-01 14:18:06 -07:00
Tim Sullivan 9e38767fc8 Merge pull request elastic/elasticsearch#1407 from w33ble/fix/marvel-pack
Fixed to accommodate Packs

Original commit: elastic/x-pack-elasticsearch@e2f9271d61
2016-02-01 14:11:21 -07:00
Tim Sullivan 5f70696773 Merge pull request elastic/elasticsearch#1408 from w33ble/fix/shield-pack
Fix to accommodate Packs

Original commit: elastic/x-pack-elasticsearch@16c342d8be
2016-02-01 14:10:24 -07:00
jaymode c3b6146a72 shield: clean up hack to force switching to the system user for internal action
This commit cleans up the hack we had forcefully switching the request to execute under the system
user when a internal action gets triggered from a system request. The authorization service now tracks
the originating request in the context to allow us to validate if the request should be run as the system
user.

The system user should be used only when a user action causes an internal action, which needs to
be run by the system user.

Closes elastic/elasticsearch#1403

Original commit: elastic/x-pack-elasticsearch@4972df459f
2016-02-01 14:07:15 -05:00
uboness c9d54c0c83 Cleanup and refactoring
- removed `/_shield/roles` and `/_shield/users` endpoints (only keeping the singular forms)
 - fixed `ClearRealmsCacheTests` to use the correct endpoint for clearing the realms cache
 - used action name constants where possible in `InternalShieldUser`

Original commit: elastic/x-pack-elasticsearch@d1481de389
2016-02-01 19:51:43 +01:00
Ryan Ernst 3893ad9c5f Merge branch 'master' into remove_multicast
Original commit: elastic/x-pack-elasticsearch@7d107e88fc
2016-02-01 07:26:21 -08:00