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

[Roles] Use Query Roles API for Role Management grid screen #194630

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

Conversation

SiddharthMantri
Copy link
Contributor

@SiddharthMantri SiddharthMantri commented Oct 1, 2024

Closes #186266

Release notes

Enhanced Role management to manage larger number of roles by adding server side filtering, pagination and querying.

Summary

  • Replaced the usage of Get Roles API with Query Role API
  • Added server side pagination and filtering with a maximum limit of 10000 keys (default for max results on index). Added new label to indicate that we show only 10k results.
  • Search box replicates client side implementation by only filtering on Role names.

Run locally

Start ES with the JVM option to enable this feature:

ES_JAVA_OPTS="-Des.queryable_built_in_roles_enabled=true" yarn es snapshot --license=trial

Start Kibana normally

yarn start --no-base-path

Navigate to Stack Management > Roles and verify the same behavior as the screen recording below

Screen recording

Screen.Recording.2024-12-23.at.19.46.42.mov

Technical notes

  • Client side EuiInMemory table has been replaced by EuiSearchBar, EuiBasicTable and Filters
  • One new Kibana endpoint added
    • roles/_query
    • Replicates existing get_role endpoint by being public and added to Open API spec
  • Extra logic to handle previously UI only filter to show/hide reserved roles
    • Parse the query to construct the correct DSL if the filter is present
  • Update Get All Roles by Space internal API to use the Query Role and filter by space id using query DSL.

Checklist

Delete any items that are not applicable to this PR.

@SiddharthMantri
Copy link
Contributor Author

@elasticmachine merge upstream

@SiddharthMantri SiddharthMantri marked this pull request as ready for review December 23, 2024 10:27
@SiddharthMantri SiddharthMantri requested a review from a team as a code owner December 23, 2024 10:27
@SiddharthMantri
Copy link
Contributor Author

@elasticmachine merge upstream

elasticmachine and others added 5 commits December 23, 2024 10:27
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards --update'
@SiddharthMantri SiddharthMantri added release_note:enhancement Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! Feature:Users/Roles/API Keys backport:skip This commit does not require backporting v9.0.0 backport:version Backport to applied version labels v8.18.0 labels Dec 23, 2024
@elasticmachine
Copy link
Contributor

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

@SiddharthMantri SiddharthMantri removed the backport:skip This commit does not require backporting label Dec 23, 2024
@elasticmachine
Copy link
Contributor

elasticmachine commented Dec 24, 2024

⏳ Build in-progress, with failures

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #92 / security app dls "after all" hook: logout for "user East should only see EAST doc"
  • [job] [logs] FTR Configs #92 / security app dls "after all" hook: logout for "user East should only see EAST doc"
  • [job] [logs] FTR Configs #92 / security app dls should add new role myroleEast
  • [job] [logs] FTR Configs #92 / security app dls should add new role myroleEast
  • [job] [logs] FTR Configs #73 / Spaces app Spaces app Spaces Management: Create and Edit edit space allows changing space initials
  • [job] [logs] FTR Configs #73 / Spaces app Spaces app Spaces Management: Create and Edit edit space allows changing space initials

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels Feature:Users/Roles/API Keys release_note:enhancement Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Role Management screens to use Query Roles API
3 participants