Skip to content

Sdh4854 panw username parsing expansion - #10456

Merged
jrmolin merged 9 commits into
elastic:mainfrom
jrmolin:sdh4854-panw_username_parsing
Jul 15, 2024
Merged

Sdh4854 panw username parsing expansion#10456
jrmolin merged 9 commits into
elastic:mainfrom
jrmolin:sdh4854-panw_username_parsing

Conversation

@jrmolin

@jrmolin jrmolin commented Jul 11, 2024

Copy link
Copy Markdown
Contributor

Label: Bug

Proposed commit message

[panw] Add a catch-all pattern for srcuser/dstuser for the Panorama app

  • Customer getting parsing errors for some srcuser data.
  • Stopped validating the field, because it was determined by the team that it is unnecessary.
  • Added a sample from the customer.
  • Verified no test failures.

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

  • [ ]

How to test this PR locally

cd packages/panw
elastic-package test

Related issues

  • Related to SDH from sdh-beats repo
jrmolin added 4 commits June 27, 2024 13:41
- Panorama App allows more username flexibility than the grok patterns supported.
- Add a catch-all pattern as a fall-through.
- Add sample data and ensure tests pass.
@jrmolin jrmolin added the bugfix Pull request that fixes a bug issue label Jul 11, 2024
@jrmolin
jrmolin requested a review from a team as a code owner July 11, 2024 16:36
@elasticmachine

Copy link
Copy Markdown

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

- '^%{PATRUNKATEDHOSTNAME:source.user.domain}\\%{USERNAME:source.user.name}$'
- '^%{PATRUNKATEDHOSTNAME:source.user.domain}\\\\%{USERNAME:source.user.name}$'
- '^%{USERNAME:source.user.name}@%{PATRUNKATEDHOSTNAME:source.user.domain}$'
- '^%{USERNAME:source.user.name}$'

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.

Suggested change
- '^%{USERNAME:source.user.name}$'

I guess there's no advantage to keeping the USERNAME pattern, since the content will be captured by the GREEDYDATA pattern anyways if it fails.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a great catch. I'll remove it.

@taylor-swanson taylor-swanson added Integration:panw Palo Alto Next-Gen Firewall Team:Security-Deployment and Devices DEPRECATED Deployment and Devices Security team [elastic/sec-deployment-and-devices] labels Jul 12, 2024
@elasticmachine

Copy link
Copy Markdown

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

- '^%{USERNAME:destination.user.name}@%{PATRUNKATEDHOSTNAME:destination.user.domain}$'
- '^%{USERNAME:destination.user.name}$'
- '^%{GREEDYDATA:destination.user.name}$'
pattern_definitions:

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.

Add a tag to this processor, too.

Comment on lines 126 to 128
- '^%{PATRUNKATEDHOSTNAME:destination.user.domain}\\%{USERNAME:destination.user.name}$'
- '^%{PATRUNKATEDHOSTNAME:destination.user.domain}\\\\%{USERNAME:destination.user.name}$'
- '^%{USERNAME:destination.user.name}@%{PATRUNKATEDHOSTNAME:destination.user.domain}$'

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 still not thrilled about these patterns using the complicated pattern definitions, but I suppose we found a solution that doesn't need to involve touching these other patterns.

@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

History

@jrmolin
jrmolin merged commit cf4fd90 into elastic:main Jul 15, 2024
@elasticmachine

Copy link
Copy Markdown

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

@jrmolin
jrmolin deleted the sdh4854-panw_username_parsing branch July 22, 2024 09:27
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]

4 participants