Skip to content

[panw] Fix x-fwd-for parsing - #10816

Merged
dwhyrock merged 11 commits into
elastic:mainfrom
dwhyrock:sdh-4933-panw-xfwd-for-update
Aug 20, 2024
Merged

[panw] Fix x-fwd-for parsing#10816
dwhyrock merged 11 commits into
elastic:mainfrom
dwhyrock:sdh-4933-panw-xfwd-for-update

Conversation

@dwhyrock

@dwhyrock dwhyrock commented Aug 19, 2024

Copy link
Copy Markdown
Contributor

Proposed commit message

Moving src/dst user processing to down around the labels processors, and added a rename processor in between. This allows the x-fwd-for processing to now function correctly.

Thanks to @taylor-swanson for figuring out the issue and creating the initial change.

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

  • Should the x_forwarded_for value have x-fwd-for string in it? (e.g., "x_forwarded_for": "x-fwd-for: 10.34.32.4")
    • Answer: no. Added fix to remove that string.

How to test this PR locally

Related issues

Screenshots

Snippets before the change:

+            "panw": {
+                "panos": {
<snip>
+                    "url_idx": "1",
+                    "virtual_sys": "vsys1",
+                    "wildfire": {
+                        "report_id": "0"
+                    }
+                }
+            },
<snip> # notice no x-fwd-for above
+            "source": {
+                "geo": {
+                    "name": "10.0.0.0-10.255.255.255"
+                },
+                "ip": "10.64.217.27",
+                "port": 61736,
+                "user": {
+                    "name": "x-fwd-for: 10.34.32.4"
+                }
+            },

Snippets after the change

+            "panw": {
+                "panos": {
<snip>
+                    "url_idx": "1",
+                    "virtual_sys": "vsys1",
+                    "wildfire": {
+                        "report_id": "0"
+                    },
+                    "x_forwarded_for": "x-fwd-for: 10.34.32.4"
+                }
+            },
<snip>
+            "source": {
+                "geo": {
+                    "name": "10.0.0.0-10.255.255.255"
+                },
+                "ip": "10.64.217.27",
+                "port": 61736
+            },
@andrewkroh andrewkroh added the Integration:panw Palo Alto Next-Gen Firewall label Aug 19, 2024
@dwhyrock
dwhyrock marked this pull request as ready for review August 19, 2024 20:16
@dwhyrock
dwhyrock requested a review from a team as a code owner August 19, 2024 20:16
@pkoutsovasilis pkoutsovasilis added enhancement New feature or request Team:Security-Deployment and Devices DEPRECATED Deployment and Devices Security team [elastic/sec-deployment-and-devices] labels Aug 19, 2024
@elasticmachine

Copy link
Copy Markdown

Pinging @elastic/sec-deployment-and-devices (Team:Security-Deployment and Devices)

@pkoutsovasilis pkoutsovasilis 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.

changelog and manifest updates?

@pkoutsovasilis pkoutsovasilis 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.

LGTM

@elastic-sonarqube

Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
76.6% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

History

cc @dwhyrock

@dwhyrock
dwhyrock merged commit c19bfc9 into elastic:main Aug 20, 2024
@dwhyrock
dwhyrock deleted the sdh-4933-panw-xfwd-for-update branch August 20, 2024 19:14
@elasticmachine

Copy link
Copy Markdown

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

@andrewkroh andrewkroh added bugfix Pull request that fixes a bug issue and removed enhancement New feature or request labels Aug 20, 2024
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 4, 2025
* Apply Taylor's change

* completing taylor's change

* Add logs and expected logs

* Take out the x-fwd-for string

* Update expected logs

* updating to allowed geo IPs

* Add more unique logs

* Adding manifest and changelog updates

* Adding comment to default.yml

* Made changelog description more specific
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 5, 2025
* Apply Taylor's change

* completing taylor's change

* Add logs and expected logs

* Take out the x-fwd-for string

* Update expected logs

* updating to allowed geo IPs

* Add more unique logs

* Adding manifest and changelog updates

* Adding comment to default.yml

* Made changelog description more specific
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:panw Palo Alto Next-Gen Firewall Team:Security-Deployment and Devices DEPRECATED Deployment and Devices Security team [elastic/sec-deployment-and-devices]

5 participants