kibana/x-pack/test/functional/apps/spaces/config.ts
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

20 lines
646 B
TypeScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { FtrConfigProviderContext } from '@kbn/test';
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const functionalConfig = await readConfigFile(require.resolve('../../config.base.js'));
return {
...functionalConfig.getAll(),
testFiles: [require.resolve('.')],
esTestCluster: {
...functionalConfig.get('esTestCluster'),
},
};
}