[Backport 3.7] Apply Index Monitor API input validation to the Execute Monitor API - #2226
Open
opensearch-ci-bot wants to merge 1 commit into
Open
Conversation
…pensearch-project#2225) The Execute Monitor API (POST /_plugins/_alerting/monitors/_execute) did not apply the same input validation that the Index Monitor API applies when a monitor is created. This makes the two paths consistent: - RestExecuteMonitorAction now calls validateDataSources() so an inline monitor cannot specify non-default query/findings/alerts indices, matching the check already performed by RestIndexMonitorAction. - TransportExecuteMonitorAction now checks that the caller has read access to the inline monitor's configured input indices before stashing the security context, mirroring TransportIndexMonitorAction.checkIndicesAndExecute. Monitors executed by id are unaffected as they are validated at creation. Signed-off-by: Jeremy Michael <jsusanto@amazon.com> Co-authored-by: Jeremy Michael <jsusanto@amazon.com> (cherry picked from commit 69e265b) Signed-off-by: opensearch-ci-bot <opensearch-infra@amazon.com>
opensearch-ci-bot
requested review from
AWSHurneyt,
KashKondaka,
amsiglan,
bowenlan-amzn,
eirsep,
engechas,
getsaurabh02,
goyamegh,
lezzago,
manaswini1920,
nishtham-amazon,
rishabhmaurya,
riysaxen-amzn,
toepkerd and
vikhy-aws
as code owners
September 9, 2026 19:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport 69e265b from #2225.