[Security Solution][Rule Preview] Fixes <space-id> index permission bug with Rule Preview (#153590)

This commit is contained in:
Davis Plumlee 2023-03-24 10:49:44 -04:00 committed by GitHub
parent 9f8b44df26
commit 464169f0b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,8 +136,8 @@ export const previewRulesRoute = async (
.atSpace(spaceId, {
elasticsearch: {
index: {
[`${DEFAULT_PREVIEW_INDEX}`]: ['read'],
[`.internal${DEFAULT_PREVIEW_INDEX}-`]: ['read'],
[`${DEFAULT_PREVIEW_INDEX}-${spaceId}`]: ['read'],
[`.internal${DEFAULT_PREVIEW_INDEX}-${spaceId}-*`]: ['read'],
},
cluster: [],
},