Currently, geospatial instantiates its own instance of the LockService by passing in the Client given to geospatial through createComponents.
As part of the effort to Strengthen System Indices in the Plugin Ecosystem, plugins will be restricted to only perform transport actions to their own system indices. This PR is to ensure that Geospatial uses the LockService instantiated by JS (which has permission to JS system indices) vs creating its own LockService.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.
Description
Companion JS PR: https://github.com/opensearch-project/job-scheduler/pull/670
This PR shows how Geospatial can be refactored to use the instance of the LockService that is initialized in Job Scheduler's
createComponents
.This PR is part of an effort to remove usages of
ThreadContext.stashContext
across the plugins: https://github.com/opensearch-project/opensearch-plugins/issues/238Currently, geospatial instantiates its own instance of the LockService by passing in the Client given to geospatial through
createComponents
.As part of the effort to Strengthen System Indices in the Plugin Ecosystem, plugins will be restricted to only perform transport actions to their own system indices. This PR is to ensure that Geospatial uses the LockService instantiated by JS (which has permission to JS system indices) vs creating its own LockService.
Related Issues
Related to https://github.com/opensearch-project/security/issues/4439
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.