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 API Key Information API support for the typed_keys request parameter #106873

Conversation

albertzaharovits
Copy link
Contributor

The typed_keys request parameter is the canonical parameter,
that's also used in the regular index _search enpoint, in order to
return the types of aggregations in the response.
This is required by typed language clients of the _security/_query/api_key
endpoint that are using aggregations.

Closes #106817

@albertzaharovits albertzaharovits added >enhancement :Security/Security Security issues without another label labels Mar 28, 2024
@albertzaharovits albertzaharovits self-assigned this Mar 28, 2024
@albertzaharovits albertzaharovits marked this pull request as ready for review March 28, 2024 14:28
Copy link

Documentation preview:

@elasticsearchmachine elasticsearchmachine added Team:Security Meta label for security team v8.14.0 labels Mar 28, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-security (Team:Security)

@elasticsearchmachine
Copy link
Collaborator

Hi @albertzaharovits, I've created a changelog YAML for you.

(Optional, Boolean) If `true`, aggregation and suggester names are be prefixed
by their respective types in the response. Defaults to `true`.
(Optional, Boolean) If `true`, aggregation and suggester names are prefixed
by their respective types in the response. Defaults to `false`.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It defaults to false:

if (params.paramAsBoolean(RestSearchAction.TYPED_KEYS_PARAM, false)) {

if (params.paramAsBoolean(RestSearchAction.TYPED_KEYS_PARAM, false)) {

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch 👍

@n1v0lg n1v0lg self-requested a review March 28, 2024 15:43
Copy link
Contributor

@n1v0lg n1v0lg left a comment

Choose a reason for hiding this comment

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

LGTM

@albertzaharovits albertzaharovits merged commit b4938e1 into elastic:main Mar 29, 2024
18 checks passed
@albertzaharovits albertzaharovits deleted the response_params_for_query_api_keys branch March 29, 2024 07:24
albertzaharovits added a commit to albertzaharovits/elasticsearch that referenced this pull request Apr 4, 2024
…rameter (elastic#106873)

The typed_keys request parameter is the canonical parameter,
that's also used in the regular index _search enpoint, in order to
return the types of aggregations in the response.
This is required by typed language clients of the _security/_query/api_key
endpoint that are using aggregations.

Closes elastic#106817
albertzaharovits added a commit that referenced this pull request Apr 5, 2024
…rameter (#106873) (#107110)

The typed_keys request parameter is the canonical parameter,
that's also used in the regular index _search enpoint, in order to
return the types of aggregations in the response.
This is required by typed language clients of the _security/_query/api_key
endpoint that are using aggregations.

Backport of #106873
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Security/Security Security issues without another label Team:Security Meta label for security team v8.13.2 v8.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RestQueryApiKeyAction is missing the "typed_keys" parameter
3 participants