Skip to content

A new search API for API keys - core search function (#75335)#75996

Merged
ywangd merged 3 commits intoelastic:7.xfrom
ywangd:es-71023-new-search-for-api-keys-7.x
Aug 3, 2021
Merged

A new search API for API keys - core search function (#75335)#75996
ywangd merged 3 commits intoelastic:7.xfrom
ywangd:es-71023-new-search-for-api-keys-7.x

Conversation

@ywangd
Copy link
Copy Markdown
Member

@ywangd ywangd commented Aug 3, 2021

This PR adds a new API for searching API keys. The API supports searching API
keys with a controlled list of field names and a subset of Query DSL. It also
provides a translation layer between the field names used in the REST layer and
those in the index layer. This is to prevent tight coupling between the user
facing request and index mappings so that they can evolve separately.

Compared to the Get API key API, this new search API automatically applies
calling user's security context similar to regular searches, e.g. if the user
has only manage_own_api_key privilege, only keys owned by the user are returned
in the search response.

Relates: #71023

This PR adds a new API for searching API keys. The API supports searching API
keys with a controlled list of field names and a subset of Query DSL. It also
provides a translation layer between the field names used in the REST layer and
those in the index layer. This is to prevent tight coupling between the user
facing request and index mappings so that they can evolve separately.

Compared to the Get API key API, this new search API automatically applies
calling user's security context similar to regular searches, e.g. if the user
has only manage_own_api_key privilege, only keys owned by the user are returned
in the search response.

Relates: elastic#71023
@ywangd ywangd added the backport label Aug 3, 2021
@ywangd ywangd merged commit 7187d8c into elastic:7.x Aug 3, 2021
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