Skip to content

[Fortinet Fortiproxy] URL Field Parsing Errors - #19603

Merged
robester0403 merged 4 commits into
elastic:mainfrom
robester0403:fortinet-fortiproxy-url-parsing-issue
Jun 29, 2026
Merged

[Fortinet Fortiproxy] URL Field Parsing Errors #19603
robester0403 merged 4 commits into
elastic:mainfrom
robester0403:fortinet-fortiproxy-url-parsing-issue

Conversation

@robester0403

@robester0403 robester0403 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Proposed commit message

Fix URI parsing failures when url field contains only a path or query string.

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.
    - [ ] I have verified that any added dashboard complies with Kibana's Dashboard good practices

Related issues

Resolves: #15111

Screenshots

image
…es on bare-path and special-character url fields
@robester0403
robester0403 requested a review from a team as a code owner June 17, 2026 15:17
@robester0403 robester0403 added bugfix Pull request that fixes a bug issue Integration:fortinet_fortiproxy Fortinet FortiProxy Team:Integration-Experience Security Integrations Integration Experience [elastic/integration-experience] labels Jun 17, 2026
@robester0403 robester0403 self-assigned this Jun 17, 2026
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/integration-experience (Team:Integration-Experience)

@github-actions

Copy link
Copy Markdown
Contributor

✅ 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.

@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

Co-authored-by: Cursor <cursoragent@cursor.com>
@robester0403
robester0403 force-pushed the fortinet-fortiproxy-url-parsing-issue branch from 5283dfe to 923bd46 Compare June 17, 2026 15:58
Comment thread packages/fortinet_fortiproxy/changelog.yml Outdated
field: client.ip
if: ctx._fields_.clientip != null

- script:

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.

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'; }

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.

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?

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.

Agreed, while 443 should be a safe guess, it's not always guaranteed to be https. Also, this wouldn't work at all for other port numbers.

Are there any other fields we can key off of to get the protocol/scheme? If not, then we shouldn't try to guess. url.full should be the full URL, but if we don't have the full URL in the event, or can't reliable build it, then we can't populate this field.

@vera-review-bot

Copy link
Copy Markdown

👀 I have started reviewing the PR

@vera-review-bot

Copy link
Copy Markdown

Vera Review Bot

For the current commit state, I did not find any issues.


🤖 AI-Generated Review | Vera Review Bot | 📚 Knowledge base: integration-skills

⚠️ Automated review — verify suggestions before applying.

@vera-review-bot

Copy link
Copy Markdown

👀 I have started reviewing the PR

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

✅ All changelog entries have the correct PR link.

@vera-review-bot

Copy link
Copy Markdown

Vera Review Bot

For the current commit state, I did not find any issues.


🤖 AI-Generated Review | Vera Review Bot | 📚 Knowledge base: integration-skills

⚠️ Automated review — verify suggestions before applying.

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💚 Build Succeeded

History

cc @robester0403

@mergify

mergify Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request
@robester0403
robester0403 merged commit 1401d47 into elastic:main Jun 29, 2026
9 checks passed
@robester0403
robester0403 deleted the fortinet-fortiproxy-url-parsing-issue branch June 29, 2026 14:23
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Package fortinet_fortiproxy - 1.4.2 containing this change is available at https://epr.elastic.co/package/fortinet_fortiproxy/1.4.2/

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:fortinet_fortiproxy Fortinet FortiProxy Team:Integration-Experience Security Integrations Integration Experience [elastic/integration-experience]

3 participants