Skip to content

Commit a811b74

Browse files
authored
Explicitly add permission for every single feature (#80157)
1 parent a0c649e commit a811b74

File tree

1 file changed

+60
-2
lines changed

1 file changed

+60
-2
lines changed

x-pack/plugins/apm/scripts/kibana-security/setup-custom-kibana-user-role.ts

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,69 @@ async function init() {
122122
});
123123
await createRole({
124124
roleName: KIBANA_READ_ROLE,
125-
kibanaPrivileges: { base: ['read'] },
125+
kibanaPrivileges: {
126+
feature: {
127+
// core
128+
discover: ['read'],
129+
dashboard: ['read'],
130+
canvas: ['read'],
131+
ml: ['read'],
132+
maps: ['read'],
133+
graph: ['read'],
134+
visualize: ['read'],
135+
136+
// observability
137+
logs: ['read'],
138+
infrastructure: ['read'],
139+
apm: ['read'],
140+
uptime: ['read'],
141+
142+
// security
143+
siem: ['read'],
144+
145+
// management
146+
dev_tools: ['read'],
147+
advancedSettings: ['read'],
148+
indexPatterns: ['read'],
149+
savedObjectsManagement: ['read'],
150+
stackAlerts: ['read'],
151+
ingestManager: ['read'],
152+
actions: ['read'],
153+
},
154+
},
126155
});
127156
await createRole({
128157
roleName: KIBANA_WRITE_ROLE,
129-
kibanaPrivileges: { base: ['all'] },
158+
kibanaPrivileges: {
159+
feature: {
160+
// core
161+
discover: ['all'],
162+
dashboard: ['all'],
163+
canvas: ['all'],
164+
ml: ['all'],
165+
maps: ['all'],
166+
graph: ['all'],
167+
visualize: ['all'],
168+
169+
// observability
170+
logs: ['all'],
171+
infrastructure: ['all'],
172+
apm: ['all'],
173+
uptime: ['all'],
174+
175+
// security
176+
siem: ['all'],
177+
178+
// management
179+
dev_tools: ['all'],
180+
advancedSettings: ['all'],
181+
indexPatterns: ['all'],
182+
savedObjectsManagement: ['all'],
183+
stackAlerts: ['all'],
184+
ingestManager: ['all'],
185+
actions: ['all'],
186+
},
187+
},
130188
});
131189

132190
// read access only to APM + apm index access

0 commit comments

Comments
 (0)