Skip to content

Commit

Permalink
[FTR] Cleaned up check for removed apm_user role (elastic#200679)
Browse files Browse the repository at this point in the history
## Summary

Cleaned up check for removed `apm_user` role, see
elastic/elasticsearch#116712


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_node:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)


__Closes:  https://github.com/elastic/kibana/issues/200666__

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
2 people authored and CAWilson94 committed Dec 12, 2024
1 parent abf7efe commit 8c361a0
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 42 deletions.
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: 'a_apm_user@elastic.co',
},
});

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 8c361a0

Please sign in to comment.