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

Fleet Privileges Display #204402

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

elena-shostak
Copy link
Contributor

@elena-shostak elena-shostak commented Dec 16, 2024

Summary

Fixed privileges display for features/subFeatures that require all spaces.

Before

Role privileges display for only Default space selected

Screenshot 2024-12-17 at 13 32 17

Privileges summary display for only Default space selected

Screenshot 2024-12-17 at 13 32 50

After

Role privileges display for only Default space selected

Screenshot 2024-12-17 at 13 30 00

Privileges summary display for only Default space selected

Screenshot 2024-12-17 at 13 30 19

How to test

With Default space:

  1. Navigate to Creating a new Role and assign Kibana privileges.
  2. Set the Spaces to Default Space and the privilege level to All.
  3. Navigate to Management category and verify that Fleet is set to None.
  4. Click on "View privilege summary" and verify that Fleet is set to None.

With *All Spaces:

  1. Navigate to Creating a new Role and assign Kibana privileges.
  2. Set the Spaces to *All Spaces and the privilege level to All.
  3. Navigate to Management category and verify that Fleet is set to All
  4. Click on "View privilege summary" and verify that Fleet is set to All

Checklist

Check the PR satisfies following conditions.

  • Unit or functional tests were updated or added to match the most common scenarios
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

Fixes: #194686

Release Note

Fixed privileges display for features/subFeatures that require all spaces.

@elena-shostak
Copy link
Contributor Author

/ci

@elena-shostak
Copy link
Contributor Author

/ci

@elena-shostak elena-shostak added Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! release_note:fix backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Feature:Users/Roles/API Keys labels Dec 17, 2024
@elena-shostak
Copy link
Contributor Author

@elasticmachine merge upstream

@elena-shostak
Copy link
Contributor Author

/ci

@elena-shostak elena-shostak marked this pull request as ready for review December 17, 2024 14:44
@elena-shostak elena-shostak requested a review from a team as a code owner December 17, 2024 14:44
@elasticmachine
Copy link
Contributor

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

@azasypkin azasypkin self-requested a review December 20, 2024 14:37
@azasypkin
Copy link
Member

ACK: will review today, sorry for the delay!

@@ -218,7 +218,7 @@ export class SpaceAwarePrivilegeSection extends Component<Props, State> {
const viewMatrixButton = (
<PrivilegeSummary
role={this.props.role}
spaces={this.getDisplaySpaces()}
spaces={this.getSelectedSpaces()}
Copy link
Member

Choose a reason for hiding this comment

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

Caution

There is something definitely off here when I select different access variations. See the video. Do you see the same?

Screen.Recording.2024-12-24.at.14.16.13.mov

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Confirmed, can reproduce, will take a look

Copy link
Contributor Author

Choose a reason for hiding this comment

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

6c631b4 pushed fix, but please hold on review for now, need to check tests

@elasticmachine
Copy link
Contributor

elasticmachine commented Dec 24, 2024

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #17 / PrivilegeSummaryTable when sub feature privileges are allowed renders effective privileges for a complex setup
  • [job] [logs] Jest Tests #17 / PrivilegeSummaryTable when sub feature privileges are allowed renders effective privileges for a complex setup
  • [job] [logs] Jest Tests #17 / PrivilegeSummaryTable when sub feature privileges are allowed renders effective privileges for a global feature privilege
  • [job] [logs] Jest Tests #17 / PrivilegeSummaryTable when sub feature privileges are allowed renders effective privileges for a global feature privilege
  • [job] [logs] Jest Tests #17 / PrivilegeSummaryTable when sub feature privileges are allowed renders effective privileges for global base + space base privileges
  • [job] [logs] Jest Tests #17 / PrivilegeSummaryTable when sub feature privileges are allowed renders effective privileges for global base + space base privileges
  • [job] [logs] Jest Tests #17 / PrivilegeSummaryTable when sub feature privileges are allowed renders effective privileges for global base + space feature privileges
  • [job] [logs] Jest Tests #17 / PrivilegeSummaryTable when sub feature privileges are allowed renders effective privileges for global base + space feature privileges
  • [job] [logs] Jest Tests #17 / PrivilegeSummaryTable when sub feature privileges are allowed renders effective privileges for the global base privilege
  • [job] [logs] Jest Tests #17 / PrivilegeSummaryTable when sub feature privileges are allowed renders effective privileges for the global base privilege
  • [job] [logs] Jest Tests #17 / PrivilegeSummaryTable when sub feature privileges are allowed renders effective privileges when all spaces option is selected
  • [job] [logs] Jest Tests #17 / PrivilegeSummaryTable when sub feature privileges are allowed renders effective privileges when all spaces option is selected
  • [job] [logs] Jest Tests #17 / PrivilegeSummaryTable when sub feature privileges are disallowed renders effective privileges for a global feature privilege
  • [job] [logs] Jest Tests #17 / PrivilegeSummaryTable when sub feature privileges are disallowed renders effective privileges for a global feature privilege
  • [job] [logs] Jest Tests #17 / PrivilegeSummaryTable when sub feature privileges are disallowed renders effective privileges for the global base privilege
  • [job] [logs] Jest Tests #17 / PrivilegeSummaryTable when sub feature privileges are disallowed renders effective privileges for the global base privilege
  • [job] [logs] Jest Tests #17 / PrivilegeSummaryTable when sub feature privileges are disallowed renders effective privileges when all spaces option is selected
  • [job] [logs] Jest Tests #17 / PrivilegeSummaryTable when sub feature privileges are disallowed renders effective privileges when all spaces option is selected

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
security 541.4KB 541.8KB +429.0B
spaces 256.9KB 257.0KB +76.0B
total +505.0B

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Feature:Users/Roles/API Keys release_note:fix Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Privileges] Discrepancy in display of assigned Kibana Privileges and Privilege summary when creating role
3 participants