kibana/x-pack/test/functional/apps/spaces
Sid 273630d3a7
[8.x] [Roles] Use Query Roles API for Role Management grid screen (#194630) (#208766)
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Roles] Use Query Roles API for Role Management grid screen
(#194630)](https://github.com/elastic/kibana/pull/194630)

<!--- Backport version: 9.6.4 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT
[{"author":{"name":"Sid","email":"siddharthmantri1@gmail.com"},"sourceCommit":{"committedDate":"2025-01-29T14:38:03Z","message":"[Roles]
Use Query Roles API for Role Management grid screen (#194630)\n\nCloses
https://github.com/elastic/kibana/issues/186266\r\n\r\n## Release
notes\r\n\r\nEnhanced Role management to manage larger number of roles
by adding\r\nserver side filtering, pagination and querying.\r\n\r\n##
Summary\r\n- Replaced the usage of Get Roles API with Query Role
API\r\n- Added server side pagination and filtering with a maximum limit
of\r\n10000 keys (default for max results on index). Added new label
to\r\nindicate that we show only 10k results.\r\n- Search box replicates
client side implementation by only filtering on\r\nRole
names.\r\n\r\n### Run locally\r\nStart ES ~with the JVM option to enable
this feature~:\r\n```\r\nyarn es snapshot
--license=trial\r\n```\r\nStart Kibana normally\r\n```\r\nyarn start
--no-base-path\r\n```\r\n\r\nNavigate to Stack Management > Roles and
verify the same behavior as the\r\nscreen recording below\r\n\r\n###
Screen
recording\r\n\r\n\r\nhttps://github.com/user-attachments/assets/a447e7df-8aa1-4044-a6b2-0aafe56844a9\r\n\r\n\r\n\r\n##
Technical notes\r\n- Client side EuiInMemory table has been replaced by
EuiSearchBar,\r\nEuiBasicTable and Filters\r\n- One new Kibana endpoint
added\r\n - `roles/_query` \r\n- Replicates existing get_role endpoint
by being public and added to\r\nOpen API spec\r\n- Extra logic to handle
previously UI only filter to show/hide reserved\r\nroles\r\n- Parse the
query to construct the correct DSL if the filter is present\r\n- Update
Get All Roles by Space internal API to use the Query Role and\r\nfilter
by space id using query DSL.\r\n\r\n### Checklist\r\n\r\nDelete any
items that are not applicable to this PR.\r\n\r\n- [x] Any text added
follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"66dab0ae0e866a7e32bd5a3c528f94139398abcb","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Team:Security","Feature:Users/Roles/API
Keys","v9.0.0","backport:version","v8.18.0"],"title":"[Roles] Use Query
Roles API for Role Management grid
screen","number":194630,"url":"https://github.com/elastic/kibana/pull/194630","mergeCommit":{"message":"[Roles]
Use Query Roles API for Role Management grid screen (#194630)\n\nCloses
https://github.com/elastic/kibana/issues/186266\r\n\r\n## Release
notes\r\n\r\nEnhanced Role management to manage larger number of roles
by adding\r\nserver side filtering, pagination and querying.\r\n\r\n##
Summary\r\n- Replaced the usage of Get Roles API with Query Role
API\r\n- Added server side pagination and filtering with a maximum limit
of\r\n10000 keys (default for max results on index). Added new label
to\r\nindicate that we show only 10k results.\r\n- Search box replicates
client side implementation by only filtering on\r\nRole
names.\r\n\r\n### Run locally\r\nStart ES ~with the JVM option to enable
this feature~:\r\n```\r\nyarn es snapshot
--license=trial\r\n```\r\nStart Kibana normally\r\n```\r\nyarn start
--no-base-path\r\n```\r\n\r\nNavigate to Stack Management > Roles and
verify the same behavior as the\r\nscreen recording below\r\n\r\n###
Screen
recording\r\n\r\n\r\nhttps://github.com/user-attachments/assets/a447e7df-8aa1-4044-a6b2-0aafe56844a9\r\n\r\n\r\n\r\n##
Technical notes\r\n- Client side EuiInMemory table has been replaced by
EuiSearchBar,\r\nEuiBasicTable and Filters\r\n- One new Kibana endpoint
added\r\n - `roles/_query` \r\n- Replicates existing get_role endpoint
by being public and added to\r\nOpen API spec\r\n- Extra logic to handle
previously UI only filter to show/hide reserved\r\nroles\r\n- Parse the
query to construct the correct DSL if the filter is present\r\n- Update
Get All Roles by Space internal API to use the Query Role and\r\nfilter
by space id using query DSL.\r\n\r\n### Checklist\r\n\r\nDelete any
items that are not applicable to this PR.\r\n\r\n- [x] Any text added
follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"66dab0ae0e866a7e32bd5a3c528f94139398abcb"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/194630","number":194630,"mergeCommit":{"message":"[Roles]
Use Query Roles API for Role Management grid screen (#194630)\n\nCloses
https://github.com/elastic/kibana/issues/186266\r\n\r\n## Release
notes\r\n\r\nEnhanced Role management to manage larger number of roles
by adding\r\nserver side filtering, pagination and querying.\r\n\r\n##
Summary\r\n- Replaced the usage of Get Roles API with Query Role
API\r\n- Added server side pagination and filtering with a maximum limit
of\r\n10000 keys (default for max results on index). Added new label
to\r\nindicate that we show only 10k results.\r\n- Search box replicates
client side implementation by only filtering on\r\nRole
names.\r\n\r\n### Run locally\r\nStart ES ~with the JVM option to enable
this feature~:\r\n```\r\nyarn es snapshot
--license=trial\r\n```\r\nStart Kibana normally\r\n```\r\nyarn start
--no-base-path\r\n```\r\n\r\nNavigate to Stack Management > Roles and
verify the same behavior as the\r\nscreen recording below\r\n\r\n###
Screen
recording\r\n\r\n\r\nhttps://github.com/user-attachments/assets/a447e7df-8aa1-4044-a6b2-0aafe56844a9\r\n\r\n\r\n\r\n##
Technical notes\r\n- Client side EuiInMemory table has been replaced by
EuiSearchBar,\r\nEuiBasicTable and Filters\r\n- One new Kibana endpoint
added\r\n - `roles/_query` \r\n- Replicates existing get_role endpoint
by being public and added to\r\nOpen API spec\r\n- Extra logic to handle
previously UI only filter to show/hide reserved\r\nroles\r\n- Parse the
query to construct the correct DSL if the filter is present\r\n- Update
Get All Roles by Space internal API to use the Query Role and\r\nfilter
by space id using query DSL.\r\n\r\n### Checklist\r\n\r\nDelete any
items that are not applicable to this PR.\r\n\r\n- [x] Any text added
follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"66dab0ae0e866a7e32bd5a3c528f94139398abcb"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
2025-01-29 19:57:46 +01:00
..
create_edit_space [8.x] [Stateful sidenav] Enable on-prem (#203239) (#203796) 2024-12-11 09:03:58 -06:00
feature_controls [8.x] Assign Roles to Space from Spaces Management (#191795) (#193787) 2024-09-23 15:56:38 -05:00
config.ts [8.x] [Roles] Use Query Roles API for Role Management grid screen (#194630) (#208766) 2025-01-29 19:57:46 +01:00
copy_saved_objects.ts Get rid of esArchiver in the Copy To Spaces integration tests. (#137831) 2022-09-13 11:13:21 +02:00
enter_space.ts [Spaces] Added additional tests for space next route navigation (#189497) 2024-08-02 13:23:52 +02:00
index.ts [8.x] [Stateful sidenav] Enable on-prem (#203239) (#203796) 2024-12-11 09:03:58 -06:00
solution_tour.ts skip failing test suite (#204082) 2025-01-24 11:00:24 +11:00
spaces_grid.ts [8.x] Assign Roles to Space from Spaces Management (#191795) (#193787) 2024-09-23 15:56:38 -05:00
spaces_selection.ts [8.x] Improves cleanup in spaces data functional test (#198921) (#199024) 2024-11-05 12:20:49 -06:00