[CAMPAIGN] Remove references to authz of users outside of security index and request most up-to-date authz from security when needed #2846
Labels
enhancement
New feature or request
triaged
Issues labeled as 'Triaged' have been reviewed and are deemed actionable.
There are potentially many dangling references to users and user attributes including roles and backend roles throughout many different indices in an OpenSearch cluster. When scheduling jobs, plugins that schedule jobs will often read the User information from the threadcontext that was populated by the security plugin and store the user alongside the job details in an index owned by the plugin. This tightly couples plugins to the security plugin and also creates a point-in-time reference to authorization of the user outside of the security index. If the authorization or the user changes then the entry in the plugin's job index will be stale and the job can potentially execute with incorrect authz. In addition to running with incorrect authz, it is also possible to delete a user and keep a dangling reference to the user outside of the security index.
Ideally, there is referential integrity for users and any references can be handled gracefully.
The primary challenge of keeping track of the most up-to-date authz information about a user is that there generally is no way of linking a user back to the auth domain that the user was originally authenticated from (internal or external). In the case of external authentication backend, it is not clear if its possible to retrieve the most up-to-date authz at any time or only keep track of the latest authz information seen from the last successful login of the user.
To summarize:
Challenges:
The text was updated successfully, but these errors were encountered: