Skip to content

[CPS] Project local routing by default #232364

@rudolf

Description

@rudolf

Elasticsearch serverless will be introducing Cross Project Search (CPS) enabled by default. But not all Kibana to Elasticsearch API calls are safe to use with CPS. To allow for incremental rollout Kibana will therefore disable CPS in all API calls. Once plugins have verified that their functionality supports CPS they should be able to explicitly opt-in to CPS again.

This work is blocked on elastic/elasticsearch-js#2902 where the clients team will expose the ability to:

  • Intercept and modify API calls
  • Check if an API call supports a given query parameter like query_routing
  • Check if a given query param like query_routing is set (non-null)

Using the above functionality Kibana can intercept any API calls made through the Elasticsearch client exposed by Core. If a given API call supports query_routing Core will set query_routing: "_tag._alias:_local" to disable CPS.

To allow plugins to opt-in to CPS they can specify a symbol for query_routing:

// Core code:
export const CPS_ENABLED = Symbol('explicit-cps-opt-in');

// Plugin code:
client.search({..., query_routing: CPS_ENABLED})

If Core detects this symbol it will unset query_routing so that this query will use the Elasticsearch default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Team:CorePlatform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t//blocked

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions