Skip to content

Enhance Query API key information API #101691

@SiddharthMantri

Description

@SiddharthMantri

Summary:

Enhance Query API key information API to support API key management page use cases

Description:

To improve user experience Customers with a large number of API keys are unable to use the API key management page today as there is a lack of pagination support in the GET endpoint. To enable such users to use this feature, we (Kibana security team) are moving away from the Get API key information API to the Query API. We require some changes to the Query API key API to support enhanced searching and term aggregation.

  • Search Capabilities

    • Description: Extend the current search capabilities of the API endpoint to accept new query fields.
    • Requirement: Add a new query field called type to the existing ones
    • Possible values: cross_cluster, rest. The filter will only call one or the other and never both at the same time
  • Term Aggregation:

    • Description: When loading a subset of API keys, the endpoint should provide all associated usernames, types and if the keys are active/expired, irrespective of the number of keys loaded.
    • Use Case: For instance, a user visits a UI page and loads 10 API keys. These 10 keys are a subset of a total of 20 keys, each created by a different user. The UI's Owner dropdown should display all 20 usernames, even if only 10 are loaded. Similarly, having that information for active/expired keys and types of keys would be needed as well.
    • Note: The term aggregation should honor the privileges manage_api_key and manage_own_api_key for the results. For those users who have the manage_own_api_key privileges, the results should not include the keys that do not belong to them.

UI

image

This is the existing UI which loads all the API keys and then displays them using an in-memory table.

We intend to move away from this in-memory table. To support a 1:1 mapping between the old and new features, we would also require some enhancements to the API to support use cases of the search bar

Free text search
If a user searches with the term exp, the table currently displays results as follows

image

This also works similarly if the user searches by API key “type” as ‘personal/cross_cluster` or any other criteria on that page.

image

To keep the user experience similar across this change, a free text query capability like this one would be a very welcome addition to the Query API key information API.

We’d like to inspect the following fields for free text search:

  • Username
  • Type
  • Name
  • Id

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions