Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alerting/task scheduler #3

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
bfb3cbc
Initial stab at core task manager logic
chrisdavies Jun 22, 2018
c567e44
Merge master
chrisdavies Jun 22, 2018
d9c89fc
Merge branch 'master' of github.com:elastic/kibana into alerting/task…
chrisdavies Aug 2, 2018
9e22ae1
Update task_manager readme
chrisdavies Aug 2, 2018
b8a345c
Update task manager readme
chrisdavies Aug 2, 2018
1d2e4a4
Add cancelable helper package, OSS, and general purpose, but
chrisdavies Aug 2, 2018
8f5e1e3
Make the cancellable package promise-compliant
chrisdavies Aug 3, 2018
63f643f
Update task manager readme w/ reference to cancellable
chrisdavies Aug 3, 2018
b9f2af8
Change pool from lazy to eager, add support for sub-pools per task type.
chrisdavies Aug 3, 2018
da940c9
Merge branch 'master' of github.com:elastic/kibana into alerting/task…
chrisdavies Aug 6, 2018
f887d43
Move cancellable to task_manager, and typescriptify it.
chrisdavies Aug 13, 2018
9597456
Working proof of concept for task manager. Still have lots to do:
chrisdavies Aug 14, 2018
3516c6b
Add pagination support to task manager fetch
chrisdavies Aug 15, 2018
6034cc7
Make `core` responsible for reading and merging of config files. Simp…
azasypkin Aug 28, 2018
11488d5
[APM] Revert to using apm-* as default indices (#22445)
sorenlouv Aug 28, 2018
5350ba7
Merge branch 'master' of github.com:elastic/kibana into alerting/task…
chrisdavies Aug 28, 2018
9d24c00
Eui sharing top nav (#21997)
nreese Aug 28, 2018
4681eb2
Move task manager to OSS
chrisdavies Aug 28, 2018
879a8b1
[Docs] Use literal asterix in APM docs (#22460)
sorenlouv Aug 28, 2018
7a679e0
Fix gauge test (#22472)
liza-mae Aug 28, 2018
36a922e
Bump backport to 4.4.1 (#22456)
sorenlouv Aug 28, 2018
925e13f
[chrome/urlOverflowCheck] use `modifyUrl` helper (#22435)
Aug 28, 2018
1e5d82c
Integrate main i18n tool into build pipeline (#22254)
LeanidShutau Aug 29, 2018
3c8d8c6
Update redux, ,react-redux and corresponding types (#22442)
weltenwort Aug 29, 2018
50facf4
Fixing a few typos and some links that were updated (#22470)
kobelb Aug 29, 2018
6904d62
Merge branch 'master' of github.com:elastic/kibana into alerting/task…
chrisdavies Aug 29, 2018
f239ef0
Remove task manager reference from x-pack
chrisdavies Aug 29, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/development/security/rbac.asciidoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[development-security-rbac]]
=== Role-based access control

Role-based access control (RBAC) in {kib} relies upon the {ref}/security-api-privileges.html[privilege APIs] that Elasticsearch exposes. This {kib} to define the privileges that {kib} wishes to grant to users, assign them to the relevant users using roles, and then authorize the user to perform a specific action. This is handled within a secured instance of the `SavedObjectsClient` and available transparently to consumers when using `request.getSavedObjectsClient()` or `savedObjects.getScopedSavedObjectsClient()`.
Role-based access control (RBAC) in {kib} relies upon the {ref}/security-privileges.html#application-privileges[application privileges] that Elasticsearch exposes. This allows {kib} to define the privileges that {kib} wishes to grant to users, assign them to the relevant users using roles, and then authorize the user to perform a specific action. This is handled within a secured instance of the `SavedObjectsClient` and available transparently to consumers when using `request.getSavedObjectsClient()` or `savedObjects.getScopedSavedObjectsClient()`.

[[development-rbac-privileges]]
==== {kib} Privileges
Expand Down Expand Up @@ -76,7 +76,7 @@ Roles that grant <<kibana-privileges>> should be managed using the <<role-manage
[[development-rbac-authorization]]
==== Authorization

The {es} {ref}/security-api-privileges.html#security-api-privileges[has privileges API]determines whether the user is authorized to perform a specific action:
The {es} {ref}/security-api-has-privileges.html[has privileges API] determines whether the user is authorized to perform a specific action:

[source,js]
----------------------------------
Expand Down Expand Up @@ -104,7 +104,7 @@ Once we have authorized the user to perform a specific action, we can execute th
[[development-rbac-legacy-fallback]]
==== Legacy Fallback

Users have existign roles that rely on index privileges to the `.kibana` index. The legacy fallback uses the `callWithRequest` method when the user doesn't have and application privileges. This relies on the user have index privileges on `.kibana`. The legacy fallback will be available until 7.0.
Users have existing roles that rely on index privileges to the `.kibana` index. The legacy fallback uses the `callWithRequest` method when the user doesn't have any application privileges. This relies on the user having index privileges on `.kibana`. The legacy fallback will be available until 7.0.

Within the secured instance of the `SavedObjectsClient` the `_has_privileges` check determines if the user has any index privileges on the `.kibana` index:

Expand Down
8 changes: 4 additions & 4 deletions docs/settings/apm-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ xpack.apm.ui.enabled:: Set to `false` to hide the APM plugin {kib} from the menu

apm_oss.indexPattern:: Index pattern is used for integrations with Machine Learning and Kuery Bar. It must match all apm indices. Defaults to `apm-*`.

apm_oss.errorIndices:: Matcher for indices containing error documents. Defaults to `apm-\*-error-*`.
apm_oss.errorIndices:: Matcher for indices containing error documents. Defaults to `apm-*`.

apm_oss.onboardingIndices:: Matcher for indices containing onboarding documents. Defaults to `apm-\*-onboarding-*`.
apm_oss.onboardingIndices:: Matcher for indices containing onboarding documents. Defaults to `apm-*`.

apm_oss.spanIndices:: Matcher for indices containing span documents. Defaults to `apm-\*-span-*`.
apm_oss.spanIndices:: Matcher for indices containing span documents. Defaults to `apm-*`.

apm_oss.transactionIndices:: Matcher for indices containing transaction documents. Defaults to `apm-\*-transaction-*`.
apm_oss.transactionIndices:: Matcher for indices containing transaction documents. Defaults to `apm-*`.
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@
"react-grid-layout": "^0.16.2",
"react-input-range": "^1.3.0",
"react-markdown": "^3.1.4",
"react-redux": "^5.0.6",
"react-redux": "^5.0.7",
"react-router-dom": "4.2.2",
"react-sizeme": "^2.3.6",
"react-toggle": "4.0.2",
"reactcss": "1.2.3",
"redux": "3.7.2",
"redux": "4.0.0",
"redux-actions": "2.2.1",
"redux-thunk": "2.2.0",
"redux-thunk": "2.3.0",
"regression": "2.0.0",
"request": "^2.85.0",
"reselect": "^3.0.1",
Expand Down Expand Up @@ -235,8 +235,7 @@
"@types/prop-types": "^15.5.3",
"@types/react": "^16.3.14",
"@types/react-dom": "^16.0.5",
"@types/react-redux": "^5.0.6",
"@types/redux": "^3.6.31",
"@types/react-redux": "^6.0.6",
"@types/redux-actions": "^2.2.1",
"@types/sinon": "^5.0.0",
"@types/strip-ansi": "^3.0.0",
Expand All @@ -245,7 +244,7 @@
"angular-mocks": "1.4.7",
"babel-eslint": "8.1.2",
"babel-jest": "^22.4.3",
"backport": "4.2.0",
"backport": "4.4.1",
"chai": "3.5.0",
"chance": "1.0.10",
"cheerio": "0.22.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"UI-WELCOME_MESSAGE": "Cargando Kibana",
"UI-WELCOME_ERROR": "Kibana no se cargó correctamente. Heck la salida del servidor para obtener más información."
}
"common.ui.welcomeMessage": "Cargando Kibana",
"common.ui.welcomeError": "Kibana no se cargó correctamente. Heck la salida del servidor para obtener más información."
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"UI-WELCOME_MESSAGE": "Cargando Kibana",
"UI-WELCOME_ERROR": "Kibana no se cargó correctamente. Heck la salida del servidor para obtener más información."
}
"common.ui.welcomeMessage": "Cargando Kibana",
"common.ui.welcomeError": "Kibana no se cargó correctamente. Heck la salida del servidor para obtener más información."
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"UI-WELCOME_MESSAGE": "Cargando Kibana",
"UI-WELCOME_ERROR": "Kibana no se cargó correctamente. Heck la salida del servidor para obtener más información."
}
"common.ui.welcomeMessage": "Cargando Kibana",
"common.ui.welcomeError": "Kibana no se cargó correctamente. Heck la salida del servidor para obtener más información."
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
*/

require('../src/setup_node_env');
require('../src/dev/run_extract_default_translations');
require('../src/dev/run_i18n_check');
1 change: 0 additions & 1 deletion src/cli/serve/__fixtures__/invalid_en_var_ref_config.yml

This file was deleted.

2 changes: 0 additions & 2 deletions src/cli/serve/__fixtures__/one.yml

This file was deleted.

2 changes: 0 additions & 2 deletions src/cli/serve/__fixtures__/two.yml

This file was deleted.

4 changes: 2 additions & 2 deletions src/cli/serve/integration_tests/reload_logging_config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { relative, resolve } from 'path';
import { safeDump } from 'js-yaml';
import es from 'event-stream';
import stripAnsi from 'strip-ansi';
import { readYamlConfig } from '../read_yaml_config';
import { getConfigFromFiles } from '../../../core/server/config';

const testConfigFile = follow('__fixtures__/reload_logging_config/kibana.test.yml');
const kibanaPath = follow('../../../../scripts/kibana.js');
Expand All @@ -33,7 +33,7 @@ function follow(file) {
}

function setLoggingJson(enabled) {
const conf = readYamlConfig(testConfigFile);
const conf = getConfigFromFiles([testConfigFile]);
conf.logging = conf.logging || {};
conf.logging.json = enabled;

Expand Down
63 changes: 0 additions & 63 deletions src/cli/serve/read_yaml_config.js

This file was deleted.

98 changes: 0 additions & 98 deletions src/cli/serve/read_yaml_config.test.js

This file was deleted.

6 changes: 3 additions & 3 deletions src/cli/serve/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { resolve } from 'path';
import { fromRoot } from '../../utils';
import { getConfig } from '../../server/path';
import { Config } from '../../server/config/config';
import { readYamlConfig } from './read_yaml_config';
import { getConfigFromFiles } from '../../core/server/config';
import { readKeystore } from './read_keystore';
import { transformDeprecations } from '../../server/config/transform_deprecations';

Expand Down Expand Up @@ -80,7 +80,7 @@ const pluginDirCollector = pathCollector();
const pluginPathCollector = pathCollector();

function readServerSettings(opts, extraCliOptions) {
const settings = readYamlConfig(opts.config);
const settings = getConfigFromFiles([].concat(opts.config || []));
const set = _.partial(_.set, settings);
const get = _.partial(_.get, settings);
const has = _.partial(_.has, settings);
Expand Down Expand Up @@ -256,7 +256,7 @@ export default function (program) {

// If new platform config subscription is active, let's notify it with the updated config.
if (kbnServer.newPlatform) {
kbnServer.newPlatform.updateConfig(config);
kbnServer.newPlatform.updateConfig(config.get());
}
});

Expand Down
7 changes: 7 additions & 0 deletions src/core/server/config/__tests__/__fixtures__/one.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
foo: 1
bar: true
xyz: ['1', '2']
abc:
def: test
qwe: 1
pom.bom: 3
7 changes: 7 additions & 0 deletions src/core/server/config/__tests__/__fixtures__/two.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
foo: 2
baz: bonkers
xyz: ['3', '4']
abc:
ghi: test2
qwe: 2
pom.mob: 4
Loading