Commit Graph

3884 Commits

Author SHA1 Message Date
Britta Weber 2c6d0b0cd2 Add option to deny access to fields (elastic/elasticsearch#2879)
To deny access to a fields users can name exceptions to field permissions with the following syntax:

"fields": {
     "grant": [list of field names patterns],
     "except": [list of patterns that are forbidden]
}

See doc for the rules for this.

This commit also reverts elastic/elasticsearch#2720

closes elastic/elasticsearch#2681



Original commit: elastic/x-pack-elasticsearch@d6537028ec
2016-09-13 16:38:58 +02:00
Shaunak Kashyap d8fbcfb68b Merge pull request elastic/elasticsearch#3434 from ycombinator/reporting/5.0/increase-unit-test-coverage
Adding unit tests for extract module

Original commit: elastic/x-pack-elasticsearch@04dd9f66c4
2016-09-13 05:45:22 -07:00
Dimitrios Liappis 28f1bc5d28 Honor gradle options for no Kibana builds+tests (elastic/elasticsearch#3448)
https://github.com/elastic/x-plugins/pull/3229 broke the possibility of
building+testing x-pack without Kibana via dev-tools/ci by setting an
option in ~/.gradle/gradle.properties as described in
https://github.com/dliappis/x-plugins/blob/master/README.asciidoc,
unless nvm is present.

Conditionally execute the nvm/nodejs code only if
`xpack.kibana.build=false` is not set in `~/.gradle/gradle.properties`

Original commit: elastic/x-pack-elasticsearch@affb4ac711
2016-09-13 08:34:22 -04:00
Martijn van Groningen 3b97936587 test: Remove WatcherBackwardsCompatibilityTests as it was specifically build for testing upgrade from 2.x to 5.x and to verify the scripts and template work/serialize as expected. On the master this is test is no longer relevant.
The OldWatcherIndicesBackwardsCompatibilityIT covers a major upgrade too.

Original commit: elastic/x-pack-elasticsearch@657881916b
2016-09-13 09:49:53 +00:00
Alexander Reelsen 67f7da18da Licensing: Parse start date in milliseconds as well
In order to behave like expiration date and and the issue date,
license parsing should be able to parse the start date in milliseconds
as well.

Relates elastic/elasticsearch#3385

Original commit: elastic/x-pack-elasticsearch@54c821192e
2016-09-13 09:57:29 +02:00
Tim Sullivan 4cac77e2ad Merge pull request elastic/elasticsearch#3323 from tsullivan/monitoring-ui-hide-system-indices
Monitoring UI: show/hide system indices

Original commit: elastic/x-pack-elasticsearch@dd90a0b8ee
2016-09-12 19:30:03 -07:00
Spencer c561cef880 Merge pull request elastic/elasticsearch#3389 from jbudz/es-engine-6.0
Bump kibana monitoring engine version to 6.0

Original commit: elastic/x-pack-elasticsearch@ce29e5b35d
2016-09-12 17:40:32 -07:00
Simon Willnauer 3c619e8824 Follow up for elastic/elasticsearchelastic/elasticsearch#20423
Original commit: elastic/x-pack-elasticsearch@53c72d913a
2016-09-12 22:51:30 +02:00
jaymode 2358309f72 security: allow enabled and username fields in put user request body
The enabled and username fields are both now allowed in the request body for the put user
request. This makes it easier to perform a get and update a user without needing to edit more
of the request body than necessary.

Closes elastic/elasticsearch#3391

Original commit: elastic/x-pack-elasticsearch@ab763e843b
2016-09-12 16:14:57 -04:00
jaymode 5f4e6164e5 security: add a built-in role for reporting
This commit adds a built-in role that grants read and write privileges to the reporting
indices.

See elastic/elasticsearch#2374
Closes elastic/elasticsearch#3196

Original commit: elastic/x-pack-elasticsearch@c8c1b465f8
2016-09-12 16:04:08 -04:00
Lukas Olson c6b6e457c2 Merge pull request elastic/elasticsearch#3341 from lukasolson/fix/disabled-ui-select
Update ui-select package to fix disabled styling

Original commit: elastic/x-pack-elasticsearch@3fc262dbef
2016-09-12 14:03:17 -06:00
Lukas Olson 62b0f3ab06 Merge branch 'master' into fix/disabled-ui-select
Original commit: elastic/x-pack-elasticsearch@5ceaaecf65
2016-09-12 14:00:32 -06:00
Court Ewing 877d5feff7 ci: install the correct node.js version via nvm (elastic/elasticsearch#3229)
This will ensure that CI runs the Kibana plugin tests with the
appropriate version of node.js.

Original commit: elastic/x-pack-elasticsearch@aeb7399f91
2016-09-12 14:32:12 -04:00
Court Ewing 7ee44825a9 Merge pull request elastic/elasticsearch#3429 from w33ble/reporting-fix/unknown-doc-type-checks
Don't throw when checking unknown exportability

Original commit: elastic/x-pack-elasticsearch@f7c22d6d7b
2016-09-12 14:23:55 -04:00
jaymode 7a321534ea security: allow the reserved realm to be disabled
This change allows the reserved realm to be disabled via a setting that is undocumented.

Closes elastic/elasticsearch#3399

Original commit: elastic/x-pack-elasticsearch@3c6c93d7eb
2016-09-12 14:13:47 -04:00
Court Ewing 2c3a63816c Merge pull request elastic/elasticsearch#3409 from w33ble/reporting-enh/user-filter
Add user filter control to the admin page

Original commit: elastic/x-pack-elasticsearch@72838cac7a
2016-09-12 14:05:42 -04:00
Lukas Olson 570796fab9 Merge pull request elastic/elasticsearch#3438 from Bargs/userEnabled
[security-ui] Omit enabled field when updating users

Original commit: elastic/x-pack-elasticsearch@c7f84887f7
2016-09-12 11:01:22 -07:00
jaymode a119f7ccf1 update the HttpClient to allow for disabling hostname verification
The HttpClient used in xpack supports the new SSL configuration but did not properly obey
the hostname verification disabling that can be specified with these settings. This change
adds the functionality with a test.

Relates elastic/elasticsearch#3240
Relates elastic/elasticsearch#3164

Original commit: elastic/x-pack-elasticsearch@df8e12a5aa
2016-09-12 13:47:08 -04:00
Joe Fleming c61fdf306d Merge pull request elastic/elasticsearch#3427 from w33ble/reporting-enh/timerange-use-state-module
Use kibana state module to get times

Original commit: elastic/x-pack-elasticsearch@52374bd874
2016-09-12 09:51:01 -07:00
jaymode 6d2fcbe688 security: fix typo is syskeygen script
Original commit: elastic/x-pack-elasticsearch@36abb4284a
2016-09-12 12:26:14 -04:00
Alexander Reelsen 0c3466180f Licensing: Add start date to licenses (elastic/elasticsearch#3385)
Start dates are a required feature for cloud. This functionality adds support
for specifying and enforcing a start date on licenses.

Behaviour: If the start date is > than now, the license will be rejected.

Due to another field in the license class, the version of the License class as well
as its serialization methods are adapted to this.

Closes elastic/elasticsearch#3370

Original commit: elastic/x-pack-elasticsearch@eb2a6f5be3
2016-09-12 17:53:33 +02:00
Nik Everett caf4bd2c82 Be careful when old index tests start nodes
We were starting nodes at weird times and then shutting them down again,
slowing down the tests and causing the watcher tests to fail because
watcher wasn't being shut down with its traditional kid gloves.

Original commit: elastic/x-pack-elasticsearch@2fd81b3eaf
2016-09-12 11:14:51 -04:00
Alexander Reelsen 2a6a9a10f7 Watcher: Improve http attachment history information (elastic/elasticsearch#3436)
When the HTTP attachment was not able to successfully retrieve the
data from and endpoint, there was no indication in the watch history
of what went wrong. Instead a logger was used, which is not useful
for the person running the watches.

This commit removes the logger statement and throws an exception,
so that the exception message can be stored in the watch history.

Source of this issue was a forum post:
https://discuss.elastic.co/t/sending-e-mail-with-generated-report-fails/60263/6

Original commit: elastic/x-pack-elasticsearch@acdaf7abef
2016-09-12 17:04:22 +02:00
Martijn van Groningen 5c8ece8583 test: mute test
Original commit: elastic/x-pack-elasticsearch@112f853bac
2016-09-10 15:10:41 +02:00
Court Ewing bf87f4f9bd Merge pull request elastic/elasticsearch#3405 from jbudz/issues/2856
security ui: return login and logout pages without user settings

Original commit: elastic/x-pack-elasticsearch@089a23dddb
2016-09-09 18:41:16 -04:00
Court Ewing 5904d841ae Merge pull request elastic/elasticsearch#3406 from tsullivan/monitoring-ui-remove-version-checks
monitoring ui: remove kbn version checking for 5.0+

Original commit: elastic/x-pack-elasticsearch@4c4064bb37
2016-09-09 18:06:38 -04:00
javanna 69c4c693f6 Merge branch 'enhancement/cleanup_parse_elements'
Original commit: elastic/x-pack-elasticsearch@0f86204352
2016-09-09 22:47:29 +02:00
Shaunak Kashyap e22de063f6 Merge pull request elastic/elasticsearch#2907 from ycombinator/reporting/render-header-5.0
Add header to PDF reports

Original commit: elastic/x-pack-elasticsearch@81b859ab9c
2016-09-09 15:27:40 -05:00
Nik Everett 2aa0781971 Explicitly shut down watcher after tests
In our tests you have to explicitly shut down watcher rather than shut
down the node it is running on because of thread leak detection. Just
shutting down the node that it is running on will cause it to start up
on another node if there is another one running and then not properly
shut down. This is probably something that should be fixed in watcher
somehow but for now lets just be more careful with the tests.

Closes elastic/elasticsearch#2365
Closes elastic/elasticsearch#2588

Original commit: elastic/x-pack-elasticsearch@fb8a172972
2016-09-09 14:43:46 -04:00
javanna 5829d112d1 Move search ext section parsing to the coordinating node
Original commit: elastic/x-pack-elasticsearch@1ce38fcff9
2016-09-09 18:58:10 +02:00
Jason Tedor 592ca5ab7b Adjust to logger API changes in Elasticsearch
Previously core Elasticsearch had methods in a test class for removing
and adding appenders. However, these methods were moved to production
code. This commit adjusts x-plugins for this change.

Original commit: elastic/x-pack-elasticsearch@83e37ef65a
2016-09-09 09:15:53 -04:00
Martijn van Groningen b74f1e6cb2 watcher: Add limited capability to upgrade the source of a watcher upon startup.
This particular change focuses on upgrading the source of a watch when it comes to scripts that have no language specified explicitly.
The default language in version 5 changed to painless from whatever is specified in `script.default_lang` setting (this defaulted to groovy). In order to make sure that scripts in watcher remain to work we should rewrite the search source upon startup and set the legacy default language explicitly. The legacy script language is now controlled by `script.legacy.default_lang` setting and that defaults to groovy.

Changing the source upon startup should do the trick and only change the source of watches with scripts that don't have an explicit language set. For new watches the default language used in scripts is painless and because we now always serialize the language explicitly in scripts these watches won't be changed on startup.

 The upgrade logic added here tries to upgrade scripts in the following places in a watch:
 * script condition
 * script transform
 * any script defined inside of a search input

Original commit: elastic/x-pack-elasticsearch@4d578819eb
2016-09-09 14:26:24 +02:00
Britta Weber 4bf685cd31 [TEST] wait for pending tasks finished before testing cluster state collector
Original commit: elastic/x-pack-elasticsearch@d42c8c4bbe
2016-09-09 12:07:52 +02:00
Tanguy Leroux 6ca086b997 Fix line length in LoggingAuditTrailTests.java
Original commit: elastic/x-pack-elasticsearch@3f4185dce7
2016-09-09 10:50:43 +02:00
Colin Goodheart-Smithe 8b6d988cfb Security: Audit all HTTP requests
Adds a new audit event (authentication_success) which logs each request made to
the REST API along with the body of the request

Closes elastic/elasticsearch#912

Original commit: elastic/x-pack-elasticsearch@650b9d70c0
2016-09-09 09:28:27 +01:00
Joe Fleming c7aabce3df Merge pull request elastic/elasticsearch#2915 from w33ble/reporting-enhancement/sync-workflow
Synchronous workflow, functionality with Watcher

Original commit: elastic/x-pack-elasticsearch@8d4f9fb643
2016-09-08 16:30:53 -07:00
Joe Fleming 21532389dd Merge branch 'master' into reporting-enhancement/sync-workflow
Original commit: elastic/x-pack-elasticsearch@4228a6e229
2016-09-08 16:25:26 -07:00
Joe Fleming ecbe934e18 Merge pull request elastic/elasticsearch#3362 from w33ble/reporting-fix/user-permissions
Use user permissions in Reporting

Original commit: elastic/x-pack-elasticsearch@6717c6624c
2016-09-08 15:56:46 -07:00
Simon Willnauer 923949ec67 Downgrade hard bwc break to a TODO for now
Original commit: elastic/x-pack-elasticsearch@73c2a6ee3e
2016-09-08 22:05:36 +02:00
Simon Willnauer 5c407cc526 Revert "Remove bwc layer for TimeUnit parsing"
This reverts commit elastic/x-pack@c6b2bd2c12.

Original commit: elastic/x-pack-elasticsearch@b4fbfb8afe
2016-09-08 22:03:46 +02:00
Court Ewing 5defa5115d Merge pull request elastic/elasticsearch#3398 from epixa/3299-defaultreportingkey
reporting: Generate reporting.encryptionKey automatically

Original commit: elastic/x-pack-elasticsearch@2c754f0db9
2016-09-08 15:31:14 -04:00
Matt Bargar a547804b7f Merge pull request elastic/elasticsearch#3378 from Bargs/fixSecuritySection
Fix double registration of security management sections

Original commit: elastic/x-pack-elasticsearch@51adc9ce1c
2016-09-08 15:08:48 -04:00
Jason Tedor 9baf88dfaa Handle node validation exception when starting
Node#start can now throw a checked NodeValidationException; this commit
adapts x-plugins for this new API.

Relates elastic/elasticsearch#3381

Original commit: elastic/x-pack-elasticsearch@660c5ab8c1
2016-09-08 10:56:54 -04:00
Simon Willnauer 20fce3280e Remove bwc layer for TimeUnit parsing
Original commit: elastic/x-pack-elasticsearch@79145f279b
2016-09-08 16:43:46 +02:00
Court Ewing 3931ca0fc1 Merge pull request elastic/elasticsearch#3379 from epixa/3101-reportingunsavedstate
reporting: Require user to save changes for reporting

Original commit: elastic/x-pack-elasticsearch@cefa3a0be8
2016-09-08 10:28:00 -04:00
Tanguy Leroux 97182fefb9 Clean up XContentBuilder in X-Pack
This commit cleans most of the methods of XContentBuilder so that:
    - Jackson's convenience methods are used instead of our custom ones (ie field(String,long) now uses Jackson's writeNumberField(String, long) instead of calling writeField(String) then writeNumber(long))
    - null checks are added for all field names and values
    - methods are grouped by type in the class source
    - methods have the same parameters names
    - duplicated methods like field(String, String...) and array(String, String...) are removed
    - varargs methods now have the "array" name to reflect that it builds arrays
    - unused methods like field(String,BigDecimal) are removed
    - all methods now follow the execution path: field(String,?) -> field(String) then value(?), and value(?) -> writeSomething() method. Methods to build arrays also follow the same execution path.

Original commit: elastic/x-pack-elasticsearch@d83f3aa6e2
2016-09-08 14:17:15 +02:00
Joe Fleming 8b6bd14b18 Merge pull request elastic/elasticsearch#3284 from ycombinator/reporting/5.0/encrypt-headers
Encrypt headers in reporting job doc

Original commit: elastic/x-pack-elasticsearch@9f21f20add
2016-09-07 17:35:51 -07:00
Shaunak Kashyap 0a89f0b984 Merge branch 'master' into reporting/5.0/encrypt-headers
Original commit: elastic/x-pack-elasticsearch@38c755ce1e
2016-09-07 18:39:51 -05:00
jaymode 2257cc77f6 security: add reserved metadata to the ingest admin role
Closes elastic/elasticsearch#3376

Original commit: elastic/x-pack-elasticsearch@1909da2fb0
2016-09-07 19:19:02 -04:00
Joe Fleming f3b8182147 Merge pull request elastic/elasticsearch#3314 from w33ble/reporting-fix/use-absolute-times
Use absolute times for saved objects in reports

Original commit: elastic/x-pack-elasticsearch@2e510502ec
2016-09-07 16:11:37 -07:00