Commit Graph

63 Commits

Author SHA1 Message Date
Robert Muir e516427bfc bump version to 2.0.0.beta1-SNAPSHOT and fix broken assert.
this was already done in ES core, but commercial plugins are now sitting out of sync.

also 'mvn verify' would sometimes fail, because apparently the list of plugins from the plugin api
is not defined (my suspicion: filesystem order, which is undefined). For now I changed the assert
to allow any order.

Original commit: elastic/x-pack-elasticsearch@9ea0ac457f
2015-07-09 20:04:08 -04:00
Robert Muir bdb36263b3 get ES server started and stopped with shield... but many problems
Original commit: elastic/x-pack-elasticsearch@c6b6bc4c10
2015-07-09 02:48:45 -04:00
Robert Muir 1d0d30538d Disable integ test until we fix it to install license-plugin
Original commit: elastic/x-pack-elasticsearch@25f5d96b71
2015-07-08 03:23:49 -04:00
Robert Muir e09806e21e Merge pull request elastic/elasticsearch#962 from rmuir/integ_testing
Get basic integ test working... fixes broken groupids etc.

Original commit: elastic/x-pack-elasticsearch@7d0262c29a
2015-07-07 09:50:30 -04:00
Robert Muir 23190e4aff Get basic integ test working... fixes broken groupids etc.
Note currently this just installs the plugin. we need to add some
more logic to really get some kind of integ test working with rest tests.
e.g. we need to install the license plugin. I will look into this as a followup.

Original commit: elastic/x-pack-elasticsearch@ebc507a1fb
2015-07-07 09:42:12 -04:00
jaymode af377e6608 re-enable rest tests
Original commit: elastic/x-pack-elasticsearch@145d449099
2015-07-07 09:34:51 -04:00
uboness bca8f140c2 disabling rest tests
first focusing on getting a successful build without them

Original commit: elastic/x-pack-elasticsearch@cfc1e97c43
2015-07-03 20:38:19 +02:00
Konrad Beiske 31e2516fd6 Changed to depend only on license-plugin-api in main scope
Original commit: elastic/x-pack-elasticsearch@e508b73033
2015-07-02 11:04:29 -04:00
Konrad Beiske 44909bdcd6 Attach zip assembly as artifact to build when deploying internally
Attaching the zip assembly as an artifact to the build will include it when deploying to maven repositories. This will in turn facilitate testing Elasticsearch snapshot versions in a Found environment. We need to to that in order to cut down the delay from a release is made until it is available on Found.

Original commit: elastic/x-pack-elasticsearch@27516c7243
2015-07-02 16:18:03 +02:00
jaymode aef47ecc47 mute the render_search_template rest tests for now
These tests trip a Shield assertion. Need to look into how to proceed in detail.

See elastic/elasticsearch#946

Original commit: elastic/x-pack-elasticsearch@b5027ce105
2015-06-30 18:25:42 -04:00
Robert Muir 9edfd2f0d0 remove jar hell
Original commit: elastic/x-pack-elasticsearch@205e35baf9
2015-06-30 00:59:05 -04:00
Robert Muir ebd515e6ee Use elasticsearch securemock library
Original commit: elastic/x-pack-elasticsearch@b44c85ca99
2015-06-29 10:38:52 -04:00
jaymode a5eefb6259 use UTC dates for audit indexing
Previously, we were just using the current time in milliseconds from the system
for dates and the indices were not being created for UTC dates. This change
uses UTC dates for timestamps and indices resolution for index auditing.

This also ensures that custom shield forbidden apis for tests are enforced.

Closes elastic/elasticsearch#916

Original commit: elastic/x-pack-elasticsearch@724d12cb7a
2015-06-18 14:25:38 -04:00
jaymode cb80e9ccbd add mapping and configurable settings for audit index output
Previously we relied on the default dynamic mapping for the audit index output, which did
not create an ideal mapping. This change adds a mapping file with default settings and
dynamic mapping disabled for the audit indexes.

Additionally, the ability to override settings for the audit indexes has been provided so that
users can customize the number of shards and replicas to meet their needs.

In order to implement these changes, the index audit service had to be moved from a lifecycle
component to an abstract component that had its own custom lifecycle on top of the cluster
state. A ShieldLifecycleService class was added to accomplish this. In the future, this class
can be used for other services that need to perform index based operations.

Closes elastic/elasticsearch#913

Original commit: elastic/x-pack-elasticsearch@231740c1cc
2015-06-16 13:33:03 -04:00
jaymode 1c54d49a71 remove use of shaded core packages
Elasticsearch core no longer uses shaded dependencies by default, so this change makes
the plugin use the unshaded dependencies.

Original commit: elastic/x-pack-elasticsearch@495f636266
2015-06-06 15:37:24 -04:00
jaymode 6e660dbd7d remove commons codec dependency
This commit removes the commons codec dependency and simplifies the
hasher code by only supporting bcrypt encryption in the users file. All tests
now also exercise the esusers realm with bcrypt instead of plain text passwords.

Closes elastic/elasticsearch#806

Original commit: elastic/x-pack-elasticsearch@3119267851
2015-06-01 07:52:38 -04:00
jaymode 7c4ce5760f Test: workaround JNA being required on windows now
Adds JNA as a test time dependency to work around it being required on
windows in elasticsearch core.

Original commit: elastic/x-pack-elasticsearch@b8fc70a051
2015-05-26 15:26:01 -04:00
jaymode 39915f92bc update shield to depend on elasticsearch 2.0
This commit is a squashed commit of work done in conjunction with @rmuir to make
shield work properly with elasticsearch 2.0. This includes ensuring all tests
pass when running with the security manager and updating the code to be compatible
with the latest core forbidden apis.

Shield is now a child project of elasticsearch-parent and inherits a lot of common
build, test, and static coverage functionality from that project resulting in a much
smaller and simpler pom.xml for shield. As part of this work, Shield can now read
rest tests from the elasticsearch jar so the rest tests are run automatically when
running the slow tests.

Original commit: elastic/x-pack-elasticsearch@2ebbf4284a
2015-05-26 13:57:58 -04:00
jaymode 39f587a497 [CLI] attempt to restore owner and group on new files
For the CLI tools in Shield we create a new temp file and replace the existing file
to prevent issues with reloading a half written file. This has a potential side effect
of changing the user and group that own the file. Many times the commands are
run with root privileges (sudo) and when run with root privileges we can actually
reset the owner and group correctly.

Closes elastic/elasticsearch#812

Original commit: elastic/x-pack-elasticsearch@1ee3715376
2015-04-21 07:32:44 -04:00
jaymode aec8982996 Build: rename zip to shield-version.zip
As part of the release process, the shield zip files are renamed prior to
uploading to the downloads server. This change removes the need to
rename the file.

Closes elastic/elasticsearch#760

Original commit: elastic/x-pack-elasticsearch@f1822d9d4c
2015-04-07 13:47:23 -04:00
uboness b0ef266601 moved to elasticsearch 1.5.0
Original commit: elastic/x-pack-elasticsearch@c9fdf1f81a
2015-03-23 18:04:58 +01:00
jaymode f2b493fa96 Upgrade elasticsearch dependency to 1.5.0-SNAPSHOT
This upgrades the elasticsearch dependency to 1.5.0-SNAPSHOT and removes
classes/functionality that were incorporated back into elasticsearch.

Closes elastic/elasticsearch#669

Original commit: elastic/x-pack-elasticsearch@65b76c41fb
2015-03-19 09:56:19 -04:00
jaymode 121a20ca87 [test] add lucene expressions jar as test dependency
REST tests that use expressions as the script language requires the
lucene-expressions library to be loaded.

Original commit: elastic/x-pack-elasticsearch@c0f2b8a4b2
2015-02-24 15:23:55 -05:00
jaymode 4de8d04f9f [ldap] Migrate to using UnboundID SDK for LDAP
This migrates all of the LDAP code off of JNDI and makes use of the UnboundID
SDK to perform LDAP communication. As much as possible the behavior has
remained consistent. The minimum ldap search timeout is now 1s as UnboundID
only accepts this timeout in seconds; previously a value in milliseconds could be
specified.

Closes elastic/elasticsearch#694

Original commit: elastic/x-pack-elasticsearch@dd1c92bf91
2015-02-18 07:38:47 -05:00
Robert Muir e7f141bd5c use brics automaton instead of lucene, so we don't depend on lucene
Closes elastic/elasticsearch#710

Original commit: elastic/x-pack-elasticsearch@71ca4e6241
2015-02-12 15:24:42 -05:00
uboness 2582f4bb22 moving version to 2.0.0-SNAPSHOT
Original commit: elastic/x-pack-elasticsearch@51f1ee293f
2015-01-27 11:31:15 +01:00
uboness f43dda3abc changed license version to 1.0.0
Original commit: elastic/x-pack-elasticsearch@7b1f2428f8
2015-01-27 10:57:12 +01:00
uboness e7aeaee734 moving version to 1.0.0
Original commit: elastic/x-pack-elasticsearch@0a1c282324
2015-01-27 10:29:54 +01:00
uboness ac6b82ef7c Updated licensing behaviour
- on license expiration, we only block cluster stats/health and indices stats.
- depend on the latest snapshot of the licensing plugin that supports registrations of expiration callbacks
- registering expiration callbacks to periodically log and warn about license expiration (pre and post expiration)

Original commit: elastic/x-pack-elasticsearch@5aee30fac4
2015-01-24 00:25:06 +01:00
uboness 27fd142e0c Fixed version back to SNAPSHOT
Original commit: elastic/x-pack-elasticsearch@81b4d4cd09
2015-01-23 19:38:35 +01:00
uboness 8b95d0f71c Updated pom.xml
Changes reflect the restructuring of elasticsearch maven repo

- changed the repository names (for consistency sake)
- elasticsearch repositories now point to `/releases` and `/snapshots`
- added `deploy-internal` and `deploy-public` profiles

Original commit: elastic/x-pack-elasticsearch@92709ce38a
2015-01-23 15:10:18 +01:00
Alexander Reelsen 2986502984 CLI Tools: Add command to check for same permissions and owners after run
In case the creation of files changed the owner, group or the permissions, this command
will write an error message to the console.

Relates elastic/elasticsearch#517

Original commit: elastic/x-pack-elasticsearch@49aab5f712
2015-01-22 19:13:45 +01:00
javanna 98c3531bf9 move to es core 1.4.2
This commit moves the es core dependency to 1.4.2, which becomes the minimum version required from now on.

Changes made accordingly to this decision since we can break backwards compatibility and assume es core>=1.4.2

Closes elastic/elasticsearch#562

Original commit: elastic/x-pack-elasticsearch@484b4a2528
2015-01-19 08:24:18 +01:00
Alexander Reelsen 431f30893f Cleanup: Split service transport service for client & server
In order to be more flexible this clean up commit splits the
TransportService into a client and server one. As part of this
we can safely remove the slightly misused TransportFilters class.

Renamed shield.type from server to node, so we can differentiate between node2node and node2client communication.

Original commit: elastic/x-pack-elasticsearch@a3a2f9bf38
2014-12-16 14:28:32 +01:00
javanna e3768b6cff [TEST] upgrade randomized runner to 2.1.11
2.1.11 contains the fix for this issue: carrotsearch/randomizedtestingelastic/elasticsearch#179 which will resolve these recurring failures described in elastic/elasticsearch#386.

Closed elastic/elasticsearch#490

Original commit: elastic/x-pack-elasticsearch@3a396d6302
2014-12-15 13:48:04 +01:00
javanna 8320be7b09 Build: add scm info to pom.xml
Build number maven plugin requires this info to retrieve the build number and make it available as a variable, which is then published through RestShieldInfoAction, which is currently null. This commit makes sure the build number gets currently published.

Closes elastic/elasticsearch#428

Original commit: elastic/x-pack-elasticsearch@0a2bc7646b
2014-12-05 12:42:44 +01:00
javanna 02c3601ac5 Build: fix dependencies order in pom
tests-framework.jar must be before lucene-core.jar

Original commit: elastic/x-pack-elasticsearch@7aa48f737a
2014-12-05 08:49:36 +01:00
javanna 093d9a901c Packaging: set es core as provided dependency
Also update the assembly configuration and the commons-codec version

Closes elastic/elasticsearch#423

Original commit: elastic/x-pack-elasticsearch@27e76c5307
2014-12-05 07:41:19 +01:00
uboness e646fd5edc Integration with license plugin
- Added a `LicenseService` to handle license feature enable/disable events
 - LicenseEventNotifier is responsible for notifying the license events to whatever registered listeners that are interested in them
 - In Shield, when a license is disabled for `shield` feature, we block all read operations (done in the `ShieldActionFilter`)
 - Added initial documentation around licensing

Closes elastic/elasticsearch#347

Original commit: elastic/x-pack-elasticsearch@6ba7a10cd4
2014-12-04 20:49:35 +01:00
javanna a995ed9cca [TEST] allow to configure tests.timezone and tests.locale
tests.timezone and tests.locale are values that gets randomized all the time (even without configuring them). They don't get printed yet out with shield failures as this was only recently added to es core, but it makes sense to get ready and allow to configure them for better test repeatability.

Also removed support for es.node.mode and es.node.local as we always use network since we test with unicast discovery only.

Original commit: elastic/x-pack-elasticsearch@d03fa0c162
2014-11-27 11:40:13 +01:00
Alexander Reelsen 2f4fb2cf48 Dependencies: Upgrade to Elasticsearch 1.4.0
* Configuring the transport pipeline has changed due to adding profiles in 1.4
* Lots of tests needed to be changed in order to not leave thread pools around
* ApacheDs leaves a thread lingering around, thus a ThreadLeakFilter needed to be added

Original commit: elastic/x-pack-elasticsearch@de35362fc4
2014-11-06 12:03:49 +01:00
Alexander Reelsen 4903852f48 Packaging: Include build information
Also added a ShieldBuild class to return

* Shield version
* Shield build hash
* Shield build timestamp

Also added a '/_shield' endpoint which returns those fields.

Original commit: elastic/x-pack-elasticsearch@38928d1ef6
2014-11-05 10:28:02 +01:00
Alexander Reelsen d608fe2b60 Build: Enable resource filtering to include version
Closes elastic/elasticsearch#200

Original commit: elastic/x-pack-elasticsearch@2cbf0cecf6
2014-10-24 09:37:43 -07:00
Bill Hwang 2a1ce81960 [CI] Added static analysis dependencies
Modified pom.xml to do static analysis without Jenkins

'mvn -DskipTests=true -Pstatic clean compile site' to start analysis
The reports are at target/site/project-reports.html.

Original commit: elastic/x-pack-elasticsearch@ddec28e8d0
2014-10-07 11:06:35 -06:00
javanna 5b1dd41f23 Move to elasticsearch-1.4.0.Beta1 (no snapshot)
Original commit: elastic/x-pack-elasticsearch@18c93bcae2
2014-10-02 15:42:21 +02:00
Michael McCandless 3b1ae0b593 Upgrade to Lucene 4.10.1
Original commit: elastic/x-pack-elasticsearch@31273b6769
2014-10-01 05:15:49 -04:00
Alexander Reelsen 2fbf4436aa Dependencies: Updating to elasticsearch 1.4.0.Beta1
Original commit: elastic/x-pack-elasticsearch@66cc907790
2014-10-01 11:11:33 +02:00
Michael McCandless d9d5cbeb32 upgrade to Lucene 4.10.1 snapshot
Original commit: elastic/x-pack-elasticsearch@d41ba71039
2014-09-24 16:35:42 -04:00
javanna 723725753a [TEST] Make it possible to run REST tests against es+shield
Added `ShieldRestTests` that extends `ElasticsearchRestTests` allowing to run REST tests against es+shield. Tests won't be run by default as they require additional configuration (e.g. rest tests and spec location on file system). They can be activated via `-Dtests.rest=true`. Rest tests and spec location can be provided as follows:

```
-Dtests.rest.spec=/path/to/elasticsearch/rest-api-spec/api -Dtests.rest.suite=/path/to/elasticsearch/master/rest-api-spec/test
```

Some tests need to be blacklisted at this moment as follows:

```
-Dtests.rest.blacklist=scroll/*/*,mpercolate/*/*,msearch/*/*
```

Closes elastic/elasticsearch#79

Original commit: elastic/x-pack-elasticsearch@6f3e72dd87
2014-09-19 17:08:17 +02:00
javanna fee5a30f7f Update es core version to 1.4.0.Beta-SNAPSHOT
Original commit: elastic/x-pack-elasticsearch@acd0ab0292
2014-09-15 15:46:24 +02:00