Commit Graph

322 Commits

Author SHA1 Message Date
Robert Muir 3ec04ba40f fix tests
Original commit: elastic/x-pack-elasticsearch@54d56efdbd
2015-12-04 02:12:22 -05:00
Adrien Grand 8645bd4ecd Merge pull request elastic/elasticsearch#1041 from jpountz/fix/remove_onIndexService
Stop using onIndexService.

Original commit: elastic/x-pack-elasticsearch@d048f0ee78
2015-12-03 09:45:33 +01:00
Ryan Ernst 83c2f1b3c4 Build: Disable licenses checks for all xplugins
Original commit: elastic/x-pack-elasticsearch@f6a29344e9
2015-12-02 11:05:16 -08:00
Jason Tedor 8ea7a62b86 Remove and forbid use of the type-unsafe empty Collections fields
This commit removes and now forbids all uses of the type-unsafe empty
Collections fields Collections#EMPTY_LIST, Collections#EMPTY_MAP, and
Collections#EMPTY_SET. The type-safe methods Collections#emptyList,
Collections#emptyMap, and Collections#emptySet should be used instead.

Relates elastic/elasticsearchelastic/elasticsearch#15187

Original commit: elastic/x-pack-elasticsearch@99f6fdd3a6
2015-12-02 10:44:23 -05:00
Adrien Grand b43f81a15c Use IndexModule.getSettings() to get the settings.
Original commit: elastic/x-pack-elasticsearch@770f859b6c
2015-12-02 14:57:52 +01:00
Adrien Grand afb5cc0d08 Stop using onIndexService.
Now that mappers are registered at the index level, Shield is the last user
of Plugin.onIndexService. Yet this can be implemented on the IndexModule by
registering a listener on index creation.

Once this change is merged, we can remove Plugin.onIndexService entirely.

Original commit: elastic/x-pack-elasticsearch@fba6809949
2015-12-02 14:50:29 +01:00
Court Ewing acff7a8f4c Add field_stats to kibana user role in shield
Kibana 4.3 now uses the field_stats api to pre-flight all search
requests to any configured index patterns, so shield needs to allow it.

Original commit: elastic/x-pack-elasticsearch@793ad01424
2015-11-30 10:32:09 -05:00
Daniel Mitterdorfer f1b32117ac Add dependency on NetworkModule in AuditTrailModuleTests
Original commit: elastic/x-pack-elasticsearch@d5c0429d33
2015-11-27 15:52:51 +01:00
Daniel Mitterdorfer 75d66dfa95 Add SettingsFilter to SettingsModule in tests (change in core)
Original commit: elastic/x-pack-elasticsearch@004edbcf76
2015-11-27 14:40:29 +01:00
Robert Muir b529e4da6f Merge pull request elastic/elasticsearch#1023 from rmuir/bad_apples
Mark sleeping tests from elastic/elasticsearch#1007 @BadApple

Original commit: elastic/x-pack-elasticsearch@e16c54b050
2015-11-25 14:25:52 -05:00
debadair feb247d2a0 Docs: Tweaked release notes for consistency.
Original commit: elastic/x-pack-elasticsearch@bb94d42cbf
2015-11-24 15:32:13 -08:00
Ryan Ernst 4f44ccedb5 Build: Simplify plugin installs for integTests
This is the xplugins side of elastic/elasticsearchelastic/elasticsearch#14986, making use of
the simplification in configuration.

Original commit: elastic/x-pack-elasticsearch@a24ad7b08a
2015-11-24 12:54:11 -08:00
Robert Muir 59b4177b95 Mark the slowest slowest tests @BadApple
See elastic/elasticsearch#1007

Original commit: elastic/x-pack-elasticsearch@87ebfb1eab
2015-11-24 14:39:16 -05:00
Ryan Ernst f3a76118db Merge pull request elastic/elasticsearch#1017 from rjernst/qa/shield_core_rest
Build: Get shield qa test with core rest tests working

Original commit: elastic/x-pack-elasticsearch@0bf9f9ac9f
2015-11-24 08:25:29 -08:00
jaymode d9363085c3 docs: add Shield 1.3.3 release notes
Original commit: elastic/x-pack-elasticsearch@69a525677b
2015-11-24 09:32:06 -05:00
Ryan Ernst 9da4b6160c Build: Get shield qa test with core rest tests working
This adds back the shield qa rest tests module with gradle. There is
also a small fix in ShieldPlugin for a bug that was discovered around
checking for a custom query cache (which was using the node settings
instead of index settings).

Original commit: elastic/x-pack-elasticsearch@28c6d58f37
2015-11-24 01:05:21 -08:00
Ryan Ernst 5f30602d1a Merge pull request elastic/elasticsearch#1003 from rjernst/maven_cleanup
Build: Remove leftover ant and maven files

Original commit: elastic/x-pack-elasticsearch@a3bdc7917d
2015-11-24 00:54:37 -08:00
Adrien Grand f8ab6f0fb5 Fix compilation of ShieldIndexSearcherWrapperUnitTests.
The break was introduced in elastic/elasticsearchelastic/elasticsearch#14896.

Original commit: elastic/x-pack-elasticsearch@07810b2d2b
2015-11-24 09:28:28 +01:00
debadair 90cb7d38b3 Docs: Added dates to Shield & Watcher release notes.
Original commit: elastic/x-pack-elasticsearch@2d42762b84
2015-11-23 13:20:51 -08:00
debadair c365da861f Shield Docs: Added information about enabling DLS/FLS.
Original commit: elastic/x-pack-elasticsearch@23f9ad66d4
2015-11-23 11:19:09 -08:00
debadair a973cbcd72 Shield Docs: Added release notes for 2.1.
Original commit: elastic/x-pack-elasticsearch@042904968b
2015-11-23 11:05:21 -08:00
debadair 9f6398127c Shield Docs: Added release notes for 2.0.1.
Original commit: elastic/x-pack-elasticsearch@a35092bc06
2015-11-23 11:03:45 -08:00
Colin Goodheart-Smithe 0a009e355c [TEST] Provides generics for action in ESUsersRealmTests
Although the build passes on the command line the Eclipse compiler complains that the client.execute() call on line 216 does not have correct arguments because of the lack of generics. This changes adds the generics to the action variable to solve the error in Eclipse. The change is very low risk and should not adversely affect the build on the command line nor in intelliJ IDEA

Original commit: elastic/x-pack-elasticsearch@08f3548556
2015-11-23 11:01:10 +00:00
Ryan Ernst 0a78332c3e Build: Remove leftover ant and maven files
A number of unused files still exist for maven assemblies and ant
integration test overrides. This change removes them. There are still
some files left which need to be examined more, for instance, the shield
overrides ant file.

Original commit: elastic/x-pack-elasticsearch@1d9b277ff0
2015-11-23 00:09:47 -08:00
Ryan Ernst db09ee8d2a Merge branch 'master' into extra_plugins
Original commit: elastic/x-pack-elasticsearch@fa264a1ce4
2015-11-22 08:48:04 -08:00
Robert Muir f1a9b50e9e Ban write access to system properties
Followup to https://github.com/elastic/elasticsearch/pull/14914

Shield has to request read-write access to all system properties
due to silliness in UnboundID sdk (556a203094/src/com/unboundid/util/Debug.java (L166))

We should followup with a pull request to them, to not use System.getProperties() here which
returns a mutable map (hence: read-write to "*").

Furthermore, the hack has to be wrapped in another hack because gradle doesn't add
shield's plugin metadata to the classpath. Of course, if we weren't testing with two
plugins in the classpath (which is not very realistic) this would be a non-issue.

Original commit: elastic/x-pack-elasticsearch@612cacde6a
2015-11-21 23:01:37 -05:00
Ryan Ernst 8119451a7b Build: Remove project attachment and use ES extra-plugins instead
This change removes the project attachment support, and instead relies
on x-plugins being checked out under extra-plugins/x-plugins within an
elasticsearch checkout. The only real change, other than removing
unnecessary code, was to rename the license/core project because gradle
project substitution has a bug which causes it to try and use ES core as
the substitution. (Unfortunately this is not reproduceable with a simple
example, so I have not yet filed an issue with gradle).

Original commit: elastic/x-pack-elasticsearch@fa315ffcb5
2015-11-21 11:13:32 -08:00
jaymode 5b72d1768d test: add throws InterruptedException for InternalTestCluster#beforeTest calls
Original commit: elastic/x-pack-elasticsearch@b89a58a408
2015-11-18 13:48:54 -05:00
jaymode 16848c6043 shield: disable document and field level security by default
This change disables document and field level security by default so that we are able to maintain
bulk update functionality. Users that enable DLS/FLS will not have this functionality. Additionally,
if a user tries to configure DLS/FLS in a role without enabling it, the role will be skipped during
parsing and a log message will be logged at the error level.

See elastic/elasticsearch#938

Original commit: elastic/x-pack-elasticsearch@60c7519092
2015-11-18 08:02:29 -05:00
jaymode cc2096b4f9 add the option to disable DLS and FLS completely
This commit reverts a previous change where searcher were not wrapped when the RequestContext
could not be found. If DLS/FLS is enabled, which is the default, any bulk request that contains an
update request will not be permitted. This change also exposes the ability to completely disable DLS
and FLS so that users who are not using these features can still use bulk updates.

See elastic/elasticsearch#938

Original commit: elastic/x-pack-elasticsearch@513782db1c
2015-11-17 12:55:26 -05:00
Tanguy Leroux 0b50bbb5e5 Fix compilation errors with org.elasticsearch.cluster.health.ClusterHealthStatus
Original commit: elastic/x-pack-elasticsearch@68988b2163
2015-11-16 15:34:26 +01:00
Martijn van Groningen 46044a4fe0 test: use one IndexSetting instance
Original commit: elastic/x-pack-elasticsearch@1f35455ebe
2015-11-16 12:01:42 +01:00
Martijn van Groningen 101e4ff7ce test: added test that ensures that field data cache is not bypassed for segment and global ordinal caching when field subset reader hides the requested field.
Original commit: elastic/x-pack-elasticsearch@c4864d18ac
2015-11-16 11:38:02 +01:00
Martijn van Groningen 6e482d1a3d shield: Also prohibit update requests inside bulk requests if FLS is enabled.
We do this already for update requests, but this was forgotten to be checked for bulk requests.

Original commit: elastic/x-pack-elasticsearch@8d864a7c98
2015-11-16 05:49:33 +01:00
Chris Earle 6ef51d5dc0 Merge branch 'master' of https://github.com/elastic/x-plugins
Original commit: elastic/x-pack-elasticsearch@22a9ade30e
2015-11-13 14:44:59 -05:00
Lee Hinman 557f0d4f83 Fix compilation for `newIndexSettings` arity change
Original commit: elastic/x-pack-elasticsearch@f94fabfcc9
2015-11-13 09:35:46 -07:00
Chris Earle 8c5fdc7023 Fixing references to bin/plugin -i
Original commit: elastic/x-pack-elasticsearch@708d381742
2015-11-12 13:45:38 -05:00
jaymode 1601ce4fba add guava as a test dependency for jimfs
Original commit: elastic/x-pack-elasticsearch@331f834729
2015-11-11 13:40:03 -05:00
jaymode d74de5acc8 shield: only wrap readers if the RequestContext can be located
Previously, when the RequestContext could not be located a FieldSubsetReader was returned that only
allowed meta fields to be read. This was done for safety in case there was an API missed so we did not
leak data. However, this causes issues because some requests in elasticsearch execute on a different
thread than the one with the RequestContext so we effectively lose this context and prevent access to
the fields in the document. This is especially problematic with update requests, because that means that
fields that aren't included in the updated document will be lost.

This commit removes the wrapping of the readers in this case and adds tests for bulk updates.

Closes elastic/elasticsearch#938

Original commit: elastic/x-pack-elasticsearch@74c8059da0
2015-11-11 13:26:49 -05:00
Ryan Ernst 26c8e949a4 Build: Remove transitive dependencies
In elastic/elasticsearchelastic/elasticsearch#14668, transitive dependencies were removed
from elasticsearch, and plugins now no longer get transitive deps
either. This commit fixes xplugins to remove transitive deps.

Original commit: elastic/x-pack-elasticsearch@5c41657b6e
2015-11-11 09:18:24 -08:00
Martijn van Groningen 39e58b03d5 Fix upstream changes to IndexSearcherWrapper: https://github.com/elastic/elasticsearch/pull/14654
Original commit: elastic/x-pack-elasticsearch@b32ba2ad78
2015-11-10 23:10:04 +07:00
Areek Zillur dcae5fb5f0 ensure no operation is blocked before initial license notification
closes elastic/elasticsearch#906

update comment

Original commit: elastic/x-pack-elasticsearch@0bd788720f
2015-11-09 11:31:06 -05:00
Ryan Ernst 33785e5446 Build: Improve behavior and setup for attachment to elasticsearch
Currently, running any task while attached to elasticsearch will also
try to run that task in all elasticsearch projects. This change causes
x-plugins to be moved into a subproject when attached. It does this by
dynamically creating a fake root project, and making this root project
think it is attached to the existing attachments, along with x-plugins
itself.

This also fixes buildSrc so attachment to elasticsearch's buildSrc
actually works.

Original commit: elastic/x-pack-elasticsearch@da0adf1da5
2015-11-06 11:08:03 -08:00
Tanguy Leroux 9fc92950c4 Fix Shield zip package
Original commit: elastic/x-pack-elasticsearch@eaf9dfc9ba
2015-11-06 16:17:03 +01:00
debadair 6106128272 Docs: Added uninstall topics to Watcher & Shield. Closes elastic/elasticsearch#801.
Original commit: elastic/x-pack-elasticsearch@b990c64647
2015-11-05 17:54:35 -08:00
Simon Willnauer a9028da5d1 Merge pull request elastic/elasticsearch#933 from s1monw/catchup/14518
Fix API usage after index-level guice was removed

Original commit: elastic/x-pack-elasticsearch@06400cc58d
2015-11-05 18:39:12 +01:00
Robert Muir cfb77bf572 Remove confusing pom.xml files
Original commit: elastic/x-pack-elasticsearch@772a1eb5d3
2015-11-05 10:39:28 -05:00
Simon Willnauer ad2835f6d3 Fix API usage after index-level guice was removed
See https://github.com/elastic/elasticsearch/pull/14518

Original commit: elastic/x-pack-elasticsearch@2428ee47c2
2015-11-05 13:18:58 +01:00
Robert Muir 5311da746b Add jimfs as shield test dep and conditionalize file permissions changing in tests.
See elastic/elasticsearch#928 for followup work

Original commit: elastic/x-pack-elasticsearch@d435cf9000
2015-11-04 14:25:20 -05:00
Daniel Mitterdorfer 081ffbeced Allow System#exit() from command line tools
This commit adds SuppressForbidden annotations to command line tools to
still allow to call System#exit() (see also issue 12596 in ES core).

Original commit: elastic/x-pack-elasticsearch@1dd3f1dcb1
2015-11-04 14:54:27 +01:00