Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Return an empty response for getMappings API when there are no aliases applied #709

Closed
amsiglan opened this issue Nov 2, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@amsiglan
Copy link
Collaborator

amsiglan commented Nov 2, 2023

Is your feature request related to a problem?
When no alias mappings are applied for an index, the GET mappingsView API throws an exception
/_plugins/_security_analytics/mappings?indexName=c*
Response:
{"ok":false,"error":"[security_analytics_exception] No applied aliases found"}

What solution would you like?
Return an empty result instead since it is not an actionable event for the user.

What alternatives have you considered?
N/A

Do you have any additional context?
N/A

@amsiglan amsiglan added enhancement New feature or request untriaged labels Nov 2, 2023
@eirsep eirsep removed the untriaged label Nov 22, 2023
goyamegh added a commit to goyamegh/security-analytics that referenced this issue Nov 22, 2023
goyamegh added a commit to goyamegh/security-analytics that referenced this issue Nov 22, 2023
goyamegh added a commit to goyamegh/security-analytics that referenced this issue Nov 30, 2023
jowg-amazon pushed a commit that referenced this issue Nov 30, 2023
…724)

* #709 Return empty response for empty mappings and no applied aliases

Signed-off-by: Megha Goyal <[email protected]>

* Adding integ tests for empty mappings/aliases use-cases

Signed-off-by: Megha Goyal <[email protected]>

* Fix unit tests for MappingsTraverser

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
opensearch-trigger-bot bot pushed a commit that referenced this issue Nov 30, 2023
…724)

* #709 Return empty response for empty mappings and no applied aliases

Signed-off-by: Megha Goyal <[email protected]>

* Adding integ tests for empty mappings/aliases use-cases

Signed-off-by: Megha Goyal <[email protected]>

* Fix unit tests for MappingsTraverser

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
(cherry picked from commit c0f7bd9)
opensearch-trigger-bot bot pushed a commit that referenced this issue Nov 30, 2023
…724)

* #709 Return empty response for empty mappings and no applied aliases

Signed-off-by: Megha Goyal <[email protected]>

* Adding integ tests for empty mappings/aliases use-cases

Signed-off-by: Megha Goyal <[email protected]>

* Fix unit tests for MappingsTraverser

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
(cherry picked from commit c0f7bd9)
opensearch-trigger-bot bot pushed a commit that referenced this issue Nov 30, 2023
…724)

* #709 Return empty response for empty mappings and no applied aliases

Signed-off-by: Megha Goyal <[email protected]>

* Adding integ tests for empty mappings/aliases use-cases

Signed-off-by: Megha Goyal <[email protected]>

* Fix unit tests for MappingsTraverser

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
(cherry picked from commit c0f7bd9)
opensearch-trigger-bot bot pushed a commit that referenced this issue Nov 30, 2023
…724)

* #709 Return empty response for empty mappings and no applied aliases

Signed-off-by: Megha Goyal <[email protected]>

* Adding integ tests for empty mappings/aliases use-cases

Signed-off-by: Megha Goyal <[email protected]>

* Fix unit tests for MappingsTraverser

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
(cherry picked from commit c0f7bd9)
goyamegh added a commit to goyamegh/security-analytics that referenced this issue Nov 30, 2023
…o applied aliases (opensearch-project#724)

* opensearch-project#709 Return empty response for empty mappings and no applied aliases

Signed-off-by: Megha Goyal <[email protected]>

* Adding integ tests for empty mappings/aliases use-cases

Signed-off-by: Megha Goyal <[email protected]>

* Fix unit tests for MappingsTraverser

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
(cherry picked from commit c0f7bd9)
eirsep pushed a commit that referenced this issue Nov 30, 2023
…724) (#748)

* #709 Return empty response for empty mappings and no applied aliases

Signed-off-by: Megha Goyal <[email protected]>

* Adding integ tests for empty mappings/aliases use-cases

Signed-off-by: Megha Goyal <[email protected]>

* Fix unit tests for MappingsTraverser

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
(cherry picked from commit c0f7bd9)

Co-authored-by: Megha Goyal <[email protected]>
opensearch-trigger-bot bot added a commit that referenced this issue Nov 30, 2023
…724) (#748)

* #709 Return empty response for empty mappings and no applied aliases

Signed-off-by: Megha Goyal <[email protected]>

* Adding integ tests for empty mappings/aliases use-cases

Signed-off-by: Megha Goyal <[email protected]>

* Fix unit tests for MappingsTraverser

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
(cherry picked from commit c0f7bd9)

Co-authored-by: Megha Goyal <[email protected]>
(cherry picked from commit 4f68164)
eirsep pushed a commit that referenced this issue Nov 30, 2023
…724) (#748) (#758)

* #709 Return empty response for empty mappings and no applied aliases

Signed-off-by: Megha Goyal <[email protected]>

* Adding integ tests for empty mappings/aliases use-cases

Signed-off-by: Megha Goyal <[email protected]>

* Fix unit tests for MappingsTraverser

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
(cherry picked from commit c0f7bd9)

Co-authored-by: Megha Goyal <[email protected]>
(cherry picked from commit 4f68164)

Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
goyamegh added a commit to goyamegh/security-analytics that referenced this issue Dec 1, 2023
goyamegh added a commit to goyamegh/security-analytics that referenced this issue Dec 1, 2023
… no applied aliases

Signed-off-by: Megha Goyal <[email protected]>

* Adding integ tests for empty mappings/aliases use-cases

Signed-off-by: Megha Goyal <[email protected]>

* Fix unit tests for MappingsTraverser

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
goyamegh added a commit to goyamegh/security-analytics that referenced this issue Dec 1, 2023
goyamegh added a commit to goyamegh/security-analytics that referenced this issue Dec 1, 2023
… no applied aliases

Signed-off-by: Megha Goyal <[email protected]>

* Adding integ tests for empty mappings/aliases use-cases

Signed-off-by: Megha Goyal <[email protected]>

* Fix unit tests for MappingsTraverser

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
goyamegh added a commit to goyamegh/security-analytics that referenced this issue Dec 1, 2023
… no applied aliases

Signed-off-by: Megha Goyal <[email protected]>

* Adding integ tests for empty mappings/aliases use-cases

Signed-off-by: Megha Goyal <[email protected]>

* Fix unit tests for MappingsTraverser

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
jowg-amazon pushed a commit that referenced this issue Dec 1, 2023
…724) (#750)

* #709 Return empty response for empty mappings and no applied aliases

Signed-off-by: Megha Goyal <[email protected]>

* Adding integ tests for empty mappings/aliases use-cases

Signed-off-by: Megha Goyal <[email protected]>

* Fix unit tests for MappingsTraverser

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
(cherry picked from commit c0f7bd9)

Co-authored-by: Megha Goyal <[email protected]>
jowg-amazon pushed a commit that referenced this issue Dec 1, 2023
…724) (#747)

* #709 Return empty response for empty mappings and no applied aliases

Signed-off-by: Megha Goyal <[email protected]>

* Adding integ tests for empty mappings/aliases use-cases

Signed-off-by: Megha Goyal <[email protected]>

* Fix unit tests for MappingsTraverser

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
(cherry picked from commit c0f7bd9)

Co-authored-by: Megha Goyal <[email protected]>
jowg-amazon pushed a commit that referenced this issue Dec 1, 2023
…724) (#749)

* #709 Return empty response for empty mappings and no applied aliases

Signed-off-by: Megha Goyal <[email protected]>

* Adding integ tests for empty mappings/aliases use-cases

Signed-off-by: Megha Goyal <[email protected]>

* Fix unit tests for MappingsTraverser

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
(cherry picked from commit c0f7bd9)

Co-authored-by: Megha Goyal <[email protected]>
jowg-amazon pushed a commit that referenced this issue Dec 14, 2023
#764)

* * #709 Return empty response for empty mappings and no applied aliases

Signed-off-by: Megha Goyal <[email protected]>

* Adding integ tests for empty mappings/aliases use-cases

Signed-off-by: Megha Goyal <[email protected]>

* Fix unit tests for MappingsTraverser

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>

* Fix indentation

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
jowg-amazon pushed a commit that referenced this issue Dec 14, 2023
#765)

* Adding integ tests for empty mappings/aliases use-cases



* Fix unit tests for MappingsTraverser



---------

Signed-off-by: Megha Goyal <[email protected]>
jowg-amazon pushed a commit that referenced this issue Dec 14, 2023
…763)

* * #709 Return empty response for empty mappings and no applied aliases

Signed-off-by: Megha Goyal <[email protected]>

* Adding integ tests for empty mappings/aliases use-cases

Signed-off-by: Megha Goyal <[email protected]>

* Fix unit tests for MappingsTraverser

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>

* Fix indentation

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
eirsep pushed a commit that referenced this issue Dec 27, 2023
#757)

* #709 Return empty response for empty mappings and no applied aliases (#724)

* #709 Return empty response for empty mappings and no applied aliases

Signed-off-by: Megha Goyal <[email protected]>

* Adding integ tests for empty mappings/aliases use-cases

Signed-off-by: Megha Goyal <[email protected]>

* Fix unit tests for MappingsTraverser

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
(cherry picked from commit c0f7bd9)

* #709 Fix merge conflicts while backporting

Signed-off-by: Megha Goyal <[email protected]>

* #709 Fix merge conflicts while backporting

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
riysaxen-amzn pushed a commit to riysaxen-amzn/security-analytics that referenced this issue Feb 20, 2024
goyamegh added a commit to goyamegh/security-analytics that referenced this issue Mar 15, 2024
… no applied aliases

Signed-off-by: Megha Goyal <[email protected]>

* Adding integ tests for empty mappings/aliases use-cases

Signed-off-by: Megha Goyal <[email protected]>

* Fix unit tests for MappingsTraverser

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
engechas pushed a commit that referenced this issue Mar 19, 2024
* Version bump to 2.7.1

Signed-off-by: Megha Goyal <[email protected]>

* fix detector writeTo() method missing fields (#695)

* fix detector writeTo() method missing fields

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix test

Signed-off-by: Surya Sashank Nistala <[email protected]>

---------

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix null query filter conversion from sigma to query string query (#722)

* fix null query filter conversion from sigma to query string query

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix rule to query conversion tests for null filter

Signed-off-by: Surya Sashank Nistala <[email protected]>

* enhance test to verify non null doc doesnt match null query

Signed-off-by: Surya Sashank Nistala <[email protected]>

---------

Signed-off-by: Surya Sashank Nistala <[email protected]>

* * #709 Return empty response for empty mappings and no applied aliases

Signed-off-by: Megha Goyal <[email protected]>

* Adding integ tests for empty mappings/aliases use-cases

Signed-off-by: Megha Goyal <[email protected]>

* Fix unit tests for MappingsTraverser

Signed-off-by: Megha Goyal <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>

* fixing build failures for previous cherry-pick PR for SAP2.7 (to be squashed)

Signed-off-by: Dennis Toepker <[email protected]>

* Pass rule field names in doc level queries during monitor/creation. Remove blocking actionGet() calls  (#873)

* pass query field names in doc level queries during monitor creation/updation

Signed-off-by: Surya Sashank Nistala <[email protected]>

* remove actionGet() and change get index mapping call to event driven flow

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix chained findings monitor

Signed-off-by: Surya Sashank Nistala <[email protected]>

* add finding mappings

Signed-off-by: Surya Sashank Nistala <[email protected]>

* remove test messages from logs

Signed-off-by: Surya Sashank Nistala <[email protected]>

* revert build.gradle change

Signed-off-by: Surya Sashank Nistala <[email protected]>

---------

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fixing an import

Signed-off-by: Dennis Toepker <[email protected]>

---------

Signed-off-by: Megha Goyal <[email protected]>
Signed-off-by: Surya Sashank Nistala <[email protected]>
Signed-off-by: Dennis Toepker <[email protected]>
Co-authored-by: Megha Goyal <[email protected]>
Co-authored-by: Surya Sashank Nistala <[email protected]>
Co-authored-by: Megha Goyal <[email protected]>
Co-authored-by: Dennis Toepker <[email protected]>
@engechas
Copy link
Collaborator

engechas commented Apr 9, 2024

Resolved by #724

@engechas engechas closed this as completed Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants