Commit Graph

3744 Commits

Author SHA1 Message Date
javanna 5c31e20746 Use ContentType constant instead of RestClient#JSON_CONTENT_TYPE
Original commit: elastic/x-pack-elasticsearch@6f3165b569
2016-07-19 16:42:32 +02:00
javanna ca557af48c Merge branch 'master' into feature/async_rest_client
Original commit: elastic/x-pack-elasticsearch@693e281d0d
2016-07-19 16:29:50 +02:00
Court Ewing ca233990e1 Merge pull request elastic/elasticsearch#2862 from ycombinator/reporting/fix-minor-typo-5.0
[5.0] Remove extra "the"

Original commit: elastic/x-pack-elasticsearch@392dd41ca8
2016-07-19 09:48:37 -04:00
Yannick Welsch ea7ad5d4c5 Add new transport handler introduced by elastic/elasticsearchelastic/elasticsearch#19287
Original commit: elastic/x-pack-elasticsearch@8e71782cba
2016-07-19 14:56:51 +02:00
Martijn van Groningen 7c12fa0eb6 Removed basic sanity test as it caused problems for the clients
Original commit: elastic/x-pack-elasticsearch@1bd7c82708
2016-07-19 10:59:23 +02:00
Martijn van Groningen cc7cfb7fd9 security: Added `set_security_user` ingest processor that enriches documents with user details of the current authenticated user
This is useful if an index is shared with many small customers, which are to small to have their own index or shard,
 and in order to share an index safely they will need to use document level security. This processor can then automatically
 add the username or roles of the current authenticated user to the documents being indexed, so that the DLS query can be simple. (`username: abc` only return data inserted by user abc)

Closes elastic/elasticsearch#2738

Original commit: elastic/x-pack-elasticsearch@f4df2f6d6f
2016-07-19 09:48:52 +02:00
Ryan Ernst a76a6b4e54 Internal: Simplify SecurityContext dependencies
Currently the security context is an object passed around to code
needing to check the user for the current request. Like recent
InternalClient changes, it current depends on the AuthenticationService,
but can be simplified by only knowing about the thread context and
crypto service. This change makes SecurityContext a class, instead of an
interface, and removes the dependency on AuthenticationService.

Original commit: elastic/x-pack-elasticsearch@b8af75e8cb
2016-07-18 17:00:55 -07:00
Ryan Ernst 7bb4c613eb Merge pull request elastic/elasticsearch#2857 from rjernst/deguice9
Remove guice from audit trail construction

Original commit: elastic/x-pack-elasticsearch@a7bf223893
2016-07-18 15:14:00 -07:00
Ryan Ernst 41eea741b8 Ensure index audit trail is bound for security lifecycle service
Original commit: elastic/x-pack-elasticsearch@bbe7ec0802
2016-07-18 15:13:10 -07:00
Ryan Ernst 411b29e7fa Merge branch 'master' into deguice9
Original commit: elastic/x-pack-elasticsearch@2474231dc1
2016-07-18 14:25:49 -07:00
Ryan Ernst 30b084d372 Merge pull request elastic/elasticsearch#2843 from rjernst/plugin_default_config
Switch to new plugin configuration for integ tests

Original commit: elastic/x-pack-elasticsearch@e2a5da4144
2016-07-18 14:19:52 -07:00
Ryan Ernst f03683fb18 Internal: Remove guice from audit trail construction
This change removes guice from audit trails.

Original commit: elastic/x-pack-elasticsearch@ace1f11dc4
2016-07-18 13:59:51 -07:00
Ryan Ernst c3a3898da9 Merge pull request elastic/elasticsearch#2844 from rjernst/deguice8
Remove guice from realms construction

Original commit: elastic/x-pack-elasticsearch@8bfeef931c
2016-07-18 13:55:12 -07:00
Ryan Ernst e2303f2584 Merge branch 'master' into deguice8
Original commit: elastic/x-pack-elasticsearch@8b273d3f8a
2016-07-18 13:54:43 -07:00
Ryan Ernst 2de185ac72 Merge pull request elastic/elasticsearch#2845 from rjernst/remove_script_proxy
Remove script service proxy

Original commit: elastic/x-pack-elasticsearch@c4a1dfda1a
2016-07-18 13:41:41 -07:00
Ryan Ernst 07c9903e8f Merge branch 'master' into remove_script_proxy
Original commit: elastic/x-pack-elasticsearch@0046ab598a
2016-07-18 13:41:21 -07:00
jaymode 67f473a992 test: mute ldap timeout tests
See elastic/elasticsearch#2849

Original commit: elastic/x-pack-elasticsearch@318307073e
2016-07-18 11:20:52 -04:00
Simon Willnauer 12c709ea3a Move over to dedicated TransportClient implementations (elastic/elasticsearch#2819)
Followup of elastic/elasticsearchelastic/elasticsearch#19435
Relates to elastic/elasticsearchelastic/elasticsearch#19412

Original commit: elastic/x-pack-elasticsearch@60f7047ea9
2016-07-18 15:43:29 +02:00
jaymode 34d04a8c78 security: mention comma-separated for IP and DNS name prompts
Original commit: elastic/x-pack-elasticsearch@3e58fc282a
2016-07-18 08:53:17 -04:00
jaymode 59fcb205b5 security: active directory and ldap realm improvements
This commit is a combination of enhancements and fixes to the active directory
and ldap realms. The active directory realm has been enhanced to add support
for authentication against multiple domains in a forest. The ldap realm has
been updated so that:

* attributes required for group resolution are loaded eagerly if possible
* user search can now be executed using unpooled connections
* the default search filter for groups now includes posixGroup and memberUid
to avoid users needed to understand ldap filters

Finally, the UnboundID LDAP SDK was upgraded to the latest version and some
long standing AwaitsFix were addressed.

Closes elastic/elasticsearch#20
Closes elastic/elasticsearch#26
Closes elastic/elasticsearch#1950
Closes elastic/elasticsearch#2145
Closes elastic/elasticsearch#2363

Original commit: elastic/x-pack-elasticsearch@63c9be2337
2016-07-18 08:39:57 -04:00
jaymode 5be3832889 security: add metadata to roles
This commit adds the ability to define metadata for roles. This metadata is currently
only used for the API and to indicate that a role is reserved. We can continue passing
on the metadata as needed, when necessary.

Closes elastic/elasticsearch#2036

Original commit: elastic/x-pack-elasticsearch@8b5f606138
2016-07-18 08:11:43 -04:00
jaymode f42f8cf756 security: add tool to simplify creation of certificate and csr files
This commit adds a CLI tool that can be used to generate a CA and signed certificates in PEM
format. The tool only requires a name of an instance to be provided by the user; ip and dns values
are supported but optional. By default, the tool is interactive and will prompt the user for input but
an option exists to provide a yaml file that contains the necessary information to generate certificates
or signing requests.

The output is in the form of a zip file with subfolders for each instance. Neither the zip file or the PEM
files are encrypted as some parts of our stack do not support encrypted PEM files.

Original commit: elastic/x-pack-elasticsearch@3dc0f8d495
2016-07-18 07:50:17 -04:00
Alexander Reelsen c7e4f51d56 Watcher: Prioritize configured response content type in HttpInput (elastic/elasticsearch#2790)
When a HTTP input has a configured response content, then this should
always be treated as preferred over the content type that is returned
by the server in order to give the user the power to decide.

This also refactors the code a bit to make it more readable.

Closes elastic/elasticsearch#2211

Original commit: elastic/x-pack-elasticsearch@ecdb4f931c
2016-07-18 10:54:48 +02:00
Martijn van Groningen 5b5e0bd787 Updated xpack for changed in elastic/elasticsearch#19425 related to templates
Original commit: elastic/x-pack-elasticsearch@7747f92b89
2016-07-18 08:34:11 +02:00
Ryan Ernst 91441bbd2a Internal: Remove script service proxy
ScriptServiceProxy is a thin wrapper around the ScriptService which does
a runAs the xpack user when compiling. But script services know nothing
about xpack users, so this has no real effect. I believe this is a
remnant of when we had indexed scripts, where the compilation may have
done a get on the scripts index.

This change removes the ScriptServiceProxy. It also renames Script in
watcher to WatcherScript, to remove confusion between elasticsearch's
Script and watchers Script.

Original commit: elastic/x-pack-elasticsearch@4e2fdbc518
2016-07-16 00:10:17 -07:00
Ryan Ernst 525562e48f Add tests for realm construction
Original commit: elastic/x-pack-elasticsearch@a35c103726
2016-07-15 21:36:22 -07:00
Ryan Ernst 9df9957307 Remove guice from realms construction
This change makes the internal realms factories, as well as those added
by extensions, constructed directly instead of via guice. Adding realms
in extensions is now pull based. Finally, all of the generics for realms
and realm factories have been removed.

Original commit: elastic/x-pack-elasticsearch@f0de9d2340
2016-07-15 15:55:28 -07:00
Ryan Ernst 01dfb7481e Build: Switch to new plugin configuration for integ tests
This is the xplugins side of elastic/elasticsearchelastic/elasticsearch#19461

Original commit: elastic/x-pack-elasticsearch@bb29f9e948
2016-07-15 14:48:50 -07:00
Tim Sullivan c827a4be79 Merge pull request elastic/elasticsearch#2784 from tsullivan/monitoring-ui-fix-definesyntax
monitoring ui: fix define/amd syntax

Original commit: elastic/x-pack-elasticsearch@fb8c701600
2016-07-15 11:03:11 -07:00
Chris Earle 1311935122 [Monitoring] Add Request Cache to returned stats for tests
Original commit: elastic/x-pack-elasticsearch@9bc34609c5
2016-07-15 12:51:43 -04:00
Areek Zillur 0db0e2f0c9 Implements cloud_internal license type
"cloud_internal" license type enables dynamically updating license operation mode via a config file.

When the installed license is "cloud_internal", the node level operation mode can be updated by writing
a `license_mode` file in the x-pack config directory (config/x-pack/license_mode). The file is expected
to have a string representing the desired license mode (e.g. "gold", "basic"). In case of a failure to
read a valid license mode from the `license_mode` file, the operation mode for "cloud_internal" license
defaults to PLATINUM.
This change also ensures that the correct operation mode is reported via the _xpack endpoint.

closes elastic/elasticsearch#2042

Original commit: elastic/x-pack-elasticsearch@6a2d788e45
2016-07-15 12:08:34 -04:00
Ryan Ernst 4e81ef42a0 Merge pull request elastic/elasticsearch#2829 from rjernst/deguice7
Remove guice from ssl services

Original commit: elastic/x-pack-elasticsearch@3c19ffd744
2016-07-15 08:28:49 -07:00
Ryan Ernst 8407f6aaf6 Remove leftover guicyness from client ssl service
Original commit: elastic/x-pack-elasticsearch@f362097ad7
2016-07-15 08:25:59 -07:00
Ryan Ernst 07bb586f1e Remove guice from ssl services
This change removes guice from the client and server ssl services.

Original commit: elastic/x-pack-elasticsearch@d60f8ca474
2016-07-15 00:25:00 -07:00
Ryan Ernst 8e5936e86c Merge pull request elastic/elasticsearch#2828 from rjernst/rest_headers
Switch to using rest headers getting

Original commit: elastic/x-pack-elasticsearch@6d54eae396
2016-07-14 20:33:50 -07:00
Ryan Ernst fa26d3716b Merge branch 'master' into rest_headers
Original commit: elastic/x-pack-elasticsearch@28ee29cbe6
2016-07-14 20:20:10 -07:00
Ryan Ernst 952ef78f98 Merge pull request elastic/elasticsearch#2810 from rjernst/deguice2
Internal: Remove guice construction of most license classes

Original commit: elastic/x-pack-elasticsearch@a2b48e62e9
2016-07-14 19:55:32 -07:00
Ryan Ernst 394a4fc0c1 Remove unused var
Original commit: elastic/x-pack-elasticsearch@a0dd4600c2
2016-07-14 19:55:10 -07:00
Ryan Ernst f388ef01ed Merge branch 'master' into deguice2
Original commit: elastic/x-pack-elasticsearch@2d7264c2cf
2016-07-14 19:51:58 -07:00
Ryan Ernst b562a83c0b Fix subclasses that no longer need RestController
Original commit: elastic/x-pack-elasticsearch@d762c5f0bb
2016-07-14 19:31:58 -07:00
Ryan Ernst 5d42de803c Merge branch 'master' into rest_headers
Original commit: elastic/x-pack-elasticsearch@b0d14d60e4
2016-07-14 19:04:09 -07:00
Jason Tedor 496e112c5e Rename transport-netty to transport-netty-3
This commit renames the Netty 3 transport module from transport-netty to
transport-netty3. This is to make room for a Netty 4 transport module,
transport-netty4.

Relates elastic/elasticsearch#2827

Original commit: elastic/x-pack-elasticsearch@e6487cefa2
2016-07-14 22:03:29 -04:00
Ryan Ernst 0c81f1b6ad Switch to using rest headers getting
This is the xplugins side of elastic/elasticsearchelastic/elasticsearch#19440. It adds a
getter on XPackExtension for extensions that add custom rest headers, in
addition to the headers registered for xpack itself.

Original commit: elastic/x-pack-elasticsearch@bd142b88c6
2016-07-14 18:55:28 -07:00
Jason Tedor 29387eab21 Monitoring index name resolver test awaits fix
This commit moves an awaits fix from
MonitoringIndexNameResolverTestCase#testResolver to
MonitoringIndexNameResolverTestCase#testSource as the previous commit
elastic/x-pack@98e76642ea marked the incorrect test as
awaits fix.

Original commit: elastic/x-pack-elasticsearch@62e9aaa628
2016-07-14 19:52:00 -04:00
Jason Tedor 3c0e83990b Monitoring index name resolver test awaits fix
This commit adds an awaits fix to
MonitoringIndexNameResolverTestCase#testResolver as awaits fix.

Original commit: elastic/x-pack-elasticsearch@586eb37f43
2016-07-14 19:46:05 -04:00
Ryan Ernst b1c892b77d Merge pull request elastic/elasticsearch#2824 from rjernst/deguice5
Internal: Remove guice cyclic dependency with InternalClient

Original commit: elastic/x-pack-elasticsearch@9c24b1152d
2016-07-14 13:56:37 -07:00
Ryan Ernst e3defb4dbd Internal: Remove guice cyclic dependency with InternalClient
The InternalClient is used by xpack code making requests to other nodes,
to add the xpack user to the thread context. To do this, it uses has a
dependency on the AuthenticationService, which in turn transitively
depends on InternalClient (eg IndexAuditTrail). But to add the xpack
user, the full authentication service is not necessary. Only having the
crypto service is needed in order to encrypt the header.

This change simplifes construction of InternalClient both making it a
real class instead of an interface, and removing the dependency on the
AuthenticationService. It also removes the use of
Provider<InternalClient> in users of the client.

Original commit: elastic/x-pack-elasticsearch@10f633bdf3
2016-07-14 13:46:07 -07:00
Ryan Ernst d68970e4b9 Merge pull request elastic/elasticsearch#2822 from rjernst/deguice4
Remove use of Transport in audit trails

Original commit: elastic/x-pack-elasticsearch@26d9f18545
2016-07-14 13:05:40 -07:00
Ryan Ernst f481dea1d0 Internal: Remove use of Transport in audit trails
Both logfile and index audit trails currently depend on injection of
Transport in order to find the bound address of the local node. However,
the ClusterService provides access to information about the local node,
including the bound addresses. This change makes the audit trails use
the cluster service, and also makes the logging audit trail not use a
lifecycle.

Original commit: elastic/x-pack-elasticsearch@d747d64ee1
2016-07-14 11:22:41 -07:00
Chris Earle 4224d70986 [Monitoring UI] Use same Index Memory chart for Index page as Node page
This provides the same -- more useful -- index memory chart to the index page, instead of just "Lucene Memory", it now breaks down what it shows just like the Node page as as more generalized "Index Memory" chart. It also rolls Fielddata into the Index Memory. With Fielddata now in the Index Memory chart, I decided to add the Segment Count chart to the Index page.

Original commit: elastic/x-pack-elasticsearch@4e3490ce9c
2016-07-14 13:26:43 -04:00