Skip to content

Comments

[9.0] [FTR] unify custom role name with Scout (#217882)#218152

Merged
kibanamachine merged 1 commit intoelastic:9.0from
kibanamachine:backport/9.0/pr-217882
Apr 14, 2025
Merged

[9.0] [FTR] unify custom role name with Scout (#217882)#218152
kibanamachine merged 1 commit intoelastic:9.0from
kibanamachine:backport/9.0/pr-217882

Conversation

@kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 9.0:

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)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Apr 14, 2025
@kibanamachine kibanamachine enabled auto-merge (squash) April 14, 2025 17:28
@kibanamachine kibanamachine merged commit 0868043 into elastic:9.0 Apr 14, 2025
12 checks passed
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #14 / Description renders description correctly

Metrics [docs]

✅ unchanged

cc @dmlemeshko

dmlemeshko added a commit that referenced this pull request Apr 15, 2025
# Backport

This will backport the following commits from `main` to `8.x`:
- [[FTR] unify custom role name with Scout
(#217882)](#217882)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Dzmitry
Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2025-04-14T17:21:49Z","message":"[FTR]
unify custom role name with Scout (#217882)\n\n## Summary\n\nIn QAF
David added a possibility to spin up MKI project with custom role\nset
and ready to use.\n\nOriginally FTR was using reserved name
`'customRole'` for internal\nKibana role to be mapped with native custom
role in the project.\n\nBoth Scout and FTR use `kbn/test` to simulate
SAML authentication, but\nthe new framework will allow to run the tests
in parallel. That said, we\nneed to support multiple custom role
credentials (one pair per worker)\nand for simplicity we decided to use
the same keys:\n\nTo run your tests locally against MKI you need to add
a new Cloud user\nentry in
`user_roles.json`:\n\n```\n\"custom_role_worker_1\": { \"username\":
..., \"password\": ... }, // FTR requires only the first
entry\n\"custom_role_worker_2\": { \"username\": ..., \"password\": ...
},\n...\n```\n\nThe test change is minimal:\n<img width=\"559\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/572103a3-13b2-4e6c-b9d2-5e55b03ac51c\"\n/>\n\n---------\n\nCo-authored-by:
Cesare de Cal
<cesare.decal@elastic.co>","sha":"c4a97e51e3c9040fb0c955913b06aa0e3b5ba791","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","FTR","backport:version","v9.1.0","v8.19.0","v9.0.1"],"title":"[FTR]
unify custom role name with
Scout","number":217882,"url":"https://github.com/elastic/kibana/pull/217882","mergeCommit":{"message":"[FTR]
unify custom role name with Scout (#217882)\n\n## Summary\n\nIn QAF
David added a possibility to spin up MKI project with custom role\nset
and ready to use.\n\nOriginally FTR was using reserved name
`'customRole'` for internal\nKibana role to be mapped with native custom
role in the project.\n\nBoth Scout and FTR use `kbn/test` to simulate
SAML authentication, but\nthe new framework will allow to run the tests
in parallel. That said, we\nneed to support multiple custom role
credentials (one pair per worker)\nand for simplicity we decided to use
the same keys:\n\nTo run your tests locally against MKI you need to add
a new Cloud user\nentry in
`user_roles.json`:\n\n```\n\"custom_role_worker_1\": { \"username\":
..., \"password\": ... }, // FTR requires only the first
entry\n\"custom_role_worker_2\": { \"username\": ..., \"password\": ...
},\n...\n```\n\nThe test change is minimal:\n<img width=\"559\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/572103a3-13b2-4e6c-b9d2-5e55b03ac51c\"\n/>\n\n---------\n\nCo-authored-by:
Cesare de Cal
<cesare.decal@elastic.co>","sha":"c4a97e51e3c9040fb0c955913b06aa0e3b5ba791"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/218152","number":218152,"state":"MERGED","mergeCommit":{"sha":"086804391acca87ea1baa98e97b1e12886e3e42b","message":"[9.0]
[FTR] unify custom role name with Scout (#217882) (#218152)\n\n#
Backport\n\nThis will backport the following commits from `main` to
`9.0`:\n- [[FTR] unify custom role name with
Scout\n(#217882)](https://github.com/elastic/kibana/pull/217882)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Dzmitry Lemechko
<dzmitry.lemechko@elastic.co>"}},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/217882","number":217882,"mergeCommit":{"message":"[FTR]
unify custom role name with Scout (#217882)\n\n## Summary\n\nIn QAF
David added a possibility to spin up MKI project with custom role\nset
and ready to use.\n\nOriginally FTR was using reserved name
`'customRole'` for internal\nKibana role to be mapped with native custom
role in the project.\n\nBoth Scout and FTR use `kbn/test` to simulate
SAML authentication, but\nthe new framework will allow to run the tests
in parallel. That said, we\nneed to support multiple custom role
credentials (one pair per worker)\nand for simplicity we decided to use
the same keys:\n\nTo run your tests locally against MKI you need to add
a new Cloud user\nentry in
`user_roles.json`:\n\n```\n\"custom_role_worker_1\": { \"username\":
..., \"password\": ... }, // FTR requires only the first
entry\n\"custom_role_worker_2\": { \"username\": ..., \"password\": ...
},\n...\n```\n\nThe test change is minimal:\n<img width=\"559\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/572103a3-13b2-4e6c-b9d2-5e55b03ac51c\"\n/>\n\n---------\n\nCo-authored-by:
Cesare de Cal
<cesare.decal@elastic.co>","sha":"c4a97e51e3c9040fb0c955913b06aa0e3b5ba791"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
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