Commit Graph

6431 Commits

Author SHA1 Message Date
Martijn van Groningen 1adb25127b Added start, stop and restart apis.
Closes elastic/elasticsearch#37

Original commit: elastic/x-pack-elasticsearch@6d491c4cec
2014-11-21 12:28:54 +01:00
Brian Murphy 6ea6256e35 TEST : Fix ACK test
Get the count AFTER we ack.

Original commit: elastic/x-pack-elasticsearch@23dacea151
2014-11-21 10:41:08 +00:00
javanna f2abfb35f9 Work around circular dependency in core
There is a circular dependency in core 1.4.0 that cause plugins to fail depending on their constructors injection. We have ClusterService in InternalAuthorizationService that triggers this problem, solved for now replacing the dependency with a Provider. The original bug is already fixed in core: https://github.com/elasticsearch/elasticsearch/pull/8415 .

The problem manifested when enablieng a tribe node having shield installed on that node at the same time.

Closes elastic/elasticsearch#363

Original commit: elastic/x-pack-elasticsearch@ac339ef247
2014-11-21 10:45:39 +01:00
Martijn van Groningen c4787d9160 fixed bug, expected and update was swapped.
Original commit: elastic/x-pack-elasticsearch@78e42879be
2014-11-21 01:01:29 +01:00
c-a-m 8397112422 Documentation updates for Active Directory Realm. Also replaces empty string arrays with Strings.EMPTY_ARRAY
Original commit: elastic/x-pack-elasticsearch@3f02d89a20
2014-11-20 16:26:57 -07:00
c-a-m 350665bb26 Changed from code-review feedback
Original commit: elastic/x-pack-elasticsearch@356c829f5a
2014-11-20 16:26:57 -07:00
c-a-m 32f0f621d5 LDAP: splitting AD and LDAP realm
This splits the realm into two so that configuration for both are separate.

Original commit: elastic/x-pack-elasticsearch@782997d54b
2014-11-20 16:26:57 -07:00
c-a-m e8119ec933 LDAP: Changed AD group lookup to include nested groups
This expands the ActiveDirectoryConnectionFactory to lookup nested groups, in a non standard way.

Fixes https://github.com/elasticsearch/elasticsearch-shield/issues/286

Original commit: elastic/x-pack-elasticsearch@7a3c5643f6
2014-11-20 16:26:57 -07:00
c-a-m 852529bf53 LDAP: Changed AD group lookup to include nested groups
This expands the ActiveDirectoryConnectionFactory to lookup nested groups, in a non standard way.

Fixes https://github.com/elasticsearch/elasticsearch-shield/issues/286

Original commit: elastic/x-pack-elasticsearch@01781a8305
2014-11-20 16:26:57 -07:00
Brian Murphy 178a701724 ACKS : Fix some issues when a transport client was used.
Original commit: elastic/x-pack-elasticsearch@9276820a90
2014-11-20 22:24:25 +00:00
Brian Murphy 42d484b62a TEST: Add extra logging when alert didn't trigger an action.
Original commit: elastic/x-pack-elasticsearch@bc389fccdc
2014-11-20 22:22:50 +00:00
Brian Murphy 32e7bc45b1 REST : Add ACK Rest Action
This commit adds the alert ack rest action.

Original commit: elastic/x-pack-elasticsearch@73a0286863
2014-11-20 18:02:54 +00:00
Brian Murphy bed7ddbb01 DOCS : Add some java docs.
Original commit: elastic/x-pack-elasticsearch@394d957364
2014-11-20 17:24:20 +00:00
Brian Murphy a3259e9c62 TEST: Up wait time to allow things to settle down once we ACK.
Original commit: elastic/x-pack-elasticsearch@69f7680348
2014-11-20 17:00:21 +00:00
Brian Murphy b1f64f4103 Fixes after merge conflicts.
Original commit: elastic/x-pack-elasticsearch@65adad6ea7
2014-11-20 16:28:00 +00:00
Brian Murphy 3fcae91633 Merge branch 'master' of https://github.com/elasticsearch/elasticsearch-alerts
Conflicts:
	src/main/java/org/elasticsearch/alerts/actions/AlertActionManager.java
	src/test/java/org/elasticsearch/alerts/BootStrapTest.java
	src/test/java/org/elasticsearch/alerts/actions/AlertActionsTest.java

Original commit: elastic/x-pack-elasticsearch@8dcb986dff
2014-11-20 15:44:25 +00:00
Brian Murphy 64325d4f30 THROTTLING : Add throttling support for alerts.
This commit adds throttling support for alerts.

If an alert is added with the throttle_state NOT_TRIGGERED
This alert can be ACKed.
If an alert is ACKed no further actions will be performed until the alert stops triggering.
If an alert is added with the throttle_period as a TimeValue alerts will only be triggered at least that TimeValue apart in time.

Original commit: elastic/x-pack-elasticsearch@65dfda7d1a
2014-11-20 15:31:04 +00:00
Martijn van Groningen 64d49dae5c Forked CronExpression because it uses the default Locale to determine the maximum allowed year to be used. It now uses Locale.ENGLISH to do this.
Original commit: elastic/x-pack-elasticsearch@41f27aa33c
2014-11-20 15:19:35 +01:00
Martijn van Groningen e3694655af Only stop the scheduler once it is set.
Original commit: elastic/x-pack-elasticsearch@4238a62673
2014-11-20 14:44:31 +01:00
Martijn van Groningen 306fefd847 Removed useless if check
Original commit: elastic/x-pack-elasticsearch@c9fea5aca4
2014-11-20 12:42:41 +01:00
Martijn van Groningen 15d9101ea9 First stop the alert action manager and enforce started property inside alert action manager.
Original commit: elastic/x-pack-elasticsearch@75a98a93f5
2014-11-20 12:39:09 +01:00
Martijn van Groningen cfdc061908 In the AlertsClusterStateListener fork the call to stop if we're no longer master
Original commit: elastic/x-pack-elasticsearch@1b40f14570
2014-11-20 12:09:12 +01:00
Martijn van Groningen 0438e61404 Let Quartz interrupt jobs on shutdown.
Original commit: elastic/x-pack-elasticsearch@3084f9b3f4
2014-11-20 11:56:48 +01:00
Martijn van Groningen 79b10f8c0d Don't let Quartz check for updates.
Original commit: elastic/x-pack-elasticsearch@dd1e4c2577
2014-11-20 11:32:54 +01:00
Martijn van Groningen ca00e59911 Make AlertManager#stop() synchronized so that the call from beforeClose waits if an stop is being performed already.
This prevents the test framework to complain about the fact that threads are lingering around when the test cluster has been shutdown.

Original commit: elastic/x-pack-elasticsearch@315be3f376
2014-11-20 11:12:25 +01:00
Martijn van Groningen 42dda5b975 Test: Let AlertActionsTest extend from AbstractAlertingTests.
Original commit: elastic/x-pack-elasticsearch@4c11aef8cb
2014-11-19 21:44:58 +01:00
Martijn van Groningen 43e6aa5b23 Moved json field variable from AlertActionEntry to AlertActionManager and made AlertActionEntry not implement ToXContent.
Original commit: elastic/x-pack-elasticsearch@76731aee22
2014-11-19 21:37:23 +01:00
Martijn van Groningen 72e9d9e4b7 Leftover from IndexAlert* to PutAlert*
Original commit: elastic/x-pack-elasticsearch@6af1e77e43
2014-11-19 21:32:18 +01:00
Martijn van Groningen c2e4fe375d Test: Fixed and cleanup bootstrap test
Original commit: elastic/x-pack-elasticsearch@7455bd8c00
2014-11-19 21:27:51 +01:00
Martijn van Groningen 19622d4f0b Moved more initialization responsibilty to AlertManager.
Original commit: elastic/x-pack-elasticsearch@5799ecbd23
2014-11-19 18:08:56 +01:00
javanna 34a69cd1cf SSL: make sure SSLService is loaded only when needed
Our two transport impls depend on the SSLService at this point. Although we bind the SSLService only if ssl is enabled, it gets loaded anyway as it's a required dependency for the transports. We need to declare the dependency nullable and bind a null service manually when ssl is off.

Also resolved a couple of compiler warnings in SSLService and renamed some of its variables for better readability.

Closes elastic/elasticsearch#359

Original commit: elastic/x-pack-elasticsearch@2c99b2052e
2014-11-19 16:02:54 +01:00
Martijn van Groningen 506daca17e Added state to AlertManager that replaced the started flag.
This helps us preventing endless re-loading logic while a node steps down as master while while we in the process of starting alert store and action manager.

Original commit: elastic/x-pack-elasticsearch@e18c8215a9
2014-11-19 15:12:52 +01:00
uboness 50556c120c [Cleanup] - Added SSLModule
Moved the SSLService binding to its own module

Original commit: elastic/x-pack-elasticsearch@b08662c680
2014-11-19 14:08:53 +01:00
uboness 8783abcc6f Empty list of privileges should be skipped
When a role is configured with an entry with an empty list of privileges (cluster or indices), the entry should be skipped.

Fixes elastic/elasticsearch#339

Original commit: elastic/x-pack-elasticsearch@44d957529e
2014-11-19 14:05:02 +01:00
Alexander Reelsen f004275641 Refactoring: Make TransportFilter work for inbound connections only
As netty uses different bootstraps for sending/receiving requests, having a
single interface for filtering incoming/outgoing messages does not make a
lot of sense.

This commit changes from a TransportFilter interface to a InboundTransportFilter
interface, which is only able to filter incoming messages - which is all we do
anyway right now.

Original commit: elastic/x-pack-elasticsearch@545ff24136
2014-11-19 13:56:28 +01:00
Brian Murphy 8615cdb6af CLEANUP : remove extraneous logging statement.
Original commit: elastic/x-pack-elasticsearch@b6dd5601b9
2014-11-19 12:04:15 +00:00
Brian Murphy 2954f5f9c2 Fix alert history entry parsing
This commit fixes the alert history parsing that was causing the tests to fail.
It now just warns on null fields and sets the search request on alert history entry creation.

Original commit: elastic/x-pack-elasticsearch@09d2b09b79
2014-11-19 11:57:14 +00:00
jaymode 17d2d0b1f9 Print message when attempting to delete a user that doesn't exist
Previously the userdel command always returned success regardless
of whether the user exists or not. When the user does not exist, a
message is now shown indicating that the user was not found.

Closes elastic/elasticsearch#346

Original commit: elastic/x-pack-elasticsearch@fb45d844ca
2014-11-19 06:29:43 -05:00
Martijn van Groningen 71d9feb9d0 Disabled request and response object fields in the alerthistory mapping template
Original commit: elastic/x-pack-elasticsearch@01aa6aa526
2014-11-19 12:23:41 +01:00
Martijn van Groningen a6089ce8ac Dropped the binary request and response fields and rely fully on the response and request object fields.
Closes elastic/elasticsearch#36

Original commit: elastic/x-pack-elasticsearch@51370ac47d
2014-11-19 12:01:55 +01:00
Brian Murphy 7f177281ae TEST : Add alert history bootstrap test
This test checks if the alert history entries are loaded correctly at startup.
Also included in this commit are the fixes needed to pass this test.

Original commit: elastic/x-pack-elasticsearch@2a7859e495
2014-11-19 10:45:37 +00:00
Brian Murphy 84680f84b3 TESTS : Fix the alert stats test failure and some cleanup and docs.
This test fixes the alert stats test failures due the the scope being suite scope
which meant that the pass/fail was dependent on execution order for the clean start test.
Also add asciidoc for alert stats.

Original commit: elastic/x-pack-elasticsearch@be3ff86359
2014-11-19 09:33:16 +00:00
c-a-m a59b389967 [TEST] Fixes the ssl configuration of the rest tests
The rest tests were configured with transport and http settings for ssl.  This
changes that to the shield.ssl settings.

Original commit: elastic/x-pack-elasticsearch@19b96f7fa3
2014-11-18 17:00:30 -07:00
Brian Murphy 90a214f9ab TEST fix the stats test.
Original commit: elastic/x-pack-elasticsearch@021cb7d5f2
2014-11-18 16:03:06 +00:00
Brian Murphy 7d27fdfc4b TEST fix the alert serialization test to look at each field instead of compairing alerts directly.
Original commit: elastic/x-pack-elasticsearch@2d0d4ce6df
2014-11-18 15:46:17 +00:00
Brian Murphy 6e7ea3cc5b Core: Add javadocs and add refresh to queue loading
This commit adds javadocs to the Request/Response/Action classes and
Adds a refresh to the loading of both the action queue and the alerts.

Original commit: elastic/x-pack-elasticsearch@853be114dd
2014-11-18 15:42:22 +00:00
c-a-m eaac7ff250 This adds a static clear method fot LdapSSLSocketFactory for testing
This clears the LdapSSLSocketFactory "singleton" for reproducible tests.

Fixes https://github.com/elasticsearch/elasticsearch-shield/issues/336

Original commit: elastic/x-pack-elasticsearch@baa3a2ce60
2014-11-18 08:07:39 -07:00
c-a-m a224b54973 Simplied SSL keystores and truststores
This puts one keystore in the SSLService.  An optional truststore can be configured but the
keystore defaults as the truststore.  This change also removed the ability to do certificate authentication with clients.

Resolves https://github.com/elasticsearch/elasticsearch-shield/issues/292

Original commit: elastic/x-pack-elasticsearch@59920db32a
2014-11-18 08:07:27 -07:00
Brian Murphy 5491e8e4b3 TESTS : Add stats test and bootstrap test
This commit adds tests for the stats API along with a bootstrap test.
The bootstrap test is currently failing outside of a debugger for me so I'm digging into it.

Original commit: elastic/x-pack-elasticsearch@db497a6b51
2014-11-18 11:17:00 +00:00
Martijn van Groningen 43043ce3ce Added `search_type` option to the trigger search in an alert.
The default `search_type` is `count`.

Closes elastic/elasticsearch#38

Original commit: elastic/x-pack-elasticsearch@8e87aaea36
2014-11-17 19:02:23 +01:00