Commit Graph

1740 Commits

Author SHA1 Message Date
Martijn van Groningen 90d0cb22ac unmuted test
Original commit: elastic/x-pack-elasticsearch@8bd95e427e
2015-08-31 21:28:18 +02:00
Martijn van Groningen 896ee0447c test: properly delegate the ShieldIntegTestCase#transportClientPlugins() and ShieldIntegTestCase#nodePlugins() methods to the settings source.
Original commit: elastic/x-pack-elasticsearch@7d55833917
2015-08-31 17:54:48 +02:00
Martijn van Groningen 067c2e0709 fix qa smoke tests
Original commit: elastic/x-pack-elasticsearch@b3a2e0bc38
2015-08-31 17:36:23 +02:00
jaymode a63f4d3678 suppress the LocalTransport for all Shield tests
Original commit: elastic/x-pack-elasticsearch@6c0b840643
2015-08-31 09:50:22 -04:00
Martijn van Groningen bd6111e9a7 updated await fix url
Original commit: elastic/x-pack-elasticsearch@e1646af2cd
2015-08-31 15:40:38 +02:00
Jason Tedor 36b5eaf09b Add test to ensure that ShieldServerTransportService wraps all handlers
This commit adds a test to ensure that all request handlers are wrapped
by ProfileSecuredRequestHandler.

Original commit: elastic/x-pack-elasticsearch@26473d0ddc
2015-08-31 08:30:35 -04:00
jaymode fb11827f78 mute TribeTests and remove license plugin from transportClientPlugins
See elastic/elasticsearch#551

Original commit: elastic/x-pack-elasticsearch@1d2ba3fc0e
2015-08-31 08:24:05 -04:00
Martijn van Groningen 1786e8eb10 test: use mock node to supply the plugins
Original commit: elastic/x-pack-elasticsearch@3f1aa333e8
2015-08-31 13:37:37 +02:00
David Pilato 13d5619d4e Merge branch 'pr/typo'
Original commit: elastic/x-pack-elasticsearch@73d7f06605
2015-08-31 13:15:14 +02:00
Boaz Leskes d75a8b8d6c Update handler list for change in Upgrade action
See https://github.com/elastic/elasticsearch/pull/13205

Original commit: elastic/x-pack-elasticsearch@8759f59eb5
2015-08-31 13:05:05 +02:00
Martijn van Groningen fd84ea7e90 test: make sure plugins are loaded in transport client
Original commit: elastic/x-pack-elasticsearch@81dd18d8b8
2015-08-31 13:01:39 +02:00
Martijn van Groningen b79be0db42 muted test
Original commit: elastic/x-pack-elasticsearch@112546cad9
2015-08-31 12:58:10 +02:00
Martijn van Groningen 677cf7e573 delegate
Original commit: elastic/x-pack-elasticsearch@5999c5d17b
2015-08-31 12:58:03 +02:00
Martijn van Groningen c81af81cd3 test: more fixes due to upstream changes
Original commit: elastic/x-pack-elasticsearch@92119d102c
2015-08-31 12:30:05 +02:00
Tanguy Leroux 0dbd13b67c Marvel: Update tests due to changes in elasticsearch core
Original commit: elastic/x-pack-elasticsearch@7224989d22
2015-08-31 11:46:58 +02:00
Martijn van Groningen 98f5f489d0 test: more fixes due to upstream test infrastructure changes
Original commit: elastic/x-pack-elasticsearch@ab2dcca86d
2015-08-31 11:45:33 +02:00
David Pilato 88e389dd2e [typo] LICESE_EXPIRATION_ACTION_MATCHER should be LICENSE_...
Original commit: elastic/x-pack-elasticsearch@1e91087de7
2015-08-31 11:19:11 +02:00
Martijn van Groningen af4af34e2b fix compile errors
Original commit: elastic/x-pack-elasticsearch@38feef1376
2015-08-31 10:47:49 +02:00
Jason Tedor c09c5611b8 Add override of handler registration method to wrap handler
Original commit: elastic/x-pack-elasticsearch@4dcfb637c2
2015-08-30 17:49:56 -04:00
Jason Tedor 8cc9531bcb Update for API changes in 5e2efcfe09
Original commit: elastic/x-pack-elasticsearch@5cf5f71ba6
2015-08-30 12:42:29 -04:00
Boaz Leskes add8dd4cc4 Update handler list for changes made in https://github.com/elastic/elasticsearch/pull/12944
Original commit: elastic/x-pack-elasticsearch@2dcbf8bc99
2015-08-30 09:16:34 +02:00
Martijn van Groningen 967a3d1da2 test: if notify is not null and needs to be unequal then just invert notify
Original commit: elastic/x-pack-elasticsearch@2de9536c9c
2015-08-28 19:57:10 +02:00
Tanguy Leroux a14a11ebdb Marvel: Mute IndexStatsCollectorTests
Original commit: elastic/x-pack-elasticsearch@aaea8e8715
2015-08-28 16:24:56 +02:00
jaymode d6eb2c8261 do not copy the authorization header from rest requests
Currently we copy the authorization header from every rest request to the action request. This is not
necessary because the user associated with each request is copied into the context and then if the
request leaves the node, the user will be serialized into a string and attached as a header.

This commit removes the copying of the authorization header as it is not necessary and by not copying
it, we limit the amount of copies we make of this sensitive information.

Original commit: elastic/x-pack-elasticsearch@4e5ba4b4aa
2015-08-28 09:04:39 -04:00
Tanguy Leroux 0e365a7670 Marvel: Add indices.count in Cluster Stats
Closes elastic/elasticsearch#517

Original commit: elastic/x-pack-elasticsearch@6ecbf3d1ee
2015-08-28 13:50:09 +02:00
Martijn van Groningen fc9aff30bc fixed forbidden api failures:
Arrays.newArrayList() -> new ArrayList<>()
ImmutableSet.of() -> Collections.emptyList()

Original commit: elastic/x-pack-elasticsearch@a36a4eaa16
2015-08-28 10:18:48 +02:00
debadair 6da0a38ebf Set up Marvel 2.0 docs structure.
Original commit: elastic/x-pack-elasticsearch@344c7c2458
2015-08-27 10:31:37 -07:00
Martijn van Groningen 5f01f793d5 Added document and field level security
This commit adds document and field level security to Shield.

Field level security can be enabled by adding the `fields` option to a role in the `role.yml` file.

For example:

```yaml
customer_care:
  indices:
    '*':
      privileges: read
      fields:
        - issue_id
        - description
        - customer_handle
        - customer_email
        - customer_address
        - customer_phone
```

The `fields` list is an inclusive list of fields that controls what fields should be accessible for that role. By default all meta fields (_uid, _type, _source, _ttl etc) are also included, otherwise ES or specific features stop working. The `_all` field if configured, isn't included by default, since that actually contains data from all the other fields. If the `_all` field is required then this needs to be added to the `fields` list in a role. In the case of the content of the `_source` field and `_field_names` there is special filtering in place so that only the content relevant for the role are being returned.

If no `fields` is specified then field level security is disabled for that role and all fields in an index are accessible.

Field level security can be setup per index group.

Field level security is implemented at the Lucene level by wrapping a directory index reader and hides fields away that aren't in the `field` list defined with the role of the current user. It as if the other fields never existed.

* Any `realtime` read operation from the translog is disabled. Instead this operations fall back to the Lucene index, which makes these operations compatible with field level security, but there aren't realtime.
*  If user with role A executes first and the result gets cached and then a user with role B executes the same query results from the query executed with role A would be returned. This is bad and therefore the query cache is disabled.
* For the same reason the request cache is also disabled.
* The update API is blocked. An update request needs to be executed via a role that doesn't have field level security enabled.

Document level security can be enabled by adding the `query` option to a role in the `role.yml` file:
```yaml
customer_care:
  indices:
    '*':
      privileges: read
      query:
        term:
         department_id: 12
```

Document level security is implemented as a filter that filters out documents there don't match with the query. This is like index aliases, but better, because the role query is embedded on the lowest level possible in ES (Engine level) and on all places the acquire an IndexSearcher the role query will always be included. While alias filters are applied at a higher level (after the searcher has been acquired)

Document level security can be setup per index group.

Right now like alias filters the document level security isn't applied on all APIs. Like for example the get api, term vector api, which ignore the alias filter. These apis do acquire an IndexSearcher, but don't use the IndexSearcher itself and directly use the index reader to access the inverted index and there for bypassing the role query. If it is required to these apis need document level security too the the implementation for document level security needs to change.

Closes elastic/elasticsearch#341

Original commit: elastic/x-pack-elasticsearch@fac085dca6
2015-08-27 17:54:50 +02:00
Tanguy Leroux 64bbc110ff Marvel: Fixes for Index Stats Collector tests
Original commit: elastic/x-pack-elasticsearch@4fdc11946e
2015-08-27 14:14:07 +02:00
Tanguy Leroux 38061c5f98 Marvel: Wait for shard allocation in IndexStatsCollectorTests
Original commit: elastic/x-pack-elasticsearch@f75c36f945
2015-08-26 18:00:19 +02:00
jaymode 049ff4cc9f add OSS snapshots as a plugin repository to resolve custom enforcer rule
Original commit: elastic/x-pack-elasticsearch@96e052b2de
2015-08-26 11:26:21 -04:00
Tanguy Leroux 8e5521a427 Move license status as calculated method
Original commit: elastic/x-pack-elasticsearch@92ce1d9d55
2015-08-26 10:26:27 +02:00
Tanguy Leroux 8d48382bab Marvel: Mute LicensesRendererIT test
Awaits fix for elastic/elasticsearchelastic/elasticsearch#13017

Original commit: elastic/x-pack-elasticsearch@d63df50a4a
2015-08-26 10:13:24 +02:00
Areek Zillur b24378b775 [TEST] add assertion message
Original commit: elastic/x-pack-elasticsearch@20a8b5ed1a
2015-08-26 00:24:32 -04:00
uboness f9a8c8937c fixes for hipchat integration tests
Original commit: elastic/x-pack-elasticsearch@df6311799b
2015-08-25 20:05:46 +02:00
uboness 5b363f1041 [watcher] Rename `Template` to `TextTemplate`
We have different types of templates in watcher - http request template, email template, hipchat message template, and simple text template... to avoid confusion, and clean up the codebase, this commit renames the `Template` class to `TextTemplate` to better convey what this template is about.

Original commit: elastic/x-pack-elasticsearch@8e5202019c
2015-08-25 16:19:50 +02:00
jaymode 693d16777c correct the shield offline download links
Closes elastic/elasticsearch#499

Original commit: elastic/x-pack-elasticsearch@86a8015132
2015-08-25 10:00:58 -04:00
uboness 0731a98e97 Introducing HipChat Action
An action capable of sending notifications to rooms and users on hipchat. This actions support three types of HipChat APIs:

- `v1` - The (now deprecated) legacy API where a token can be registered at the group level, and the `v1` version of the API can be used. This API only supports room notification (users cannot be notified). multi-room notification is supported.

- `integration` - The basic integration that one can create in HipChat (it is using the `v2` API version), where notifications can be sent to a single room. User notification is unsupported by this API

- `user` - this API uses an API token of a specific user. An admin user can create an API token and configure it to have access to room notification and user private messaging. This API supports multi-room and multi-user notifications.

The settings for `hipchat` are very similar to the `email` infrastructure in nature. It is possible to configure multiple/different hipchat account, each is associated with the api type (a.k.a profile) - can be `v1`, `integration` or `user`, and the respective `auth_token`. When configuring the action in the watch, one can specify what hipchat account they would like to use (when not specifying an account, the `default_account` will be used). Each account can also specify its own unique `host`/`port` for the hipchat server - for full flexibility.

Closes elastic/elasticsearch#462

Original commit: elastic/x-pack-elasticsearch@9d9ee13542
2015-08-25 14:05:49 +02:00
Tanguy Leroux 78a70b5f65 Marvel: Fix test bug in MarvelSettingsTests
Original commit: elastic/x-pack-elasticsearch@6a68f61051
2015-08-25 13:31:22 +02:00
Tanguy Leroux 4d65f396c8 Marvel: Stop collecting data X days after license expiration
Closes elastic/elasticsearch#370, elastic/elasticsearch#470

Original commit: elastic/x-pack-elasticsearch@7ed95605ff
2015-08-25 10:47:59 +02:00
Areek Zillur ef7d4e2579 stub out acknowledge callbacks for commercial plugins
Original commit: elastic/x-pack-elasticsearch@d16f9dc1df
2015-08-24 18:25:40 -04:00
Areek Zillur 0b9021ee87 Add license acknowledgment mechanism for consumer plugins to notify users when they attempt to install a new license
closes elastic/elasticsearch#461

Original commit: elastic/x-pack-elasticsearch@bc30ac2871
2015-08-24 18:25:29 -04:00
jaymode f879ccf426 update version numbers in shield documentation to 2.1.0
Cherry-pick of commit to 2.0 and updated to change version to 2.1.0

Original commit: elastic/x-pack-elasticsearch@8672bbf1b1
2015-08-24 11:23:20 -04:00
Martijn van Groningen 31f3830cf7 unmuted scan parse tests and don't be strict when parse the search type. (Watcher fails when it sees scan is being used)
Closes elastic/elasticsearch#484

Original commit: elastic/x-pack-elasticsearch@fea5d6a22d
2015-08-24 14:12:08 +02:00
Alexander Reelsen 1177c9ee53 Release: Add release script for S3 uploading
In order to adhere to our elasticsearch core release script,
this script allows you to use a staging release to build x-plugins
against it, and then upload the created artifacts to the same
s3 bucket, so people can actually test the whole package of core
plus x-plugins.

Please read the documentation in the RELEASE.md document to understand
when to run which script!

Original commit: elastic/x-pack-elasticsearch@a43ce25b6f
2015-08-23 13:37:50 +02:00
Simon Willnauer e723c355d8 Remove unused imports - SpawnModules.java is removed
Original commit: elastic/x-pack-elasticsearch@717d38694d
2015-08-23 13:03:50 +02:00
Robert Muir 18702cae00 Bootstrap -> BootstrapInfo
Original commit: elastic/x-pack-elasticsearch@c40454618b
2015-08-22 08:41:55 -04:00
Ryan Ernst 67d9b94c5f Merge pull request elastic/elasticsearch#489 from rjernst/one_way_process
Remove use of PreProcessModule

Original commit: elastic/x-pack-elasticsearch@8b6a5c7ade
2015-08-21 19:27:19 -07:00
Ryan Ernst 670b9b5ce8 Remove use of PreProcessModule
PreProcessModule was an alternate way to customize another module's
behavior inside plugins. The preferred (and only in the future) way to
do this is with onModule in the plugin itself. This change moves the
only two remaining users of PreProcessModule to do so in their
respective plugins. The use case was adding roles for shield
authorization, but these roles were really static, so there was no
reason they could not be configured up front.

Original commit: elastic/x-pack-elasticsearch@e67ac2dcb6
2015-08-21 14:23:23 -07:00
jaymode 204bb2accb fix custom realm integration tests on windows
Original commit: elastic/x-pack-elasticsearch@d5a8722502
2015-08-21 14:08:43 -04:00