Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierM committed Jan 4, 2024
1 parent a3d77fb commit 97caa8a
Showing 1 changed file with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const roleToAccessSecuritySolution = {
],
},
};
const roleToAccessSecuritySolutionWithDsl = {
name: 'sec_all_spaces_with_dsl',
const roleToAccessSecuritySolutionWithDls = {
name: 'sec_all_spaces_with_dls',
privileges: {
elasticsearch: {
indices: [
Expand Down Expand Up @@ -56,12 +56,12 @@ const userAllSec = {
email: '[email protected]',
roles: [roleToAccessSecuritySolution.name],
};
const userAllSecWithDsl = {
username: 'user_all_sec_with_dsl',
password: 'user_all_sec_with_dsl',
full_name: 'userAllSecWithDsl',
email: 'userAllSecWithDsl@elastic.co',
roles: [roleToAccessSecuritySolutionWithDsl.name],
const userAllSecWithDls = {
username: 'user_all_sec_with_dls',
password: 'user_all_sec_with_dls',
full_name: 'userAllSecWithDls',
email: 'userAllSecWithDls@elastic.co',
roles: [roleToAccessSecuritySolutionWithDls.name],
};

describe('find alert with/without doc level security', () => {
Expand All @@ -76,20 +76,20 @@ describe('find alert with/without doc level security', () => {
roleToAccessSecuritySolution.privileges
);
await security.role.create(
roleToAccessSecuritySolutionWithDsl.name,
roleToAccessSecuritySolutionWithDsl.privileges
roleToAccessSecuritySolutionWithDls.name,
roleToAccessSecuritySolutionWithDls.privileges
);
await security.user.create(userAllSec.username, {
password: userAllSec.password,
roles: userAllSec.roles,
full_name: userAllSec.full_name,
email: userAllSec.email,
});
await security.user.create(userAllSecWithDsl.username, {
password: userAllSecWithDsl.password,
roles: userAllSecWithDsl.roles,
full_name: userAllSecWithDsl.full_name,
email: userAllSecWithDsl.email,
await security.user.create(userAllSecWithDls.username, {
password: userAllSecWithDls.password,
roles: userAllSecWithDls.roles,
full_name: userAllSecWithDls.full_name,
email: userAllSecWithDls.email,
});

await esArchiver.load(
Expand All @@ -103,9 +103,9 @@ describe('find alert with/without doc level security', () => {

after(async () => {
await security.user.delete(userAllSec.username);
await security.user.delete(userAllSecWithDsl.username);
await security.user.delete(userAllSecWithDls.username);
await security.role.delete(roleToAccessSecuritySolution.name);
await security.role.delete(roleToAccessSecuritySolutionWithDsl.name);
await security.role.delete(roleToAccessSecuritySolutionWithDls.name);
await esArchiver.unload(
'x-pack/test/functional/es_archives/security_solution/alerts/8.8.0_multiple_docs'
);
Expand Down Expand Up @@ -138,7 +138,7 @@ describe('find alert with/without doc level security', () => {
};
const { body } = await supertestWithoutAuth
.post(DETECTION_ENGINE_QUERY_SIGNALS_URL)
.auth(userAllSecWithDsl.username, userAllSecWithDsl.password)
.auth(userAllSecWithDls.username, userAllSecWithDls.password)
.set('kbn-xsrf', 'true')
.send(query)
.expect(200);
Expand Down

0 comments on commit 97caa8a

Please sign in to comment.