Provide utilities to create 'fake' requests #52978
Labels
discuss
Feature:New Platform
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Some plugins (reporting for starters) needs to fake the user authentication to impersonate them during some deferred work.
Reporting for example encrypt and store an incoming request's authentication headers to be able to have the reporting job impersonate the user when accessing SO or other ES endpoints.
kibana/x-pack/legacy/plugins/reporting/export_types/common/execute_job/get_custom_logo.ts
Lines 22 to 42 in ad356f5
In legacy platform, they forge the request themselves. Technically, they still could do the same in NP, However this seems fragile and relies on the underlying implementation.
Should we ease this process by providing utility methods (static on
KibanaRequest
or a proper API on the http service for example)?The text was updated successfully, but these errors were encountered: