Skip to content

Core should expose a dedicated Elasticsearch client for interacting with Kibana system indices #82716

@rudolf

Description

@rudolf

Background:

The background context and motivation is outlined in #81536

Implementation

To allow plugins to continue to access Kibana's system indices all requests to Elasticsearch will have to use a path prefixed by _kibana/. To reduce the amount of effort to adopt this and maintain the ElasticsearchJS client's typescript types, Core should expose a special system indices Elasticsearch client that will automatically prefix all paths.

Investigate deprecating / removing callAsInternalUser

In most cases the new system index client should replace using the callAsInternalUser API. However there are some places where plugins rely on the permission of the kibana system user while access non-system index API's.

Interacting with kibana indices that aren't system indices

The following is a list of kibana indices that aren't system indices which probably use the kibana system user callAsInternalUser in some way:

  • Alerting's event log - .kibana-event-log-*
  • Monitoring - .monitoring-*
  • Detection engine signals - .siem-signals-*
  • Security solution lists - .lists and .values

Accessing ES API's that aren't related to an index / system index

The following places use the internal user to call non-document / non-index API's. We could continue to use the system ElasticsearchJS client for this, but add a remove list to not prefix these API paths.

Other places to audit callAsInternalUser usage

Metadata

Metadata

Assignees

No one assigned

    Labels

    Team:CorePlatform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t//enhancementNew value added to drive a business result

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions