Commit Graph

2840 Commits

Author SHA1 Message Date
jaymode 60500ec6af security: cleanup the logging in the native stores
A lot of messages were being logged at the info level in the native user and roles
stores. This changes the logging to be more selective in the cases where the index
does not exist or the error is really an error and the user should be notified.

Closes elastic/elasticsearch#1339

Original commit: elastic/x-pack-elasticsearch@0bc0d9bf7a
2016-03-16 10:36:12 -04:00
Ali Beyad 7d8149cb86 Suggester refactoring requires a Suggester to parse X-Content to Builder
As part of the search refactoring effort, we need to pass a Suggester
to the methods that parse X-Content to a SuggestBuilder in every
instance where we are parsing search/suggest requests.

Original commit: elastic/x-pack-elasticsearch@7f815c617a
2016-03-16 10:27:29 -04:00
Colin Goodheart-Smithe e3551a7570 [TEST] fix timeout test so it checks message but not the reported time waiting
The reported time waiting for watches can be slightly different from the actual timeout (e.g. 2.1 seconds instead of 2 seconds) so checking the time waited in the message makes the test sometimes fail

Original commit: elastic/x-pack-elasticsearch@c2cd9da486
2016-03-16 13:44:33 +00:00
Nik Everett 787ebd5850 Handle task status registration cleanup
Core reworked how it registered tasks status's with NamedWriteableRegistry
so it was more pluggable. It changed a few signatures and x-plugins needs
these small changes to keep compiling.

Original commit: elastic/x-pack-elasticsearch@3dcf1df152
2016-03-16 08:20:40 -04:00
Jason Tedor 69b69f7af1 Use setting in integration test cluster config
This commit modifies using system properties to configure an integration
test cluster and instead use settings in the generated Elasticsearch
config file.

Original commit: elastic/x-pack-elasticsearch@65211b93d0
2016-03-15 20:01:01 -04:00
jaymode edc9580f66 security: validate that security and audit indices can be auto created
Adds a check to the settings at startup to ensure that the security and audit indices are
allowed to be auto created if a user has disabled auto create explicitly.

Additionally fixes a small issue with the error message for watcher passing the incorrect
value.

Closes elastic/elasticsearch#1453

Original commit: elastic/x-pack-elasticsearch@2b0698ff19
2016-03-15 13:15:00 -04:00
jaymode 03336912bb security: native realm is added when defined realms are unlicensed
If a user configures only custom realms and they are not licensed to use the custom realms then
we need to return our default realms. The default realms should be the esusers and esnative realms.
We were only returning the esusers realm previously.

Closes elastic/elasticsearch#1491

Original commit: elastic/x-pack-elasticsearch@3dc2b5d3a8
2016-03-15 13:11:19 -04:00
Yannick Welsch 0136f16ce7 [TEST] Suppress exception in Watcher benchmark
Original commit: elastic/x-pack-elasticsearch@099cad0ac1
2016-03-15 16:49:21 +01:00
Yannick Welsch 85b3f13f29 Merge pull request elastic/elasticsearch#1707 from ywelsch/enhance/forbid-sysout-for-tests
Remove System.out.println and Throwable.printStackTrace from tests

Original commit: elastic/x-pack-elasticsearch@02aa9c7e28
2016-03-15 16:36:13 +01:00
Yannick Welsch 61123bb107 Remove System.out.println and Throwable.printStackTrace from tests
Relates to elastic/elasticsearchelastic/elasticsearch#17112

Original commit: elastic/x-pack-elasticsearch@404e40a4be
2016-03-15 16:30:23 +01:00
Simon Willnauer c7129e52ec Merge pull request elastic/elasticsearch#1701 from s1monw/fix_trust_store_loading
Watcher should try to load trust/keystore from `config` directory

Today Watcher tries to load stuff from the bin's parent directory which
is not readable since the shared data directory has been moved out of
the nodes parent in elasticsearchelastic/elasticsearch#17072 which causes security exception
now. The test copies trust stores into the config dir and that's where
we should read it from by default or even better explicitly configure the path?!

Original commit: elastic/x-pack-elasticsearch@6ad580d1ea
2016-03-15 11:10:53 +01:00
Simon Willnauer 4ec4b0d7e1 Watcher should try to load trust/keystore from `config` directory
Today Watcher tries to load stuff from the bin's parent directory which
is not readable since the shared data directory has been moved out of
the nodes parent in elasticsearchelastic/elasticsearch#17072 which causes security exception
now. The test copies trust stores into the config dir and that's where
we should read it from by default or even better explicitly configure the path?!

Original commit: elastic/x-pack-elasticsearch@1d32a595cf
2016-03-15 10:07:10 +01:00
Areek Zillur 4c4eac692a fix for elasticsearchelastic/elasticsearch#16442
Use index uuid as index folder name to decouple index name from being used as index folder name

Original commit: elastic/x-pack-elasticsearch@23193bcd6e
2016-03-14 23:28:05 -04:00
Ryan Ernst 6cc3b553a7 Merge pull request elastic/elasticsearch#1699 from rjernst/lazy_san
Lazily generate san string for certificates

Original commit: elastic/x-pack-elasticsearch@3f1dc7a2b4
2016-03-14 19:23:26 -07:00
Ryan Ernst 1b21f20e5b Lazily generate san string for certificates
The san string used by certificate generation for ssl tests currently
runs at gradle configuration time. This takes several seconds, and
significantly slows down gradle configuration on every invocation.
This change wraps the code into a lazy evaluator that will be invoked at
runtime, and cache the string once it is generated.

Original commit: elastic/x-pack-elasticsearch@812036f416
2016-03-14 17:55:22 -07:00
Simon Willnauer 6b7dadce43 remove unused imports
Original commit: elastic/x-pack-elasticsearch@4a8f4285f8
2016-03-14 20:52:49 +01:00
Simon Willnauer 67efe608d1 add assertion DefaultIndicesAndAliasesResolver that PutMapping special case holds
Original commit: elastic/x-pack-elasticsearch@417123150a
2016-03-14 20:51:54 +01:00
Tanguy Leroux 7d377a5b7f Fix LocalIndicesCleanerTests
Original commit: elastic/x-pack-elasticsearch@3e08c84e80
2016-03-14 16:25:00 +01:00
Simon Willnauer 3d1f1814a4 Wrap lines after 140 chars
Original commit: elastic/x-pack-elasticsearch@dce9c019ae
2016-03-14 15:40:42 +01:00
Simon Willnauer 3f9508d525 Merge pull request elastic/elasticsearch#1687 from s1monw/fix_put_mapping
Don't override indices when concreteIndex is set on PutMappingRequest

PutMappingRequest has a special case since it can come with one and only
one concrete index. In such a case we can't replace the indices list
with all authorized indices but should rather only check if the index
is authorized and otherwise fail the request.

Original commit: elastic/x-pack-elasticsearch@8949b16f16
2016-03-14 15:39:46 +01:00
Simon Willnauer d37bf240fe Don't override indices when concreteIndex is set on PutMappingRequest
PutMappingRequest has a special case since it can come with one and only
one concrete index. In such a case we can't replace the indices list
with all authorized indices but should rather only check if the index
is authorized and otherwise fail the request.

Original commit: elastic/x-pack-elasticsearch@4ee20029e1
2016-03-14 15:27:42 +01:00
Tanguy Leroux 9443086655 Monitoring: Declare resolvers id & version in registry
This commit changes the location where the ID and Version of the resolvers are defined. It was in each constructor, now it is in the ResolversRegistry class. It also rename MonitoringIds to MonitoredSystem.

Original commit: elastic/x-pack-elasticsearch@81d7711c40
2016-03-14 15:22:50 +01:00
Simon Willnauer 13b7bd884a wrap lines to match 140 chars
Original commit: elastic/x-pack-elasticsearch@108a982dc1
2016-03-14 12:52:24 +01:00
Simon Willnauer cd63903665 Fix compile errors
Original commit: elastic/x-pack-elasticsearch@9e95c31e9d
2016-03-14 12:42:34 +01:00
Tanguy Leroux 45dc717b92 Monitoring: Make MonitoringDoc implements Writeable
Update after Chris & Uri comments

Original commit: elastic/x-pack-elasticsearch@74e4420b2f
2016-03-14 10:07:52 +01:00
David Pilato 5a1fbe6d62 Update Setting according to changes in master
We changed Setting signatures in master branch of elasticsearch.
We need to adapt x-plugins to the new code.

See https://github.com/elastic/elasticsearch/pull/16629.

Closes elastic/elasticsearch#1684.

Original commit: elastic/x-pack-elasticsearch@c911aaca69
2016-03-13 20:34:15 +01:00
Ryan Ernst c739e9b61f Merge pull request elastic/elasticsearch#1654 from rjernst/cli-parsing
Switch to jopt-simple

Original commit: elastic/x-pack-elasticsearch@577af5af6f
2016-03-11 12:55:22 -08:00
Tim Sullivan 296868af32 Merge pull request elastic/elasticsearch#1679 from tsullivan/monitoring-ui-more-lint-unused
monitoring ui: stricter linting for no-unused-vars

Original commit: elastic/x-pack-elasticsearch@fa67c4b920
2016-03-11 10:59:24 -07:00
jaymode 8e816bdfb9 test: add tests for scroll requests with document and field level security
Original commit: elastic/x-pack-elasticsearch@107b24e785
2016-03-11 11:50:38 -05:00
Tanguy Leroux e51aa21575 Monitoring: Add export() method to Exporters class
This commit adds a synchronized "export()" method to the Exporters so that the Exporters class can be used as an export service for exporting monitoring docs.

Original commit: elastic/x-pack-elasticsearch@22bda986c5
2016-03-11 17:33:16 +01:00
markharwood 925afa3cab Graph - port of 2.x graph API and kibana UI plugin
Closes X-plugins issue 518

Original commit: elastic/x-pack-elasticsearch@6c6371ed74
2016-03-11 14:22:31 +00:00
Yannick Welsch 0abe314bb6 Merge pull request elastic/elasticsearch#1674 from ywelsch/enhance/fix-logger-usages
Fix wrong placeholder usage in logging statements

Original commit: elastic/x-pack-elasticsearch@101f043fac
2016-03-11 10:30:28 +01:00
Tanguy Leroux be0e4255ce Mute EmailAttachmentTests and HistoryTemplateEmailMappingsTests
Original commit: elastic/x-pack-elasticsearch@5d62b2af11
2016-03-11 09:33:36 +01:00
Lukas Olson e661a42111 Merge pull request elastic/elasticsearch#1620 from lukasolson/feature/session-cookies
Expire sessions on browser close

Original commit: elastic/x-pack-elasticsearch@df8a73f57c
2016-03-10 16:30:20 -07:00
Yannick Welsch 970efba3a3 Fix wrong placeholder usage in logging statements
Also make logging message String constant to allow static checks

Relates to elastic/elasticsearchelastic/elasticsearch#16707

Original commit: elastic/x-pack-elasticsearch@b5bd423de4
2016-03-10 20:18:07 +01:00
Tim Sullivan b584b5d3bb Merge pull request elastic/elasticsearch#1670 from jbudz/monitoring-ui-node
monitoring ui: Prevent fatal error when using a time range that has no data

Original commit: elastic/x-pack-elasticsearch@293aa42dfc
2016-03-10 09:57:33 -07:00
Alexander Reelsen f417ec7e8c CLI: Remove cygwin support
Cygwin support has been removed from master, so we should be
consistent with x-plugins as well.

See elastic/elasticsearchelastic/elasticsearch#16871

Closes elastic/elasticsearch#1635

Original commit: elastic/x-pack-elasticsearch@8dd93209c7
2016-03-10 17:29:35 +01:00
Nik Everett 016b9d017c Add reindex tests to shield
Original commit: elastic/x-pack-elasticsearch@fe00f317b3
2016-03-10 10:17:46 -05:00
Martijn van Groningen a3a7acd934 tests: mute ingest/70_bulk test suite for now
Original commit: elastic/x-pack-elasticsearch@5fa15106f3
2016-03-10 15:00:14 +01:00
Martijn van Groningen fbe0aefa0c fix compile erors due to upstream changes in node stats
Original commit: elastic/x-pack-elasticsearch@a0a600cb68
2016-03-10 13:22:59 +01:00
Simon Willnauer a033f95072 Use ShardId#getIndexName() since index name has been removed from ShardSearchRequest
Original commit: elastic/x-pack-elasticsearch@ba997d0ae3
2016-03-09 19:54:27 +01:00
Ryan Ernst 8c5d8653e0 Fix forbidden apis usages, and convert more tests to CommandTestCase
Original commit: elastic/x-pack-elasticsearch@f5400388eb
2016-03-09 00:18:23 -08:00
Ryan Ernst d880803c2d Cutover more tests to CommandTestCase
Original commit: elastic/x-pack-elasticsearch@19c168a712
2016-03-08 17:28:11 -08:00
Ryan Ernst 64419c0856 Merge branch 'master' into cli-parsing
Original commit: elastic/x-pack-elasticsearch@bfe0cdc477
2016-03-08 14:17:44 -08:00
Ryan Ernst 53d87d158f Remove old help files and references to old cli tool stuff
Original commit: elastic/x-pack-elasticsearch@b02faa5251
2016-03-08 14:16:47 -08:00
Tim Sullivan 878e12f318 Merge pull request elastic/elasticsearch#1638 from tsullivan/monitoring-ui-deduplicate-shards-utils
Monitoring UI: Fix after breaking changes and clean up duplicated functions

Original commit: elastic/x-pack-elasticsearch@4d2a18a8c8
2016-03-08 10:42:51 -07:00
Alexander Reelsen e728a49853 Watcher: Fix home path for croneval CLI tool
Drive-by fixes putting the $JAVA binary into quotes to support spaces, like
we do in other scripts as well.

Closes elastic/elasticsearch#1642

Original commit: elastic/x-pack-elasticsearch@f40fba32cc
2016-03-08 17:48:42 +01:00
Tanguy Leroux 62ad9f4f0d Move lazy initialization classes from Watcher to XPack
This commit moves the InitializingModule and InitializingService classes in the common XPack package so that it can be used by any plugin. It also renames the module and service from Initializing* to LazyInitializing* and add a ClientProxy class.

Original commit: elastic/x-pack-elasticsearch@fbdf9d1614
2016-03-08 16:25:11 +01:00
Robert Muir 0f905e9b00 CLI: Don't let ubuntu try to install its crazy jayatana agent.
See https://github.com/elastic/elasticsearch/pull/13813

This is the corresponding workaround for x-plugins commandline tools.

Closes elastic/elasticsearch#719

Original commit: elastic/x-pack-elasticsearch@c607fd2197
2016-03-08 16:23:47 +01:00
Tanguy Leroux 146f91f730 Watcher: Rename ClientProxy to WatcherClientProxy
Original commit: elastic/x-pack-elasticsearch@84c17d1bc0
2016-03-08 14:28:39 +01:00