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

Add view_index_metadata over metricbeat-* for monitoring agent #63750

Merged

Conversation

albertzaharovits
Copy link
Contributor

The remote_monitoring_agent reserved role is extended to grant more privileges over the metricbeat-* index pattern.
In addition to the index and create_index index privileges that it granted already, it now also grants the view_index_metadata privilege.
See #63203 for more details.

The remote_monitoring_collector role has not been changed.

Reviewers might prefer to look at the ef1eb01 commit for the diff, as the other commit c89d0e9 is a rename that clutters a bit the diff of the whole PR.

Closes #63203

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security (:Security/Authorization)

@elasticmachine elasticmachine added the Team:Security Meta label for security team label Oct 15, 2020
@albertzaharovits albertzaharovits requested a review from a team October 15, 2020 14:55
assertThat(remoteMonitoringAgentRole.runAs().check(randomAlphaOfLengthBetween(1, 12)), is(false));

assertThat(remoteMonitoringAgentRole.indices().allowedIndicesMatcher(RecoveryAction.NAME)
Role remoteMonitoringCollectorRole = Role.builder(roleDescriptor, null).build();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change it ti remoteMonitoringCollectorRole while the changes are added to remote_monitoring_agent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's mainly a rename see: c89d0e9 .
Besides the rename, because the roles are similar sounding but different in scopee I've tested that only one of them grants the desired privileges.

@BigPandaToo
Copy link
Contributor

LGTM

@albertzaharovits albertzaharovits merged commit 0db5192 into elastic:master Oct 15, 2020
@albertzaharovits albertzaharovits deleted the remote_monitoring_role_update branch October 15, 2020 22:50
@albertzaharovits
Copy link
Contributor Author

Thank you @BigPandaToo !

albertzaharovits added a commit that referenced this pull request Oct 15, 2020
The `remote_monitoring_agent` reserved role is extended to grant more privileges
over the metricbeat-* index pattern.
In addition to the index and create_index index privileges that it granted already,
it now also grants the view_index_metadata privilege.

Closes #63203
albertzaharovits added a commit that referenced this pull request Oct 15, 2020
The `remote_monitoring_agent` reserved role is extended to grant more privileges
over the metricbeat-* index pattern.
In addition to the index and create_index index privileges that it granted already,
it now also grants the view_index_metadata privilege.

Closes #63203
@albertzaharovits
Copy link
Contributor Author

It will be in 7.10 BC3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC Team:Security Meta label for security team v7.10.0 v7.11.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metricbeat errors due to missing admin/aliases/get permission for remote_monitoring_user user
4 participants