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

[cloud_security_posture] Update index template mapping #3248

Merged
merged 8 commits into from May 3, 2022

Conversation

uri-weisman
Copy link
Contributor

@uri-weisman uri-weisman commented May 2, 2022

What does this PR do?

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Author's Checklist

  • [ ]

How to test this PR locally

Install the integration and verify ES is able to index the cloudbeat events according to the new mapping.

Related issues

Screenshots

@elasticmachine
Copy link

elasticmachine commented May 2, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-05-03T09:30:27.159+0000

  • Duration: 15 min 4 sec

Test stats 🧪

Test Results
Failed 0
Passed 1
Skipped 0
Total 1

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

elasticmachine commented May 2, 2022

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (0/0) 💚
Files 100.0% (0/0) 💚 3.275
Classes 100.0% (0/0) 💚 3.275
Methods 33.333% (1/3) 👎 -55.78
Lines 100.0% (0/0) 💚 10.01
Conditionals 100.0% (0/0) 💚

@uri-weisman
Copy link
Contributor Author

/test

@uri-weisman uri-weisman requested a review from CohenIdo May 2, 2022 10:01
@uri-weisman uri-weisman marked this pull request as ready for review May 2, 2022 10:01
@uri-weisman uri-weisman requested a review from a team as a code owner May 2, 2022 10:01
Copy link
Contributor

@amitkanfer amitkanfer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one comment

- name: name
type: text
ignore_above: 1024
- name: sub_type
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't subtype be keyword?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't subtype be keyword?

I thought the user might want to search for a partial sub_type and get results.
For example, search for Controller and get data about ReplicationController | DeploymentController

Anyway, I used multi-fields which should index the field as text & keyword - multi-fields

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the conventions in ECS (and most integrations) is to use .text as the multi-field rather than .keyword. See https://www.elastic.co/guide/en/ecs/8.2/ecs-conventions.html#_ecs_convention_for_indexing_text_fields for an explanation. Just want to mention this in case there is still an opportunity to align with this convention.

@@ -10,6 +10,7 @@
- name: keyword
type: keyword
ignore_above: 1024
# deprecated - the new field is under the resource obj
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not clear which field are you referring here.
please add this comment to both type and resource_id

@uri-weisman uri-weisman requested a review from eyalkraft May 2, 2022 12:24
Copy link
Contributor

@eyalkraft eyalkraft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test and ship 👍

@uri-weisman uri-weisman requested a review from eyalkraft May 3, 2022 10:22
@uri-weisman uri-weisman merged commit 7a2674c into elastic:main May 3, 2022
@uri-weisman uri-weisman deleted the update_integration_mapping branch May 3, 2022 11:07
@andrewkroh andrewkroh changed the title Update index template mapping [cloud_security_posture] Update index template mapping May 4, 2022
@kfirpeled kfirpeled added the Team:Cloud Security Label for the Cloud Security team label Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants