Skip to content

[Extensions] Save user details to scheduled job identity index on postIndex of a plugin/extension scheduling a new job #2625

@cwperks

Description

@cwperks

This issue refers to the implementation of saveUserDetails as described on the interface proposed in this issue: #2626

On a call to saveUserDetails the security plugin should save the user information associated with a scheduled job to a single index with references back to the index that job details are stored in. The reference back to a job details entry will be a job_id and job_index which references a single entry of job details where the details of a scheduled job (including its schedule) is stored.

If the index doesn't exist yet then it should be created. This index should have system index protection since it contains sensitive data - like the security index. See this block from AD on how to create an index and index a document: https://github.com/opensearch-project/anomaly-detection/blob/041d6ce73d37f1697013b2d2f0683fbfe012247c/src/main/java/org/opensearch/ad/rest/handler/IndexAnomalyDetectorJobActionHandler.java#L163-L181

The JobSweeper is an IndexingOperationListener which means it can override postIndex to listen and react to new job details documents being indexed across any of the indices that are registered with job scheduler. In this method, the method described in this issue can be invoked to trigger the identity system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triagedIssues labeled as 'Triaged' have been reviewed and are deemed actionable.

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions