Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FTR] Cleaned up check for removed apm_user role #200679

Merged
merged 3 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions x-pack/test/functional/apps/security/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
expect(roles.apm_system.reserved).to.be(true);
expect(roles.apm_system.deprecated).to.be(false);

expect(roles.apm_user.reserved).to.be(true);
expect(roles.apm_user.deprecated).to.be(true);

expect(roles.beats_admin.reserved).to.be(true);
expect(roles.beats_admin.deprecated).to.be(false);

Expand Down
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