Skip to content

ti_abusech: Adjust field mappings for transform - #10049

Merged
kcreddy merged 1 commit into
elastic:mainfrom
kcreddy:abusech-field-mapping
Jun 6, 2024
Merged

ti_abusech: Adjust field mappings for transform#10049
kcreddy merged 1 commit into
elastic:mainfrom
kcreddy:abusech-field-mapping

Conversation

@kcreddy

@kcreddy kcreddy commented Jun 3, 2024

Copy link
Copy Markdown
Contributor

Proposed commit message

Adjust field mappings for transform.

Some fields such as event.module were missing from the destination index.
The field mappings are getting overwritten when same prefix exists in 
multiple files. To prevent this, all fields with same prefix are moved into 
single file, in this case ecs.yml. This is only a temporary fix until 
kibana.version is updated to >= 8.14.0, in which the root issue is fixed.

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

  • Verify the destination mappings in all AbuseCH datastreams contains the missing fields event.module, event.dataset, threat.feed.name, and threat.feed.dashboard_id

Related issues

@kcreddy
kcreddy marked this pull request as ready for review June 3, 2024 11:17
@kcreddy
kcreddy requested a review from a team as a code owner June 3, 2024 11:17
@kcreddy kcreddy self-assigned this Jun 3, 2024
@kcreddy kcreddy added Integration:ti_abusech abuse.ch bugfix Pull request that fixes a bug issue labels Jun 3, 2024
@elasticmachine

Copy link
Copy Markdown

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

History

  • 💚 Build #12173 succeeded 0919d85218a2473a2ebbfa87e9874b37934b2ecb

cc @kcreddy

@elastic-sonarqube

Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@andrewkroh andrewkroh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you do a manual test where you export the mappings using 8.14 (where this problem is fixed) and compare with the mappings generated from this PR in 8.13. I want to double check that there are no other unexpected differences.

Otherwise LGTM.

@kcreddy

kcreddy commented Jun 4, 2024

Copy link
Copy Markdown
Contributor Author

Can you do a manual test where you export the mappings using 8.14 (where this problem is fixed) and compare with the mappings generated from this PR in 8.13. I want to double check that there are no other unexpected differences

Attached are the mappings I tested for AbuseCH.

I verified source vs dest mappings for same version (8.13 and 8.14). I also verified dest 8.13 vs dest 8.14 mappings. All of them correctly match, except for Malware datastream.
On 8.14, the destination index of malware is incorrectly adding extra fields with malwarebazaar.* and threat.* that are actually part of malwarebazaar datastream. I am not sure why that is happening.

All of destination mappings are adding the missing fields event.module, event.dataset, threat.feed.name, and threat.feed.dashboard_id

@kcreddy

kcreddy commented Jun 4, 2024

Copy link
Copy Markdown
Contributor Author

Added few more ti_* packages to this PR: #10062

@andrewkroh

Copy link
Copy Markdown
Contributor

On 8.14, the destination index of malware is incorrectly adding extra fields with malwarebazaar.*

That reproduces for me. I see the malwarebazaar fields in the logs-ti_abusech.latest_malware-template@package component template. There are no malwarebazaar fields in packages/ti_abusech/elasticsearch/transform/latest_malware/fields/*. This seems like it would have to be a bug in Fleet because it created the component template. Can you please open a Kibana bug for this.

The extra mappings won't break anything in this use-case, will they?

@kcreddy

kcreddy commented Jun 4, 2024

Copy link
Copy Markdown
Contributor Author

The extra mappings won't break anything in this use-case, will they?

Yeah, they shouldn't be a problem.

Can you please open a Kibana bug for this.

Created: elastic/kibana#184759

@kcreddy
kcreddy requested a review from andrewkroh June 5, 2024 05:50
@kcreddy
kcreddy merged commit d540054 into elastic:main Jun 6, 2024
@elasticmachine

Copy link
Copy Markdown

Package ti_abusech - 2.0.1 containing this change is available at https://epr.elastic.co/search?package=ti_abusech

@narph narph added the Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] label Jun 10, 2024
@elasticmachine

Copy link
Copy Markdown

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@kcreddy
kcreddy deleted the abusech-field-mapping branch February 7, 2025 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes a bug issue Integration:ti_abusech abuse.ch Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

4 participants