Skip to content

Comments

[8.x] [FTR] unify custom role name with Scout (#217882)#218260

Merged
dmlemeshko merged 1 commit intoelastic:8.xfrom
dmlemeshko:backport/8.x/pr-217882
Apr 15, 2025
Merged

[8.x] [FTR] unify custom role name with Scout (#217882)#218260
dmlemeshko merged 1 commit intoelastic:8.xfrom
dmlemeshko:backport/8.x/pr-217882

Conversation

@dmlemeshko
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

## Summary

In QAF David added a possibility to spin up MKI project with custom role
set and ready to use.

Originally FTR was using reserved name `'customRole'` for internal
Kibana role to be mapped with native custom role in the project.

Both Scout and FTR use `kbn/test` to simulate SAML authentication, but
the new framework will allow to run the tests in parallel. That said, we
need to support multiple custom role credentials (one pair per worker)
and for simplicity we decided to use the same keys:

To run your tests locally against MKI you need to add a new Cloud user
entry in `user_roles.json`:

```
"custom_role_worker_1": { "username": ..., "password": ... }, // FTR requires only the first entry
"custom_role_worker_2": { "username": ..., "password": ... },
...
```

The test change is minimal:
<img width="559" alt="image"
src="https://github.com/user-attachments/assets/572103a3-13b2-4e6c-b9d2-5e55b03ac51c"
/>

---------

Co-authored-by: Cesare de Cal <cesare.decal@elastic.co>
(cherry picked from commit c4a97e5)

# Conflicts:
#	x-pack/test/spaces_api_integration/deployment_agnostic/services/role_scoped_supertest.ts
@dmlemeshko dmlemeshko added the backport This PR is a backport of another PR label Apr 15, 2025
@dmlemeshko dmlemeshko enabled auto-merge (squash) April 15, 2025 12:29
@dmlemeshko dmlemeshko requested a review from csr April 15, 2025 12:29
Copy link
Contributor

@csr csr left a comment

Choose a reason for hiding this comment

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

@dmlemeshko I am comparing this PR with #217882 and I don't see the change to the role_scoped_supertest.ts file here. It looks like the file was introduced by #200606 in v9.0.0, so that is expected. LGTM!

@dmlemeshko dmlemeshko merged commit ffcf9a5 into elastic:8.x Apr 15, 2025
11 checks passed
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants