Repository navigation
[island_browser] - Fix device pipeline parsing of multi-NIC internalIpAddress - #20282
Conversation
…dress The device ingest pipeline used a single dissect on the first "/" to extract an IP from internalIpAddress. When the Island API returned a "/"-separated list of "<ip> | <adapter>" pairs for hosts with 3+ NICs, the leftover separators failed the subsequent convert-to-ip and produced event.kind: pipeline_error. Strip the adapter labels with gsub, split the cleaned list into individual addresses, and append each one to related.ip. The single-IP path is unchanged. Adds multi-NIC, two-NIC, and single-NIC-with-adapter cases to the device pipeline test. Fixes elastic#18159 Co-authored-by: Cursor <cursoragent@cursor.com>
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
✅ Elastic Docs Style Checker (Vale)No issues found on modified lines! The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
🚀 Benchmarks reportTo see the full report comment with |
Drop the redundant if conditions on the gsub, split, and convert processors that handle internalIpAddress; each already has ignore_missing, which exits on a missing or null field. Represent a single internal IP as a scalar rather than a one-element list so single-NIC devices match the shape used when the API reports a single IP directly, while multi-NIC devices keep the array. Correct the changelog link to point at the pull request. Updates elastic#18159 Co-authored-by: Cursor <cursoragent@cursor.com>
|
@mohitjha-elastic, I've addressed all your comments. |
|
✅ All changelog entries have the correct PR link. |
|
No issues across the latest commits 5d0b7fd.
🤖 AI-Generated Review | Vera Review Bot | 📚 Knowledge base: integration-skills
|
| - script: | ||
| lang: painless | ||
| tag: script_flatten_single_internal_ip | ||
| description: >- | ||
| Represent a single internal IP as a scalar rather than a single-element | ||
| list, so devices with one NIC match the shape used for devices that | ||
| report a single IP directly. | ||
| if: ctx.island_browser?.device?.internal_ip_address instanceof List && ctx.island_browser.device.internal_ip_address.size() == 1 | ||
| source: >- | ||
| ctx.island_browser.device.internal_ip_address = ctx.island_browser.device.internal_ip_address.get(0); |
There was a problem hiding this comment.
The script is resistant against edge-case values like 192.0.2.10/ compared to a split + set that will produce a list in this case.
💚 Build Succeeded
History
cc @ShourieG |
| "island_browser": { | ||
| "device": { | ||
| "browser_name": "Island", | ||
| "email": "test.three@example.com", | ||
| "external_ip_address": "203.0.113.200", | ||
| "id": "device-test-multinic-3", | ||
| "internal_ip": "192.0.2.10 | Ethernet0/198.51.100.20 | Wi-Fi/203.0.113.30", | ||
| "internal_ip_address": [ | ||
| "192.0.2.10", | ||
| "198.51.100.20", | ||
| "203.0.113.30" | ||
| ], |
There was a problem hiding this comment.
@mohitjha-elastic, example of convert processor working on multiple ips
|
Package island_browser - 1.1.2 containing this change is available at https://epr.elastic.co/package/island_browser/1.1.2/ |
Type of change
Proposed commit message
Note
Test data was generated using LLMs, it does not contain any customer data.
Checklist
changelog.ymlfile.Author's Checklist
How to test this PR locally
Related issues
Screenshots