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 apm_user reserved role #38206

Merged
merged 6 commits into from
Feb 5, 2019
Merged

Add apm_user reserved role #38206

merged 6 commits into from
Feb 5, 2019

Conversation

kobelb
Copy link
Contributor

@kobelb kobelb commented Feb 1, 2019

This adds a reserved role for APM to use to grant access to APM, as opposed to requiring users to create custom roles. This will allow us the flexibility to assign Kibana privileges to the reserved role as part of the Kibana Feature Controls.

@kobelb kobelb requested a review from jaymode February 2, 2019 00:31
@makwarth
Copy link

makwarth commented Feb 4, 2019

@bmorelli25 This change will create a dedicated APM role in 7.0. This means that we'll need to update our docs to instruct people to use this role, as opposed to creating their own. Can you update the docs accordingly?

@kobelb has offered to walk you through the changes if needed

@graphaelli
Copy link
Member

graphaelli commented Feb 4, 2019

Can the apm user also have read access to .ml-anomalies* by default? @elastic/apm-ui can you confirm that's the only one needed from ml? any others outside of ml?

@kobelb
Copy link
Contributor Author

kobelb commented Feb 4, 2019

Can the apm user also have read access to .ml-anomalies* by default?

It definitely can be changed to do so, which version are you hoping to begin taking advantage of this?

@bmorelli25
Copy link
Member

Will do Rasmus! @kobelb - a quick walkthrough would definitely be appreciated. Can you throw something on my calendar for anytime this week (preferably not today)?

@@ -132,6 +132,10 @@
new String[] { "monitor", MonitoringBulkAction.NAME}, null, null, MetadataUtils.DEFAULT_RESERVED_METADATA))
.put(UsernamesField.APM_ROLE, new RoleDescriptor(UsernamesField.APM_ROLE,
new String[] { "monitor", MonitoringBulkAction.NAME}, null, null, MetadataUtils.DEFAULT_RESERVED_METADATA))
.put("apm_user", new RoleDescriptor("apm_user",
null, new RoleDescriptor.IndicesPrivileges[] {
RoleDescriptor.IndicesPrivileges.builder().indices("apm-*").privileges("read", "view_index_metadata").build()
Copy link
Member

@sorenlouv sorenlouv Feb 4, 2019

Choose a reason for hiding this comment

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

Users with Platinum also need access to ML anomaly indicies .ml-anomalies*

Copy link
Member

Choose a reason for hiding this comment

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

(I see now that @graphaelli already pointed this out)

@sorenlouv
Copy link
Member

sorenlouv commented Feb 4, 2019

@elastic/apm-ui can you confirm that's the only one needed from ml? any others outside of ml

Yes, that's the only index we query outside of apm-*

It definitely can be changed to do so, which version are you hoping to begin taking advantage of this?

asap :) We've been reading from .ml-anomalies-* since ~6.4 so we've already had a few support tickets with this issue (where people have to create custom roles and access permissions to make it work).

RoleDescriptor.IndicesPrivileges.builder().indices("apm-*")
.privileges("read", "view_index_metadata").build(),
RoleDescriptor.IndicesPrivileges.builder().indices(".ml-anomalies*")
.privileges("view_index_metadata", "read").build(),
Copy link
Member

Choose a reason for hiding this comment

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

🙇

@kobelb kobelb merged commit 64ff75f into elastic:master Feb 5, 2019
@kobelb kobelb deleted the apm-reserved-role branch February 5, 2019 05:45
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Feb 5, 2019
* master:
  Mute failing API key integration test (elastic#38409)
  Change the milliseconds precision to 3 digits for intervals. (elastic#38297)
  SecuritySettingsSource license.self_generated: trial (elastic#38233)
  Rename no-master-block setting (elastic#38350)
  Rename static Zen1 settings (elastic#38333)
  Migration doc for audit json log file (elastic#38165)
  Add apm_user reserved role (elastic#38206)
@colings86
Copy link
Contributor

Please remember to add all relevant labels (area label, version label(s) and change type label) on all PRs and please look for this as part of reviews. The release note generation process is made much harder when PRs are not labelled correctly.

@colings86 colings86 added >enhancement v7.0.0 :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC labels Feb 7, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security

@kobelb
Copy link
Contributor Author

kobelb commented Feb 7, 2019

Sorry about that @colings86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants