opensearch-project / opensearch-project/security-analytics

[BUG] Validate for existing name when creating detector

Open
#207 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

backport 2.x bug
Dominant language
Java
Stars
111
Forks
111
Avg merge
1d 17h
Merged PRs (30d)
13

Description

What is the bug?
When user creates a detector, we are not verifying if a detector with same name already exists.

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Create a detector using create detector API
  2. Create another detector with same name

What is the expected behavior?
API fails to created the second detector with error along the lines of detector with same name already exists

What is your host/environment?
NA

Do you have any screenshots?
Na

Do you have any additional context?
NA

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the create detector API entry point and reproduce the two-step request sequence described in the issue. Trace how detector names are handled during creation and confirm that a second detector with the same name is rejected with an appropriate error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.