Skip to content

Commit

Permalink
[FTR] Cleaned up apm_user for spaces tests
Browse files Browse the repository at this point in the history
  • Loading branch information
elena-shostak committed Nov 19, 2024
1 parent 7932ccc commit 8601bf7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ export const AUTHENTICATION = {
username: 'a_kibana_rbac_space_1_saved_objects_read_user',
password: 'password',
},
APM_USER: {
username: 'a_apm_user',
password: 'password',
},
MACHINE_LEARING_ADMIN: {
username: 'a_machine_learning_admin',
password: 'password',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,16 +469,6 @@ export const createUsersAndRoles = async (es: Client, supertest: SuperTestAgent)
},
});

await es.security.putUser({
username: AUTHENTICATION.APM_USER.username,
body: {
password: AUTHENTICATION.APM_USER.password,
roles: ['apm_user'],
full_name: 'a apm user',
email: '[email protected]',
},
});

await es.security.putUser({
username: AUTHENTICATION.MACHINE_LEARING_ADMIN.username,
body: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export default function getAllSpacesTestSuite({ getService }: FtrProviderContext
legacyAll: AUTHENTICATION.KIBANA_LEGACY_USER,
dualAll: AUTHENTICATION.KIBANA_DUAL_PRIVILEGES_USER,
dualRead: AUTHENTICATION.KIBANA_DUAL_PRIVILEGES_DASHBOARD_ONLY_USER,
apmUser: AUTHENTICATION.APM_USER,
machineLearningAdmin: AUTHENTICATION.MACHINE_LEARING_ADMIN,
machineLearningUser: AUTHENTICATION.MACHINE_LEARNING_USER,
monitoringUser: AUTHENTICATION.MONITORING_USER,
Expand All @@ -83,7 +82,6 @@ export default function getAllSpacesTestSuite({ getService }: FtrProviderContext
legacyAll: AUTHENTICATION.KIBANA_LEGACY_USER,
dualAll: AUTHENTICATION.KIBANA_DUAL_PRIVILEGES_USER,
dualRead: AUTHENTICATION.KIBANA_DUAL_PRIVILEGES_DASHBOARD_ONLY_USER,
apmUser: AUTHENTICATION.APM_USER,
machineLearningAdmin: AUTHENTICATION.MACHINE_LEARING_ADMIN,
machineLearningUser: AUTHENTICATION.MACHINE_LEARNING_USER,
monitoringUser: AUTHENTICATION.MONITORING_USER,
Expand Down Expand Up @@ -484,29 +482,6 @@ export default function getAllSpacesTestSuite({ getService }: FtrProviderContext
}
);

getAllTest(`apm_user can't access any spaces from ${scenario.spaceId}`, {
spaceId: scenario.spaceId,
user: scenario.users.apmUser,
tests: {
exists: {
statusCode: 403,
response: expectRbacForbidden,
},
copySavedObjectsPurpose: {
statusCode: 403,
response: expectRbacForbidden,
},
shareSavedObjectsPurpose: {
statusCode: 403,
response: expectRbacForbidden,
},
includeAuthorizedPurposes: {
statusCode: 403,
response: expectRbacForbidden,
},
},
});

getAllTest(`machine_learning_admin can't access any spaces from ${scenario.spaceId}`, {
spaceId: scenario.spaceId,
user: scenario.users.machineLearningAdmin,
Expand Down

0 comments on commit 8601bf7

Please sign in to comment.