You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For 2.6, we onboarded k-NN into the security plugin, however, we had to revert the change due to failed permissions writing to system index in our code.
The problem was that we marked the index as a system index in the default security demo install script (ref).
In the security integration tests ran as a part of the 2.6 release testing, we were getting a failure that looked like:
[2023-02-23T22:29:33,608][ERROR][o.o.k.t.TrainingJobRunner] [dev-dsk-jmazane-2a-180e0128.us-west-2.amazon.com] Unable to initialize model serialization: no permissions for [] and User [name=admin, backend_roles=[admin], requestedTenant=null]
The issue is that when we try to write to the system index in ModelDao.
The problem is that the thread context when executing those calls has the user that made the requests credentials in the headers. In the security plugin, only superadmins can use make requests to modify the index (refer to this comment in AD).
One method for solving this is to stash the thread context before making the call. This will remove the headers. Security will interpret this as superadmin making request and allowing it to happen. See example in AnomalyDetection.
Description
For 2.6, we onboarded k-NN into the security plugin, however, we had to revert the change due to failed permissions writing to system index in our code.
The problem was that we marked the index as a system index in the default security demo install script (ref).
In the security integration tests ran as a part of the 2.6 release testing, we were getting a failure that looked like:
The issue is that when we try to write to the system index in ModelDao.
The problem is that the thread context when executing those calls has the user that made the requests credentials in the headers. In the security plugin, only superadmins can use make requests to modify the index (refer to this comment in AD).
One method for solving this is to stash the thread context before making the call. This will remove the headers. Security will interpret this as superadmin making request and allowing it to happen. See example in AnomalyDetection.
Related security plugin code
(thanks for providing @cwperks)
Related Issues/Prs
The text was updated successfully, but these errors were encountered: