-
Notifications
You must be signed in to change notification settings - Fork 0
/
users-roles.json
104 lines (101 loc) · 3.55 KB
/
users-roles.json
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#CREATE ROLES
PUT _xpack/security/role/elasticon_policy
{
"indices": [{
"names": [ "elasticon-dc-2018" ],
"privileges": [ "read" ],
"query": {
"template": {
"source": "{\"bool\": {\"filter\": [{\"terms\": {\"region\": {{#toJson}}_user.metadata.security.region{{/toJson}}}},{\"terms\": {\"security_level\": {{#toJson}}_user.metadata.security.level{{/toJson}}}},{\"terms_set\": {\"security_compartments\": {\"terms\":{{#toJson}}_user.metadata.security.compartments{{/toJson}},\"minimum_should_match_field\":\"security_compartments_min\"}}},{\"terms\": {\"security_dissemination\": {{#toJson}}_user.metadata.security.dissemination{{/toJson}}}},{\"terms\":{\"source\":{{#toJson}}_user.metadata.security.source{{/toJson}}}}]}}"
}
}
}]
}
PUT _xpack/security/role/elasticon_external_policy
{
"indices": [{
"names": [ "elasticon-dc-2018" ],
"privileges": [ "read" ],
"query": {
"template": {
"source": "{\"bool\": {\"filter\": [{\"terms\": {\"region\": {{#toJson}}_user.metadata.security.region{{/toJson}}}},{\"terms\": {\"security_level\": {{#toJson}}_user.metadata.security.level{{/toJson}}}},{\"terms_set\": {\"security_compartments\": {\"terms\":{{#toJson}}_user.metadata.security.compartments{{/toJson}},\"minimum_should_match_field\":\"security_compartments_min\"}}},{\"terms\": {\"security_dissemination\": {{#toJson}}_user.metadata.security.dissemination{{/toJson}}}},{\"terms\":{\"source\":{{#toJson}}_user.metadata.security.source{{/toJson}}}}]}}"
}
},
"field_security" : {
"grant" : [ "*"],
"except": [ "source" ]
}
}]
}
#CREATE USERS
PUT _xpack/security/user/barry_white
{
"username": "barry_white",
"password": "testtest",
"roles": ["elasticon_policy", "kibana_user"],
"full_name": "Barry White",
"email": "[email protected]",
"metadata": {
"security": {
"level": ["U","S"],
"compartments": ["NONE"],
"dissemination": ["NONE", "OUOF","EYEEVIF"],
"region": ["SE"],
"source": ["vulcans", "q"]
}
}
}
PUT _xpack/security/user/jack_black
{
"username": "jack_black",
"password": "testtest",
"roles": ["elasticon_policy", "kibana_user"],
"full_name": "Jack Black",
"email": "[email protected]",
"metadata": {
"security": {
"level": ["U","S","T"],
"compartments": ["NONE", "IS", "KT"],
"dissemination": ["NONE", "OUOF","NROFON","EYEEVIF"],
"region": ["NW", "E"],
"source": ["humans", "borg"]
}
}
}
PUT _xpack/security/user/james_brown
{
"username": "james_brown",
"password": "testtest",
"roles": ["elasticon_policy", "kibana_user"],
"full_name": "James Brown",
"email": "[email protected]",
"metadata": {
"security": {
"level": ["U","S","T"],
"compartments": ["NONE", "IS","KT","AMMAG"],
"dissemination": ["NONE", "OUOF","NROFON","EYEEVIF"],
"region": ["N", "S", "E", "W", "SE", "NW"],
"source": ["borg", "ferengi", "klingons", "bajorans", "q", "vulcans", "andorians", "romulans", "cardassians", "humans"]
}
}
}
PUT _xpack/security/user/earl_grey
{
"username": "earl_grey",
"password": "testtest",
"roles": [
"elasticon_external_policy",
"kibana_dashboard_only_user"
],
"full_name": "Earl Grey",
"email": "[email protected]",
"metadata": {
"security": {
"level": ["U"],
"compartments": ["NONE"],
"dissemination": ["NONE", "OUOF","EYEEVIF"],
"region": ["N", "S", "E", "W", "SE", "NW"],
"source": ["borg", "ferengi", "klingons", "bajorans", "q", "vulcans", "andorians", "romulans", "cardassians", "humans"]
}
}
}