Skip to content

Conversation

@csr
Copy link
Contributor

@csr csr commented Nov 27, 2025

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

This PR updates the `requestAuth` fixture to expose a new
`getApiKeyForCustomRole` method that can be used in your Scout API
tests.

This PR also introduces a new `createApiKeyWithAdminCredentials` method
that both `getApiKeyForCustomRole` and `getApiKey` use as the role
creation logic is the same, but the source of the Kibana or
Elasticsearch role descriptors differs:

* `getApiKey` fetches the role descriptors from the appropriate
environment-specific `roles.yml` file
* `getApiKeyForCustomRole` receives the role descriptor directly from
the function call / test itself

New tests were added to test the new method.

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Brad White <[email protected]>
(cherry picked from commit 64445f8)

# Conflicts:
#	src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/api_key.ts
#	src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/core_fixtures.ts
@csr csr requested a review from kibanamachine as a code owner November 27, 2025 09:26
@csr csr added the backport This PR is a backport of another PR label Nov 27, 2025
@csr csr enabled auto-merge (squash) November 27, 2025 09:26
@csr csr requested a review from dmlemeshko November 27, 2025 09:54
@csr csr added the test:scout label Nov 27, 2025
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/test 310 312 +2
Unknown metric groups

API count

id before after diff
@kbn/test 365 367 +2

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR test:scout

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants