Skip to content

[Logs UI] Allow Logs/ML integration result access with machine… - #55884

Merged
weltenwort merged 7 commits into
elastic:masterfrom
weltenwort:logs-ui-ml-integration-improve-privileges-checks
Jan 29, 2020
Merged

weltenwort merged 7 commits into
elastic:masterfrom
weltenwort:logs-ui-ml-integration-improve-privileges-checks

Conversation

@weltenwort

@weltenwort weltenwort commented Jan 24, 2020 •

Copy link
Copy Markdown
Member

Summary

This makes the "Log rate" and "Categories" tab visible on clusters with a suitable license for users which don't have the the machine_learning_admin role.

If the user doesn't have any ML role the following message is shown:

grafik

If the user doesn't have the machine_learning_admin role but the ML job needs to be set up, the following message is shown:

grafik

If the user has either of the machine_learning_admin or machine_learning_user roles and the job has already been set up, the results screen is show.

fixes #55843

Testing notes

The following combinations of user role and setup status would be relevant:

setup required setup done
machine_learning_admin setup screen results screen
machine_learning_user setup info results screen
neither results info results info

Where "setup info" means a message that informs about privileges required for setting up jobs and "results info" means a message that informs about privileges required for status and results.

Checklist

@weltenwort weltenwort added bug Fixes for quality problems that affect the customer experience release_note:fix v8.0.0 Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.7.0 v7.6.0 labels Jan 24, 2020
@weltenwort weltenwort self-assigned this Jan 24, 2020
@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

@weltenwort
weltenwort marked this pull request as ready for review January 27, 2020 14:43
@weltenwort
weltenwort requested a review from a team as a code owner January 27, 2020 14:43
@weltenwort

Copy link
Copy Markdown
Member Author

@elasticmachine merge upstream

@weltenwort

Copy link
Copy Markdown
Member Author

@elasticmachine merge upstream

@kibanamachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@afgomez
afgomez requested review from afgomez and removed request for afgomez January 29, 2020 08:37
@Kerry350
Kerry350 self-requested a review January 29, 2020 10:27
@afgomez
afgomez self-requested a review January 29, 2020 10:52
@afgomez
afgomez self-requested a review January 29, 2020 10:52

@afgomez afgomez left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pulled the code. It works as intended 👍. Left a small comment about the "Manage users" but other than that LGTM!

import { FormattedMessage } from '@kbn/i18n/react';
import React from 'react';

export const UserManagementLink: React.FunctionComponent<EuiButtonProps> = props => (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this render if the user doesn't have permissions to manage the users?

Screenshot 2020-01-29 at 12 24 06

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Well, the target page exists and gives actionable advice. 🤔 Is that too bad of a UX? @katrin-freihofner what do you think?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

First of all, I'm confused about the machine_learning_user role - why do we need this role? Second, I think the message proposed in this PR is good. Where does the button Manage users link to?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The role is required to be able to check the status of ML jobs and to access their results.

The button links to the user management section in Kibana. That is what @afgomez took the screenshot of above.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Before this PR we required the machine_learning_admin role even to read the results, which made it barely usable for sensible Elasticsearch deployments.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ok, I understand. One more question: does it make sense that we take the user to the user management screen? Are there any actions they can take? If not, I'd rather display this in the Additional ML privileges required message and remove the button.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That screen allows the user to assign the role if they have the permission. I thought a call to action would be preferable. I can remove the button, though.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll merge this fix for now to get into a BC. We can tweak the UX in follow-up PRs.

@weltenwort weltenwort changed the title [Logs UI] Allow Logs/ML integration result access with machine_learning_user role [Logs UI] Allow Logs/ML integration result access with machine… Jan 29, 2020
@weltenwort
weltenwort merged commit 16b4ff4 into elastic:master Jan 29, 2020
@weltenwort
weltenwort deleted the logs-ui-ml-integration-improve-privileges-checks branch January 29, 2020 15:27
weltenwort added a commit to weltenwort/kibana that referenced this pull request Jan 29, 2020
…tic#55884)

This makes the "Log rate" and "Categories" tab visible on clusters with a suitable license for users which don't have the the `machine_learning_admin` role.
weltenwort added a commit to weltenwort/kibana that referenced this pull request Jan 29, 2020
…tic#55884)

This makes the "Log rate" and "Categories" tab visible on clusters with a suitable license for users which don't have the the `machine_learning_admin` role.
weltenwort added a commit that referenced this pull request Jan 29, 2020
Backports the following commits to 7.x:
 - [Logs UI] Allow Logs/ML integration result access with machine… (#55884)
weltenwort added a commit that referenced this pull request Jan 29, 2020
…) (#56300)

Backports the following commits to 7.6:
 - [Logs UI] Allow Logs/ML integration result access with machine… (#55884)
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
…tic#55884)

This makes the "Log rate" and "Categories" tab visible on clusters with a suitable license for users which don't have the the `machine_learning_admin` role.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Fixes for quality problems that affect the customer experience Feature:Logs UI Logs UI feature release_note:fix Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.6.0 v7.7.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Logs UI] Log rate and categories tabs are invisible without ML admin permissions

5 participants