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

Query and Get API Key Information endpoints support for profile uid #2473

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

albertzaharovits
Copy link
Contributor

@albertzaharovits albertzaharovits commented Mar 29, 2024

This PR changes the client spec to support the new
with_profile_uid request parameter, as well as the
corresponding profile_uid response field in the returned API key information,
for the Get and Query API key endpoints, from elastic/elasticsearch#106531 .

Separately it adds support for the typed_keys request parameter to
the Query API key endpoint, from elastic/elasticsearch#106873

It also exposes the realm_type field in the returned API key information,
from elastic/elasticsearch#105629

@albertzaharovits albertzaharovits self-assigned this Mar 29, 2024
@albertzaharovits albertzaharovits removed their assignment Mar 29, 2024
Anaethelion
Anaethelion previously approved these changes Apr 4, 2024
Copy link
Contributor

@Anaethelion Anaethelion left a comment

Choose a reason for hiding this comment

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

LGTM overall, can you split typed_keys in another PR if that is back ported into 8.13.

Also can you run a make spec-format-fix for code style?

@Anaethelion Anaethelion self-requested a review April 4, 2024 12:40
@Anaethelion Anaethelion dismissed their stale review April 4, 2024 12:40

potential conflict with typed_keys backport?

@albertzaharovits
Copy link
Contributor Author

Thank you for reviewing @Anaethelion !

can you split typed_keys in another PR if that is back ported into 8.13.

I haven't yet backported the typed_keys to 8.13, and not really planning to. I will raise a separate PR on the 8.13 branch in case.

can you run a make spec-format-fix for code style?

Can you please handle this in my place, as I don't have the tools installed?

@l-trotta l-trotta force-pushed the with-profile-uid-get-and-query-api-keys branch from 7c4c42c to 24c64e7 Compare April 4, 2024 16:50
Copy link
Contributor

github-actions bot commented Apr 4, 2024

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 🟢 29/29 29/29
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 🟢 57/57 48/48
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 🔴 37/37 14/37
security.get_builtin_privileges 🟢 2/2 2/2
security.get_privileges 🟢 12/12 12/12
security.get_role_mapping 🔴 18/18 10/18
security.get_role 🟢 20/20 20/20
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 🟢 7/7 7/7
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 🟢 39/39 38/38
security.put_user 🟢 50/50 49/49
security.query_api_keys 🔴 14/14 1/14
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.

@l-trotta l-trotta merged commit 76da5bd into main Apr 4, 2024
6 checks passed
@l-trotta l-trotta deleted the with-profile-uid-get-and-query-api-keys branch April 4, 2024 16:55
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.

3 participants