Skip to content

[Backport 2.19] Validate api_type matches path in ClusterMetricsInput#914

Merged
AWSHurneyt merged 1 commit into2.19from
backport/backport-912-to-2.19
Mar 12, 2026
Merged

[Backport 2.19] Validate api_type matches path in ClusterMetricsInput#914
AWSHurneyt merged 1 commit into2.19from
backport/backport-912-to-2.19

Conversation

@opensearch-trigger-bot
Copy link
Contributor

Backport 5103490 from #912.

When creating a cluster metrics monitor, the api_type field was silently
ignored during deserialization. This allowed creating monitors with
mismatched api_type and path fields, which then could not be deleted
via the DeleteMonitor API.

Added validation in parseInner to reject requests where the provided
api_type does not match the API derived from the path.

Resolves opensearch-project/alerting#1987

Signed-off-by: Manaswini Ragamouni <ragamanu@amazon.com>
Co-authored-by: Manaswini Ragamouni <ragamanu@amazon.com>
(cherry picked from commit 5103490)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@AWSHurneyt AWSHurneyt merged commit 08b51de into 2.19 Mar 12, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant