mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Search .kibana-devnull rather than -*
There are too many edge cases when using shield and searching against the index pattern -*, some of which seem impractical to resolve in the short term. Instead, we query against the non-existent index .kibana-devnull, which the default kibana privileges in shield will allow. Note: This assumes that .kibana-devnull either does not exist or is empty. Fixes #5765
This commit is contained in:
parent
dd04615dc0
commit
300482330d
2 changed files with 3 additions and 3 deletions
|
@ -103,11 +103,11 @@ describe('ui/courier/fetch/strategy/search', () => {
|
|||
context('when indexList is empty', () => {
|
||||
beforeEach(() => reqsFetchParams[0].index = []);
|
||||
|
||||
it('explicitly negates any indexes', () => {
|
||||
it('queries .kibana-devnull instead', () => {
|
||||
let value;
|
||||
search.reqsFetchParamsToBody(reqsFetchParams).then(val => value = val);
|
||||
$rootScope.$apply();
|
||||
expect(_.includes(value, '"index":["-*"]')).to.be(true);
|
||||
expect(_.includes(value, '"index":[".kibana-devnull"]')).to.be(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -57,7 +57,7 @@ define(function (require) {
|
|||
// handle that request by querying *all* indexes, which is the
|
||||
// opposite of what we want in this case.
|
||||
if (_.isArray(indexList) && indexList.length === 0) {
|
||||
indexList.push('-*');
|
||||
indexList.push('.kibana-devnull');
|
||||
}
|
||||
return angular.toJson({
|
||||
index: indexList,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue