- Notifications
You must be signed in to change notification settings - Fork 508
PANW | Fix discrepancies in user fields and conform to ECS #4751
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
Conversation
🌐 Coverage report
|
| Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
packages/panw/data_stream/panos/elasticsearch/ingest_pipeline/default.yml Outdated Show resolved Hide resolved
| - script: | ||
| if: "ctx.panw?.panos?.sub_type == 'url' && (ctx.panw?.panos?.misc instanceof String) && (ctx.panw.panos.misc.contains('/'))" | ||
| lang: painless | ||
| source: |- | ||
| String url_original = ctx.panw.panos.misc; | ||
| ctx.destination.domain = url_original.splitOnToken("/")[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this. We have the uri_parts processor above, but I did notice that that was failing because (presumably) the URL is missing a scheme in the inputs that we have here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I have also seen when I was making changes that there might be a bug in uri_parts processor, or that scheme needs to be added to the logs for the processor to work properly.
But the user in SDH would like to either see this field destination.domain or remove it from the documentation (fields.yml) entirely. Splitting on panw.panos.misc when sub_type == 'url' condition is met, is one way to populate this field, which I have done here.
Should I be removing it from the documentation instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably worth filing an issue against ES for the processor if there is a bug there. Can the correct behaviour of the uri_parts processor for the data that we see here be implemented in painless reasonably easily?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me give that a try in painless parsing some of the url fields that uri_parts was supposed to output correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @efd6 , sorry I lost this while I was sick. I replaced uri_parts with script processor which can extract url fields for threat.yml pipeline.
packages/panw/data_stream/panos/elasticsearch/ingest_pipeline/threat.yml Show resolved Hide resolved
| Package panw - 3.4.2 containing this change is available at https://epr.elastic.co/search?package=panw |
What does this PR do?
trafficandthreatpipeline are missingsource.user.domainunlike other PANW pipelines. This PR parses and addssource.user.domainjust like other pipelines in PANW. Similar tosource.userfield, this PR also addsdestination.userfields which were absent.userfields fromsource.userbased on doc heredestination.domainby parsingurl.originalfield asurl.domainis not present.Checklist
changelog.ymlfile.