Commit Graph

1110 Commits

Author SHA1 Message Date
Ryan Ernst 1bfef646b8 Build: Add apijar task to assemble so it gets built with other artifacts
Original commit: elastic/x-pack-elasticsearch@ab9ce9c8d6
2016-08-30 11:23:22 -07:00
Jason Tedor 702d55f0be Introduce Log4j 2
This commit introduces Log4j 2 to the stack.

Original commit: elastic/x-pack-elasticsearch@02b2bb1c89
2016-08-30 13:29:28 -04:00
Nik Everett da8540b10b Handle removing more ctors
Original commit: elastic/x-pack-elasticsearch@dd1b62ba71
2016-08-30 10:27:45 -04:00
Nik Everett 2049a45f52 Handle core chaning IndexRequest
Original commit: elastic/x-pack-elasticsearch@8cd311b3e8
2016-08-30 10:27:45 -04:00
javanna 603db388d7 Security: throw exception if we cannot extract indices from an indices request
This used to be an assertion but we move it to an exception to be able to catch this at all times without requiring assertion enabled

Original commit: elastic/x-pack-elasticsearch@fcb5fbe852
2016-08-30 15:23:02 +02:00
javanna fdfc66a8ba Security: add tests for delete and update by query
Original commit: elastic/x-pack-elasticsearch@e85877d03f
2016-08-30 15:22:55 +02:00
jaymode 88abfcfea9 security: fix audit logging.yml to have the correct prefix
When migrating the package and class names from shield to xpack.security, the logging.yml
file was updated incorrectly which resulted in audit entries going to the wrong file. This change
specifies the correct package name so audit logs go to the correct file.

Closes elastic/elasticsearch#3063

Original commit: elastic/x-pack-elasticsearch@5c07108392
2016-08-30 07:39:25 -04:00
jaymode bb4777b7d6 allow extensions to define settings filter
This change allows extensions to define their own filtered settings. This is used when there
may be sensitive credentials stored in a custom realm that should be filtered out of some
API calls.

Closes elastic/elasticsearch#2847

Original commit: elastic/x-pack-elasticsearch@952474daba
2016-08-30 07:20:00 -04:00
jaymode 473728afb4 security: extract indices from CompositeIndicesRequests and exclude duplicates
This change allows us to log the indices from a composite indices request by getting the indices
from all of the sub requests. Additionally, indices are no longer duplicated when auditing.

Closes elastic/elasticsearch#2623
Closes elastic/elasticsearch#2618

Original commit: elastic/x-pack-elasticsearch@f1d3d87bcf
2016-08-30 07:06:04 -04:00
Tanguy Leroux d3dff6659b Returns empty set of filters in MonitoringIndexNameResolver and fix tests
Original commit: elastic/x-pack-elasticsearch@e901347de9
2016-08-30 10:10:08 +02:00
Tanguy Leroux 203ad03d26 Use sets of String in XContentBuilders
With elastic/elasticsearchelastic/elasticsearch#19865 the XContentBuilder has changed to support both inclusive and exclusive filters and now uses Set<String> instead of arrays of Strings. This change updates the various places in x-plugins where string arrays were used.

Original commit: elastic/x-pack-elasticsearch@1f8d4485f4
2016-08-30 09:08:49 +02:00
Nik Everett 8f22eaf1b7 Security: Add tests for indexes created in 2.x (elastic/elasticsearch#3203)
The actual backwards compatibility support is handled by core's ability to downgrade `keyword` and `text` into `string` for indexes created in 2.x.

Original commit: elastic/x-pack-elasticsearch@6b615d9a45
2016-08-29 12:00:19 -04:00
Yannick Welsch cdc41f6082 Add recovery source to ShardRouting
Relates to elastic/elasticsearchelastic/elasticsearch#19516

Original commit: elastic/x-pack-elasticsearch@051fb25bfc
2016-08-27 15:19:49 +02:00
jaymode 40c2672f12 test: remove the version compatibility tests
The x-plugins version is now kept in sync with the elasticsearch version and the
VersionCompatibilityTests just adds noise when updating versions.

Closes elastic/elasticsearch#3079
See elastic/elasticsearch#3212

Original commit: elastic/x-pack-elasticsearch@5998aa2ec0
2016-08-26 13:52:35 -04:00
jaymode e07ae87cf4 security: do not allow security APIs to execute when unlicensed
Although most of the security functionality was disabled when a basic license was applied,
some of the functionality still could be executed such as using the authenticate API or using
a transport client. The issue here is the UI calls the authenticate API and this gives the impression
that security is really in use when it is not.

Original commit: elastic/x-pack-elasticsearch@881453fc4c
2016-08-26 13:46:56 -04:00
Nik Everett 9c2b3d79ad Fix bulk update tests
It was relying on fields extracting fields from the source but it
doesn't do that any more.

Original commit: elastic/x-pack-elasticsearch@23b534c068
2016-08-26 12:52:06 -04:00
Mike McCandless ab074da873 Don't illegally reuse scorer in this test
Closes elastic/elasticsearch#3216

Original commit: elastic/x-pack-elasticsearch@63654c5585
2016-08-25 11:42:48 -04:00
jaymode 098e61fbc1 security: remove the realtime request interceptor
The realtime request interceptor was added to stop realtime requests from bypassing DLS
or FLS as the request could read a document from the translog. After
elastic/elasticsearchelastic/elasticsearch#20102 we no longer read documents from the translog so we can
allow realtime requests even when DLS or FLS is enabled.

Original commit: elastic/x-pack-elasticsearch@069b501500
2016-08-25 10:22:46 -04:00
jaymode dfdf77c536 security: upgrade to bouncy castle 1.55
Bouncy castle 1.55 was released earlier today and this commit updates the version
we use to 1.55.

Original commit: elastic/x-pack-elasticsearch@95e002431b
2016-08-25 09:41:12 -04:00
jaymode 26c1da4230 security: roles.yml is empty and add built in monitoring users
This change removes all default roles from the roles.yml file that is distributed with xpack and
adds built in roles for monitoring users and remote monitoring agents.

Closes elastic/elasticsearch#3122

Original commit: elastic/x-pack-elasticsearch@b04508bd56
2016-08-23 15:11:28 -04:00
jaymode 334aa94946 security: simplify lookup of files inside the config dir
This commit simplifies the code used for resolving the files used for security to always
resolve against the `config` file. Elasticsearch no longer offers a way to disable the security
manager, so the files read by x-pack should not really be configurable and only exist in their
default locations since that is what can be read by the process.

As part of this, the documentation was updated to indicate that these files should always be in
the default location and the settings to change the locations have been removed. Also, a bug
was fixed in a few places where settings were still using `shield.` instead of `xpack.security.`.
Finally, some outdated and unused files were deleted from the repository.

Closes elastic/elasticsearch#305

Original commit: elastic/x-pack-elasticsearch@3884f080a0
2016-08-23 14:54:18 -04:00
Ryan Ernst 1aa72336a0 Merge pull request elastic/elasticsearch#3191 from rjernst/api_jar
Build: Add api jar and client jar for xpack

Original commit: elastic/x-pack-elasticsearch@7743f43e23
2016-08-23 11:51:05 -07:00
jaymode 7536acdc9f security: cleanup logging and other minor enhancements/fixes
This change cleans up some of the log messages and levels that could now be considered misleading.

While performing these cleanups, the following was done:

* remove creation of dummy user for gradle run as we have the `elastic` user
* Request interceptors are not bound if field and document level security is disabled
* FLS/DLS interceptors skip execution if document and field level security is disabled by the license state
* The roles store that loaded the role is logged at the TRACE level
* The TransportXPackUsageAction was using the incorrect action name when registering a handler

Closes elastic/elasticsearch#2096
Closes elastic/elasticsearch#1861
Closes elastic/elasticsearch#2229
See elastic/elasticsearch#1879

Original commit: elastic/x-pack-elasticsearch@ac16b21c0c
2016-08-23 14:35:23 -04:00
jaymode 507196dca5 security: allow superusers access to the security index
This change allows users with the superuser role to access the security index. We previously allowed
the XPackUser to access this with the intent that the XPackUser was also the `elastic` user. When the
`elastic` user was split out into the ElasticUser, we did not update the check to allow this user access
to the security index.

Original commit: elastic/x-pack-elasticsearch@fa556d9845
2016-08-23 14:24:43 -04:00
jaymode 9c76211393 security: do not use hidden filenames when generating certs
This commit changes how we get the file and directory name for certificates in the tool. The
tool now prompts the user for the filename. If the provided instance name will result in a
valid filename, this is provided as a default. Otherwise the user must provide a valid
filename.

Closes elastic/elasticsearch#2854

Original commit: elastic/x-pack-elasticsearch@3c923d736b
2016-08-23 14:11:04 -04:00
Jack Conradson feefd070ef Make Painless the default scripting language.
Closes elastic/elasticsearch#3124

Original commit: elastic/x-pack-elasticsearch@7e458c07a6
2016-08-22 17:41:18 -07:00
Ryan Ernst f28f77f73c Build: Add api jar and client jar for xpack
This adds back (again) building a transport client plugin jar for
x-pack, and also adds producing an "api" jar which extension authors can
build against. For now, both these jars are exactly the same, but
eventually they could differ, and be reduced to less than the real
x-pack jar.

see elastic/stackelastic/elasticsearch#7

Original commit: elastic/x-pack-elasticsearch@0a989de18b
2016-08-22 15:40:46 -07:00
Areek Zillur e28c2a8c94 Merge pull request elastic/elasticsearch#3178 from areek/fix/3177
Fix license expiry logging

Original commit: elastic/x-pack-elasticsearch@29d9f90af2
2016-08-22 13:16:05 -04:00
Areek Zillur 87eb69fdc6 Fix license expiry logging
Original commit: elastic/x-pack-elasticsearch@51580eaba7
2016-08-22 12:20:21 -04:00
Martijn van Groningen f10fbeeb70 watcher: remove WatchScript class
Original commit: elastic/x-pack-elasticsearch@fb2f9a28f1
2016-08-22 09:39:13 +02:00
Ryan Ernst 8ae939fec7 Remove client jar
This reverts building a separate client jar for xpack. It is not
necessary because we already build x-pack as a jar and publish to
elastic maven, since extension authors need that.

Original commit: elastic/x-pack-elasticsearch@2fab06b42c
2016-08-19 16:17:54 -07:00
Ryan Ernst 9586e68470 Merge pull request elastic/elasticsearch#3165 from rjernst/client_jar
Build: Enable x-pack to build a transport client plugin jar

Original commit: elastic/x-pack-elasticsearch@a36305d736
2016-08-19 09:29:47 -07:00
Ryan Ernst aa4fad9009 Build: Enable x-pack to build a transport client plugin jar
Original commit: elastic/x-pack-elasticsearch@f42f7a1cd2
2016-08-19 09:15:54 -07:00
Martijn van Groningen 64eec5afb3 security: Prohibit the use of `terms` query with lookup, `geo_shape` with indexed shapes, `has_child`, `has_parent` and `percolator` query inside DLS role query.
Closes elastic/elasticsearch#3145
Closes elastic/elasticsearch#613

Original commit: elastic/x-pack-elasticsearch@5962089b6c
2016-08-19 16:59:36 +02:00
Tanguy Leroux 30eab329a1 Muted HipChatServiceTests
These tests failed regularly. It seems that the user_account authentification token is not accepted anymore by the HipChat service that respond with a 401 HTTP code.

    See https://github.com/elastic/x-plugins/issues/3162

Original commit: elastic/x-pack-elasticsearch@793ad494d3
2016-08-19 16:48:44 +02:00
Tanguy Leroux 56be936ace Watcher: Use search template in Search Input/Transform REST tests
These tests would have caught the regression (introduced in elastic/x-pack@95a29c6a42 and fixed by elastic/x-pack@9b834b5f50) that cause search template to have "groovy" lang by default instead of "mustache"

Original commit: elastic/x-pack-elasticsearch@e27e5ae821
2016-08-19 09:30:24 +02:00
Ryan Ernst f92b576661 Merge pull request elastic/elasticsearch#3142 from rjernst/deguice20
Remove SecurityTransportModule

Original commit: elastic/x-pack-elasticsearch@e609503c7b
2016-08-18 08:03:31 -07:00
Ryan Ernst 9da4d827c1 Rename transport service method to clarify a user is always used, but
not necessarily the system user

Original commit: elastic/x-pack-elasticsearch@0357d3718d
2016-08-18 08:03:31 -07:00
Tanguy Leroux 5b2c7dd503 Fix watrcher script parsing tests
closes elastic/elasticsearch#3135, elastic/elasticsearch#3134, elastic/elasticsearch#3136

Original commit: elastic/x-pack-elasticsearch@a1b0402be4
2016-08-18 10:06:05 +02:00
Ryan Ernst 49ac29f2e3 Remove SecurityTransportModule
SecurityTransportModule handled binding two things in guice. First, IPFilter,
for which createComponents already had the necessary dependencies. The
second was ClientTransportFilter. For transport clients, this was a
noop and could be removed. For nodes, this just attaches the system
user, which could be done directly from SecurityServerTransportService.

Original commit: elastic/x-pack-elasticsearch@da327de476
2016-08-18 00:09:31 -07:00
Chris Earle 572869087d Change use of generics in test
Original commit: elastic/x-pack-elasticsearch@39473681b2
2016-08-17 15:50:20 -04:00
Chris Earle c16860e901 Fix Watcher REST test
Original commit: elastic/x-pack-elasticsearch@7cb5b08948
2016-08-17 15:35:18 -04:00
Jason Tedor 76319495b6 Mark failing Watcher REST test as awaits fix
This commit marks a failing Watcher REST test with seed 97AAFD9CA37864EE
as awaits fix.

Original commit: elastic/x-pack-elasticsearch@5e19f0169c
2016-08-17 15:13:26 -04:00
jaymode 934b69b0c6 test: use valid names to prevent false test failures
In some cases, the random ascii value could match a forbidden name, which will cause this
test to fail as it expects valid names. This changes ensures the names are valid.

Original commit: elastic/x-pack-elasticsearch@c79f8fc4cc
2016-08-17 14:31:17 -04:00
Jason Tedor de4851329d Mark WUT#testDeserializeSearchRequests awaits fix
This commit marks WatcherUtilsTests#testDeserializeSearchRequest which
is failing with seed 2203D3AD59DB5223 as awaits fix.

Original commit: elastic/x-pack-elasticsearch@4b6cbe544b
2016-08-17 13:43:12 -04:00
Jason Tedor ca896d2dca Mark STT#testParser as awaits fix
This commit marks SearchTransformTests#testParser which is failing with
seed 97BC9E2543410D55 as awaits fix.

Original commit: elastic/x-pack-elasticsearch@3d69e9648c
2016-08-17 13:13:10 -04:00
Jason Tedor bed5cc5882 Mark WUT#testSerializeSearchRequest as awaits fix
This commit marks WatcherUtilsTests#testSerializeSearchRequest which is
failing with seed 97BC9E2543410D55 as awaits fix.

Original commit: elastic/x-pack-elasticsearch@45a174c1f2
2016-08-17 13:10:42 -04:00
Tanguy Leroux c2dbd5ed4a Watcher: Use Mustache as default search template lang
With the latest clean ups and changes in Watcher, the default search template lang has been switched to WatcherScript.DEFAULT_LANG which points to "groovy" but it should be "mustache" instead.

Original commit: elastic/x-pack-elasticsearch@1d9ef1963e
2016-08-17 18:16:30 +02:00
Chris Earle 53d022a20a [Watcher] Add Condition to Action
This adds a "condition" to every action (via the ActionWrapper) that prevents execution of the action if the condition fails. An action-level condition is only useful when there is more than one action, but nothing checks to ensure that it's only used in that scenario.

Original commit: elastic/x-pack-elasticsearch@704cfb1a86
2016-08-17 11:45:43 -04:00
Martijn van Groningen 101d791ec4 move test to the right package
Original commit: elastic/x-pack-elasticsearch@0693b8657d
2016-08-17 10:40:26 +02:00
Martijn van Groningen f291f292bf watcher: Watcher search templates shouldn't serialize SearchSourceBuilder to a string, template that and turn it back into a SearchSourceBuilder
Instead watcher search template should be agnostic of SearchSourceBuilder and just work with BytesReference, so that serializing to a string before templating isn't needed.

Original commit: elastic/x-pack-elasticsearch@36d21ec819
2016-08-17 09:52:07 +02:00
Ryan Ernst 7aa557d8f0 Build: Add task to build zip of license tools
This roughly matches what was done in 2.x for the license tools (except
without any dependency exclusions).

Original commit: elastic/x-pack-elasticsearch@4e1f07b5fa
2016-08-16 14:23:56 -07:00
Ryan Ernst e4e2601b11 Merge branch 'master' into search_parser
Original commit: elastic/x-pack-elasticsearch@c347445a69
2016-08-16 11:29:19 -07:00
Ryan Ernst 4dac802c5d Use consolidated search parsers container
This is the xplugins side of elastic/elasticsearchelastic/elasticsearch#20000, using the new
SearchRequestParsers.

Original commit: elastic/x-pack-elasticsearch@d7cee93a8f
2016-08-16 02:01:56 -07:00
Nik Everett 8ee190d741 Handle moving rest support
Original commit: elastic/x-pack-elasticsearch@99076b2936
2016-08-15 22:41:43 -04:00
Chris Earle af28d05515 Disabling local test while it awaits a fix
Original commit: elastic/x-pack-elasticsearch@3a8afb331f
2016-08-12 23:44:28 -04:00
Chris Earle e7ae3fa1f5 Give a longer timeout for test
Original commit: elastic/x-pack-elasticsearch@461d7eee8f
2016-08-12 17:18:44 -04:00
Chris Earle 3c9749b2b8 [Monitoring] Add Empty Ingest Pipeline to Future Proof Monitoring Documents
This adds an empty _ingest/pipeline named after the _current_ version of the Monitoring API (currently 2) from both exporters.

This allows us to eventually change the API version (to 3, 4, etc.) and go _back_ and modify the pipeline that exists. The modified pipeline would then "fix" the documents as best as possible and rename the index. As a result, different versions (starting with 5.0) will be able to report to the same monitoring cluster regardless of the running API version.

Note: This has no impact on stale data (e.g., the day before the upgrade) _and_ it implies that the monitoring cluster should always be updated first. A simple reindexing script can be supplied for old data, which can be done at the discretion of the user.

Original commit: elastic/x-pack-elasticsearch@45df5ee87b
2016-08-12 11:50:39 -04:00
jaymode 72f580c82d test: fix concurrency bug in SSLConfigurationReloaderTests
The SSLConfigurationReloaderTests rarely failed during some local runs. This turned out to be due to
signaling that the reload happened before we actually reloaded. This led to a race condition where we
attempted to validate the config was reloaded properly and actually reloading. This change fixes the
ordering of operations and uses a CountDownLatch instead of a AtomicInteger and awaitBusy.

Original commit: elastic/x-pack-elasticsearch@9615f225d6
2016-08-12 08:50:53 -04:00
jaymode a3e7536205 fix serialization of XPackFeatureSet.Usage
The XPackFeatureSet.Usage writeTo method failed to write the name to the
StreamOutput whereas the deserialization code expected it to be the first value
present in the StreamInput. This causes xpack usage requests made to nodes
other than the master to fail.

This change fixes the serialization and adds tests to all of the feature sets to ensure
that the usage is serialized properly.

Closes elastic/elasticsearch#3072

Original commit: elastic/x-pack-elasticsearch@eccab616ca
2016-08-12 07:48:55 -04:00
Lee Hinman 52f23afb4b Fix checkstyle violations in HttpExporter*.java
Two files had out-of-order @Nullable clauses and one had an invalid
license header

Original commit: elastic/x-pack-elasticsearch@8057871b18
2016-08-10 16:46:31 -06:00
Chris Earle c41550d36a [Monitoring] Allow HTTP Exporter to be given custom HTTP Headers for every request
This allows X-Pack Monitoring 5.0 to be given custom headers for any request.

Original commit: elastic/x-pack-elasticsearch@04050181bf
2016-08-10 16:33:32 -04:00
Adrien Grand 632871be84 Fix after the `mapper` package was collapsed.
Original commit: elastic/x-pack-elasticsearch@fb708c72c3
2016-08-10 17:52:07 +02:00
jaymode af44ea0440 security: move to a single SSLService
This change refactors the ssl services into a single class and reduces the number of
public methods that are exposed by the class. As part of this change, ssl configurations
must be loaded during construction of the service otherwise an exception will be thrown
when trying to retrieve the configuration. Additionally, the reloading of key material and
trust material is now handled by the SSLService instead of the SSLConfiguration. The
SSLConfiguration class has been made package private as its usage has been contained
to the ssl package entirely.

See elastic/elasticsearch#2971

Original commit: elastic/x-pack-elasticsearch@46e4535bb1
2016-08-10 07:24:47 -04:00
Ryan Ernst 20041446f3 Merge pull request elastic/elasticsearch#3069 from rjernst/deguice18
Consolidate settings for enabling xpack features

Original commit: elastic/x-pack-elasticsearch@bdc505dc6b
2016-08-09 16:31:06 -07:00
jaymode 2b2ad14f65 test: mute version compatibility tests
Original commit: elastic/x-pack-elasticsearch@f3eee3a223
2016-08-09 15:22:32 -04:00
Britta Weber 7b1d7c8e27 use pattern instead of hard coding the version (elastic/elasticsearch#3078)
Original commit: elastic/x-pack-elasticsearch@b86e1cd40c
2016-08-09 20:50:46 +02:00
Britta Weber e8d139eb97 update mappings and template for .security index if they are not up t… (elastic/elasticsearch#3030)
* update mappings and template for .security index if they are not up to date

closes elastic/elasticsearch#2986

* nits


Original commit: elastic/x-pack-elasticsearch@b63aebbed8
2016-08-09 17:52:29 +02:00
Ryan Ernst 0039f9a2b2 Merge pull request elastic/elasticsearch#3032 from rjernst/deguice16
Internal: Deguice notification services

Original commit: elastic/x-pack-elasticsearch@9739742373
2016-08-08 14:10:52 -07:00
Ryan Ernst ce496938cd Consolidate settings for enabling xpack features
Currently there are a number of helper methods, all used at various
stages of initializing xpack, for reading "enabled" settings. Almost all
of these read the setting directly rather than use the new settings
infra. This change adds an XPackSettings class to contain these settings
constants, and adds all the enabled settings to it.

Note: While there is an existing MonitoringSettings, I think we do not
have enough settings (especially for all features) to warrant a separate
class per "feature" (eg graph would have nothing). We should decide
if/when this is necessary on a case by case basis, but I think the
enabled settings should all go here in XPackSettings.

Original commit: elastic/x-pack-elasticsearch@086152d5a5
2016-08-08 14:01:35 -07:00
Jason Tedor b2be99a869 Remove network settings when security is disabled
When security is disabled, we currently set the transport and HTTP type
to Netty 4. However, this is unnecessary as these are the default
settings so this commit removes these explicit settings.

Relates elastic/elasticsearch#3065

Original commit: elastic/x-pack-elasticsearch@afa360ceec
2016-08-08 14:46:23 -04:00
jaymode 129a2e594e test: add test for Kibana user executing a get mappings request
See elastic/elasticsearch#3048

Original commit: elastic/x-pack-elasticsearch@cd0e8ec29f
2016-08-08 10:48:34 -04:00
Tanguy Leroux 9d26ac0378 [TEST] Fix TransformIntegrationTests.testScriptTransform and wrong stored script id
Original commit: elastic/x-pack-elasticsearch@dfbb60d265
2016-08-08 10:45:41 +02:00
Tanguy Leroux b07394090f [Test] Re enable some messy Watcher tests
This commit reenable some Watcher tests that were muted in elastic/elasticsearch#724. It removes the Groovy dependency for tests that don't really use Groovy features and replace scripts with mocked scripts. It converts a GroovyScriptConditionIT test into a REST test and moves it in the smoke-test-watcher-with-groovy project.

closes elastic/elasticsearch#724

Original commit: elastic/x-pack-elasticsearch@f4c8161946
2016-08-08 10:06:30 +02:00
Jason Tedor 7b7411f78d Remove mock Netty plugins
These mock Netty plugins were needed to assist in setting
sun.nio.ch.bugLevel. Yet, settings this property should no longer be
needed on JDK 8 and the missing privileged block when writing this
property can be fixed upstream.

Relates elastic/elasticsearch#3047

Original commit: elastic/x-pack-elasticsearch@e2aa4f6fb5
2016-08-05 14:58:50 -04:00
Britta Weber 656a6bb624 mute test, we have an issue for it
Original commit: elastic/x-pack-elasticsearch@59fc88a9a3
2016-08-05 17:35:03 +02:00
Tanguy Leroux ec950a2ca7 Update to Jackson 2.8.1
This commit updates Jackson to the 2.8.1 version, which is more strict when it comes to build objects.

Original commit: elastic/x-pack-elasticsearch@fb23208e7d
2016-08-05 12:25:42 +02:00
Boaz Leskes a2cca18c49 allow joining nodes, conflicting with existing nodes to elect a master (elastic/elasticsearch#2996)
this is a companion PR to elastic/elasticsearchelastic/elasticsearch#19743

Original commit: elastic/x-pack-elasticsearch@193c92d99a
2016-08-05 09:07:29 +02:00
Ryan Ernst 42076f89ce Internal: Deguice notification services
This change removes guice from creating notification componenents. It
also removes the Notification helper class, as it just makes looking at
what stuff xpack adds more obfuscated.

Original commit: elastic/x-pack-elasticsearch@69b8ea4735
2016-08-03 15:32:56 -07:00
Ryan Ernst 5ebc9c4569 Fix signature of createComponents after addition of script service in core
Original commit: elastic/x-pack-elasticsearch@768e992715
2016-08-03 13:14:13 -07:00
Jason Tedor 46d7baa319 Merge pull request elastic/elasticsearch#3021 from jaymode/netty4_transport
Introduce Netty 4 security

Original commit: elastic/x-pack-elasticsearch@fb5e7fa66e
2016-08-03 14:10:52 -04:00
Alexander Reelsen 07b8bcf219 Watcher: Ensure watch status is always updated on condition check (elastic/elasticsearch#2980)
When a watch is executed, but the condition is not met, it is not automatically marked as dirty.
This results in a divergence of what is displayed when someone is just getting a watch via the get
watch API (due to using the in memory store) compare to when someone is using the GET API to get the
watch via the .watches index call.

This commit sets the watch status always to dirty after a condition check, thus forcing an update.

Closes elastic/elasticsearch#2699

Original commit: elastic/x-pack-elasticsearch@e6a00260f7
2016-08-03 18:21:57 +02:00
jaymode 60cb867d47 security: ignore empty query value in roles
Users are allowed to create query objects with an empty string value as we do
not currently validate the input against a query parser. In this case, we can ignore
the empty value when parsing the role. If we pass an empty BytesReference in
the role then trying to determine the XContentType will fail in the
SecurityIndexSearcherWrapper.

Closes elastic/elasticsearch#2997

Original commit: elastic/x-pack-elasticsearch@fc593943c4
2016-08-03 11:24:49 -04:00
Jason Tedor 33ba52e735 Merge branch 'master' into netty4_transport
* master:
  Restore interruption flag correctly in life cycle service

Original commit: elastic/x-pack-elasticsearch@5da6471c9a
2016-08-03 11:11:16 -04:00
Jason Tedor 832cb4fff2 Simplify test setup in Netty 4 transport tests
This commit collapes some duplicated setup code in every test in the
Netty 4 security transport tests to a common method.

Original commit: elastic/x-pack-elasticsearch@0a088db78d
2016-08-03 11:08:00 -04:00
Daniel Mitterdorfer 196f74984c Merge pull request elastic/elasticsearch#2969 from danielmitterdorfer/fix-interruption
Restore interruption flag correctly in life cycle service

Original commit: elastic/x-pack-elasticsearch@fe73226e47
2016-08-03 17:03:33 +02:00
jaymode b3f8495a03 clarify comments and add assert client auth type
Original commit: elastic/x-pack-elasticsearch@0e3d134bc6
2016-08-03 10:39:37 -04:00
Jason Tedor 94e7d82a20 Kill newline in SecurityNetty4HttpServerTransport
This commit removes an extra newline in
SecurityNetty4HttpServerTransport.java.

Original commit: elastic/x-pack-elasticsearch@218b29c9b6
2016-08-03 09:42:51 -04:00
Jason Tedor 4874d84f82 Merge branch 'master' into netty4_transport
* master: (25 commits)
  docs: remove unused file and add link to invalid role examples
  Remove interfaces for notification services
  Redirect to URL specified by next parameter, if it is set
  Fix fixture and tests so they pass again
  Update error message to be more actionable
  Switch to NamedWriteable pull based extension in xpack
  Fixing issue with infinite redirect loop
  Toggle display of security nav controls more dynamically
  Pass in xpackMainPlugin instead of xpackMainPlugin.info
  Wrap the return in a Promise
  Only unset the cookie if it is currently set
  Clarifying intent of code
  Updating tests fixtures + adding assertion for client cookie deletion
  If security is disabled, do not attempt to call the authenticate ES API
  Disambiguate between resolve function names
  Revert to not using xpackMainPlugin.info until the xpackMainPlugin is ready
  Redirect /login => / if security is disabled in ES
  Register/deregister security management items depending on whether there's an auth'd user
  Show/hide the username + logout button depending on whether there is an auth'd user
  If security is disabled, continue without auth + delete client cookie
  ...

Original commit: elastic/x-pack-elasticsearch@16b92a1a59
2016-08-03 09:18:42 -04:00
jaymode 00e963fef9 ensure transport is set for external cluster clients take 2
Original commit: elastic/x-pack-elasticsearch@b92943303e
2016-08-03 08:12:05 -04:00
jaymode 417bc49230 ensure transport is set for external cluster clients
Original commit: elastic/x-pack-elasticsearch@ee8aa8600a
2016-08-03 08:11:19 -04:00
jaymode 76591e54f6 mock channelhandlercontext instead of a null implementation
Original commit: elastic/x-pack-elasticsearch@e4ba6b96cc
2016-08-03 07:27:37 -04:00
jaymode 55ccd27acf ensure the transport type is a security transport
Original commit: elastic/x-pack-elasticsearch@6c7e46e103
2016-08-03 07:23:55 -04:00
Ryan Ernst d69bb4cc51 Merge pull request elastic/elasticsearch#3017 from rjernst/writeable_registry
Switch to NamedWriteable pull based extension in xpack

Original commit: elastic/x-pack-elasticsearch@e077ba2d6c
2016-08-03 01:36:43 -07:00
Ryan Ernst 549a5d3e73 Remove interfaces for notification services
We have 4 types of notification services, and all of them have an
interface with a single implementation class. They also all
unnecessarily are lifecycle componenets, but the only thing start does
is read the settings.

This change converts all 4 notification services to classes, and makes
them regular components instead of lifecycle services.

Original commit: elastic/x-pack-elasticsearch@897115ae65
2016-08-03 00:07:26 -07:00
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