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

Improve home screen for limited-access users #77665

Merged
merged 2 commits into from
Sep 18, 2020

Conversation

legrego
Copy link
Member

@legrego legrego commented Sep 16, 2020

Summary

This is mostly a followup to #67791, but there were also tweaks required to the Home app to respond to the differing privilege levels.

Updates the ILM and Snapshot/Restore features to correctly register their catalogue entries with the privilege system.

These entries were showing up for all users because they were not registered as part of the call to registerElasticsearchFeature()

Updates the Feature Catalogue to support an optional visible() callback.

Feature catalogue entries must be registered during setup, before the capabilities service is ready. As a result, the Stack Management entry needs to dynamically update its visibility after registration.
This entry was showing up for all users prior to this change.

Adds functional tests to verify this

There were 0 functional tests verifying home screen functionality with security enabled. This PR introduces a couple to prevent regressions, but more should be added in followups.

User with access to only Dashboards

Before

image

After

image

@legrego legrego force-pushed the home/improve-capabilities-checking branch 2 times, most recently from 8db8ad0 to 831a63c Compare September 17, 2020 11:34
@legrego legrego added release_note:skip Skip the PR/issue when compiling release notes v7.10.0 v8.0.0 Feature:Home Kibana home application Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! labels Sep 17, 2020
@legrego legrego force-pushed the home/improve-capabilities-checking branch from b7b0e0b to 2716cfb Compare September 17, 2020 16:22
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

async chunks size

id value diff baseline
home 569.1KB +169.0B 568.9KB

page load bundle size

id value diff baseline
home 26.7KB +38.0B 26.6KB
management 30.2KB +133.0B 30.1KB
total +171.0B

History

  • 💔 Build #75206 failed b7b0e0b9ea8eb0de9ca4927c3164eef619beeda7
  • 💔 Build #75144 failed 831a63cbc9573ad03eb291970b62a4fbe3d6435e
  • 💔 Build #74962 failed 8db8ad0644e15235a84825597c49104002f97904
  • 💔 Build #74944 failed 498709fde31f23f60a71b08191d3edfbfa02c921

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

@legrego legrego marked this pull request as ready for review September 17, 2020 18:04
@legrego legrego requested review from a team as code owners September 17, 2020 18:04
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

SR and ILM changes LGTM.

@azasypkin
Copy link
Member

ACK: will review today

@azasypkin azasypkin self-requested a review September 18, 2020 08:45
Copy link
Member

@azasypkin azasypkin left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for adding tests!

@@ -13,7 +13,15 @@ import { UserAtSpaceScenarios } from '../scenarios';
export default function catalogueTests({ getService }: FtrProviderContext) {
const uiCapabilitiesService: UICapabilitiesService = getService('uiCapabilities');

const esFeatureExceptions = ['security', 'rollup_jobs', 'reporting', 'transform', 'watcher'];
const esFeatureExceptions = [
Copy link
Member

Choose a reason for hiding this comment

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

question: just for my own education, is this a list of features that depend on specific ES cluster privileges?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, these are what I'm calling "Elasticsearch Features", which are governed by cluster and/or index privileges as opposed to Kibana Privileges. This was a concept that we introduced in #67791 in order to know when it was safe to show/hide features within the Stack Management application.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks!

Copy link
Contributor

@streamich streamich left a comment

Choose a reason for hiding this comment

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

AppArch changes LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Home Kibana home application release_note:skip Skip the PR/issue when compiling release notes Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants