-
Notifications
You must be signed in to change notification settings - Fork 8.3k
/
index.ts
50 lines (44 loc) · 1.96 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import serverlessRoleDefinitions from '@kbn/es/src/serverless_resources/security_roles.json';
import essRoleDefinitions from './ess_roles.json';
type ServerlessSecurityRoleName = keyof typeof serverlessRoleDefinitions;
type EssSecurityRoleName = keyof typeof essRoleDefinitions;
export const KNOWN_SERVERLESS_ROLE_DEFINITIONS = serverlessRoleDefinitions;
export const KNOWN_ESS_ROLE_DEFINITIONS = essRoleDefinitions;
export type SecurityRoleName = ServerlessSecurityRoleName | EssSecurityRoleName;
export enum ROLES {
// Serverless roles
t1_analyst = 't1_analyst',
t2_analyst = 't2_analyst',
t3_analyst = 't3_analyst',
rule_author = 'rule_author',
soc_manager = 'soc_manager',
detections_admin = 'detections_admin',
platform_engineer = 'platform_engineer',
// ESS roles
reader = 'reader',
hunter = 'hunter',
hunter_no_actions = 'hunter_no_actions',
no_risk_engine_privileges = 'no_risk_engine_privileges',
}
/**
* Provides a map of the commonly used date ranges found under the Quick Menu popover of the
* super date picker component.
*/
export const DATE_RANGE_OPTION_TO_TEST_SUBJ_MAP = Object.freeze({
Today: 'superDatePickerCommonlyUsed_Today',
'This week': 'superDatePickerCommonlyUsed_This_week',
'Last 15 minutes': 'superDatePickerCommonlyUsed_Last_15 minutes',
'Last 30 minutes': 'superDatePickerCommonlyUsed_Last_30 minutes',
'Last 1 hour': 'superDatePickerCommonlyUsed_Last_1 hour',
'Last 24 hours': 'superDatePickerCommonlyUsed_Last_24 hours',
'Last 7 days': 'superDatePickerCommonlyUsed_Last_7 days',
'Last 30 days': 'superDatePickerCommonlyUsed_Last_30 days',
'Last 90 days': 'superDatePickerCommonlyUsed_Last_90 days',
'Last 1 year': 'superDatePickerCommonlyUsed_Last_1 year',
});