-
Notifications
You must be signed in to change notification settings - Fork 358
[Extensions] Create a way to identify if an Extension REST Handler will create a scheduled job #2623
Description
Some plugin actions, such as Anomaly Detector's Create Detector, create job definitions in an index owned by the plugin that Job Scheduler is aware of. The job definition contains a schedule section which specifies if the job runs on a CRON schedule or an an interval. This is how plugins make Job Scheduler aware that jobs exist and when to trigger the jobs to be run.
With extensions, the indices are still owned by the extension and the extension makes Job Scheduler aware of the index to look for new jobs. As part of handling async operations for extensions, the jobs definition also needs to store a token representative of the user who created the job so that Job Scheduler can request to issue new access tokens on behalf of the user.
These tokens are refresh_tokens and are tokens that themselves do not provide access to the cluster, however, Job Scheduler can request a new access token from the Security plugin on job invocation by utilizing this access token.
For this issue, a method needs to be devised to identify if an Extension REST Handler will create a scheduled job. For requests that create a scheduled job, a refresh_token (in addition to the access token) will be provided to the extension to store with the job definition.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status