Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add remote_indices to Create or update roles API #2915

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

pquentin
Copy link
Member

As documented in https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html. Note that remote_cluster is still missing, so that won't fully fix the validation.

Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
security.activate_user_profile 🟢 9/9 9/9
security.authenticate 🟢 30/30 30/30
security.bulk_delete_role 🟢 1/1 1/1
security.bulk_put_role 🟢 1/1 1/1
security.bulk_update_api_keys 🟠 Missing type Missing type
security.change_password 🟢 9/9 9/9
security.clear_api_key_cache 🟢 13/13 13/13
security.clear_cached_privileges 🟢 3/3 3/3
security.clear_cached_realms 🟢 1/1 1/1
security.clear_cached_roles 🟢 2/2 2/2
security.clear_cached_service_tokens 🟢 4/4 4/4
security.create_api_key 🔴 67/69 60/60
security.create_cross_cluster_api_key 🟠 Missing type Missing type
security.create_service_token 🟢 3/3 3/3
security.delete_privileges 🟢 6/6 6/6
security.delete_role_mapping 🟢 9/9 9/9
security.delete_role 🟢 8/8 8/8
security.delete_service_token Missing test Missing test
security.delete_user 🟢 9/9 9/9
security.disable_user_profile 🟢 1/1 1/1
security.disable_user 🟢 3/3 3/3
security.enable_user_profile 🟢 1/1 1/1
security.enable_user 🟢 4/4 4/4
security.enroll_kibana Missing test Missing test
security.enroll_node Missing test Missing test
security.get_api_key 🔴 38/38 15/38
security.get_builtin_privileges 🔴 2/2 1/2
security.get_privileges 🟢 12/12 12/12
security.get_role_mapping 🔴 18/18 10/18
security.get_role 🔴 24/24 21/24
security.get_service_accounts Missing test Missing test
security.get_service_credentials 🟢 1/1 1/1
security.get_settings 🟠 Missing type Missing type
security.get_token 🟢 25/25 24/24
security.get_user_privileges 🔴 8/8 7/8
security.get_user_profile 🟢 8/8 8/8
security.get_user 🟢 25/25 25/25
security.grant_api_key 🟢 7/7 7/7
security.has_privileges_user_profile 🟢 3/3 3/3
security.has_privileges 🟢 24/24 24/24
security.invalidate_api_key 🟢 12/12 12/12
security.invalidate_token 🟢 11/11 11/11
security.oidc_authenticate 🟠 Missing type Missing type
security.oidc_logout 🟠 Missing type Missing type
security.oidc_prepare_authentication 🟠 Missing type Missing type
security.put_privileges 🟢 10/10 10/10
security.put_role_mapping 🔴 2/11 11/11
security.put_role 🔴 38/39 38/38
security.put_user 🟢 48/48 47/47
security.query_api_keys 🔴 14/14 1/14
security.query_role 🟢 2/2 2/2
security.query_user 🟢 4/4 4/4
security.saml_authenticate Missing test Missing test
security.saml_complete_logout Missing test Missing test
security.saml_invalidate Missing test Missing test
security.saml_logout Missing test Missing test
security.saml_prepare_authentication Missing test Missing test
security.saml_service_provider_metadata Missing test Missing test
security.suggest_user_profiles 🟢 1/1 1/1
security.update_api_key 🟢 5/5 5/5
security.update_cross_cluster_api_key 🟠 Missing type Missing type
security.update_settings 🟠 Missing type Missing type
security.update_user_profile_data 🟢 1/1 1/1

You can validate these APIs yourself by using the make validate target.

pquentin added a commit to elastic/kibana that referenced this pull request Sep 20, 2024
## Summary

Closes #188608 by adding
"remote_indices" to the Create or update roles API. I'm not adding
`remote_cluster` because it's not documented, and I don't know yet if
it's on purpose or not. As `remote_indices` was also missing from the
Elasticsearch specification, I opened
elastic/elasticsearch-specification#2915 too.

## Screenshots

<img width="561" alt="Screenshot 2024-09-19 at 14 07 07"
src="https://github.com/user-attachments/assets/172a4c54-335c-43f7-a899-5b84bb4fd2da">

<img width="591" alt="Screenshot 2024-09-19 at 14 07 33"
src="https://github.com/user-attachments/assets/e57c20c3-6acf-4ede-8f79-e388f90e4104">

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 20, 2024
## Summary

Closes elastic#188608 by adding
"remote_indices" to the Create or update roles API. I'm not adding
`remote_cluster` because it's not documented, and I don't know yet if
it's on purpose or not. As `remote_indices` was also missing from the
Elasticsearch specification, I opened
elastic/elasticsearch-specification#2915 too.

## Screenshots

<img width="561" alt="Screenshot 2024-09-19 at 14 07 07"
src="https://github.com/user-attachments/assets/172a4c54-335c-43f7-a899-5b84bb4fd2da">

<img width="591" alt="Screenshot 2024-09-19 at 14 07 33"
src="https://github.com/user-attachments/assets/e57c20c3-6acf-4ede-8f79-e388f90e4104">

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

(cherry picked from commit 5a034e9)
kibanamachine added a commit to elastic/kibana that referenced this pull request Sep 20, 2024
#193538)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Console] Add remote_indices to autocomplete overrides
(#193403)](#193403)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Quentin
Pradet","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-20T10:59:37Z","message":"[Console]
Add remote_indices to autocomplete overrides (#193403)\n\n##
Summary\r\n\r\nCloses #188608 by
adding\r\n\"remote_indices\" to the Create or update roles API. I'm not
adding\r\n`remote_cluster` because it's not documented, and I don't know
yet if\r\nit's on purpose or not. As `remote_indices` was also missing
from the\r\nElasticsearch specification, I
opened\r\nhttps://github.com/elastic/elasticsearch-specification/pull/2915
too.\r\n\r\n## Screenshots\r\n\r\n<img width=\"561\" alt=\"Screenshot
2024-09-19 at 14 07
07\"\r\nsrc=\"https://github.com/user-attachments/assets/172a4c54-335c-43f7-a899-5b84bb4fd2da\">\r\n\r\n<img
width=\"591\" alt=\"Screenshot 2024-09-19 at 14 07
33\"\r\nsrc=\"https://github.com/user-attachments/assets/e57c20c3-6acf-4ede-8f79-e388f90e4104\">\r\n\r\n###
For maintainers\r\n\r\n- [ ] This was checked for breaking API changes
and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"5a034e9268620f3d757272599e584a3ec4da24fc","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Console","Team:Kibana
Management","release_note:skip","v9.0.0","backport:prev-minor","v8.16.0"],"title":"[Console]
Add remote_indices to autocomplete
overrides","number":193403,"url":"https://github.com/elastic/kibana/pull/193403","mergeCommit":{"message":"[Console]
Add remote_indices to autocomplete overrides (#193403)\n\n##
Summary\r\n\r\nCloses #188608 by
adding\r\n\"remote_indices\" to the Create or update roles API. I'm not
adding\r\n`remote_cluster` because it's not documented, and I don't know
yet if\r\nit's on purpose or not. As `remote_indices` was also missing
from the\r\nElasticsearch specification, I
opened\r\nhttps://github.com/elastic/elasticsearch-specification/pull/2915
too.\r\n\r\n## Screenshots\r\n\r\n<img width=\"561\" alt=\"Screenshot
2024-09-19 at 14 07
07\"\r\nsrc=\"https://github.com/user-attachments/assets/172a4c54-335c-43f7-a899-5b84bb4fd2da\">\r\n\r\n<img
width=\"591\" alt=\"Screenshot 2024-09-19 at 14 07
33\"\r\nsrc=\"https://github.com/user-attachments/assets/e57c20c3-6acf-4ede-8f79-e388f90e4104\">\r\n\r\n###
For maintainers\r\n\r\n- [ ] This was checked for breaking API changes
and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"5a034e9268620f3d757272599e584a3ec4da24fc"}},"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/193403","number":193403,"mergeCommit":{"message":"[Console]
Add remote_indices to autocomplete overrides (#193403)\n\n##
Summary\r\n\r\nCloses #188608 by
adding\r\n\"remote_indices\" to the Create or update roles API. I'm not
adding\r\n`remote_cluster` because it's not documented, and I don't know
yet if\r\nit's on purpose or not. As `remote_indices` was also missing
from the\r\nElasticsearch specification, I
opened\r\nhttps://github.com/elastic/elasticsearch-specification/pull/2915
too.\r\n\r\n## Screenshots\r\n\r\n<img width=\"561\" alt=\"Screenshot
2024-09-19 at 14 07
07\"\r\nsrc=\"https://github.com/user-attachments/assets/172a4c54-335c-43f7-a899-5b84bb4fd2da\">\r\n\r\n<img
width=\"591\" alt=\"Screenshot 2024-09-19 at 14 07
33\"\r\nsrc=\"https://github.com/user-attachments/assets/e57c20c3-6acf-4ede-8f79-e388f90e4104\">\r\n\r\n###
For maintainers\r\n\r\n- [ ] This was checked for breaking API changes
and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"5a034e9268620f3d757272599e584a3ec4da24fc"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Quentin Pradet <[email protected]>
@pquentin pquentin merged commit bf8d295 into main Sep 23, 2024
8 checks passed
@pquentin pquentin deleted the security-put-role-remote-indices branch September 23, 2024 09:08
Copy link
Contributor

The backport to 8.15 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.15 8.15
# Navigate to the new working tree
cd .worktrees/backport-8.15
# Create a new branch
git switch --create backport-2915-to-8.15
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 bf8d295b608fdf6b6ba9de0d085ff9ae2ac224b7
# Push it to GitHub
git push --set-upstream origin backport-2915-to-8.15
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.15

Then, create a pull request where the base branch is 8.15 and the compare/head branch is backport-2915-to-8.15.

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

Successfully merging this pull request may close these issues.

2 participants