[Fortinet Fortiproxy] URL Field Parsing Errors #19603
Conversation
…es on bare-path and special-character url fields
|
Pinging @elastic/integration-experience (Team:Integration-Experience) |
✅ 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 |
Co-authored-by: Cursor <cursoragent@cursor.com>
5283dfe to
923bd46
Compare
| field: client.ip | ||
| if: ctx._fields_.clientip != null | ||
|
|
||
| - script: |
There was a problem hiding this comment.
I don't think the Painless script is necessary as you can also use the set processors to reconstruct the URL:
- set: temp.scheme <- url.scheme / network.protocol
- set: temp.url <- fields.url # if already http(s)://
- set: temp.url <- {{scheme}}://{{url.domain}}{{fields.url}}
...
| String scheme; | ||
| if (ctx.url?.scheme != null) { scheme = ctx.url.scheme.toString().toLowerCase(); } | ||
| else if (['http','https'].contains(ctx.network?.protocol)) { scheme = ctx.network.protocol; } | ||
| else if (ctx.server?.port instanceof Number && ctx.server.port == 443) { scheme = 'https'; } |
There was a problem hiding this comment.
I'm wary of special-casing 443 as HTTPS may very well be using a different port. Note there are no instances of ctx.server.port == 443 string in the current integrations codebase.
Perhaps the scheme will in fact be always present in these cases so we don't need to guess?
|
✅ All changelog entries have the correct PR link. |
💚 Build Succeeded
History
|
Proposed commit message
Fix URI parsing failures when url field contains only a path or query string.
Checklist
- [ ] I have verified that all data streams collect metrics or logs.changelog.ymlfile.- [ ] I have verified that Kibana version constraints are current according to guidelines.- [ ] I have verified that any added dashboard complies with Kibana's Dashboard good practicesRelated issues
Resolves: #15111
Screenshots