Skip to content

Commit

Permalink
forget to use current user for create/read route index
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierM committed Aug 30, 2021
1 parent 57bb72a commit 1368a40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const createDetectionIndex = async (
ruleDataService: RuleDataPluginService,
ruleRegistryEnabled: boolean
): Promise<void> => {
const esClient = context.core.elasticsearch.client.asInternalUser;
const esClient = context.core.elasticsearch.client.asCurrentUser;
const spaceId = siemClient.getSpaceId();

if (!siemClient) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const readIndexRoute = (router: SecuritySolutionPluginRouter, config: Con
const siemResponse = buildSiemResponse(response);

try {
const esClient = context.core.elasticsearch.client.asInternalUser;
const esClient = context.core.elasticsearch.client.asCurrentUser;
const siemClient = context.securitySolution?.getAppClient();

if (!siemClient) {
Expand Down

0 comments on commit 1368a40

Please sign in to comment.