[zscaler_zia] In web v8, use b64 fields to avoid encoding issues - #10855
Merged
Conversation
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
kcreddy
approved these changes
Aug 23, 2024
🚀 Benchmarks reportTo see the full report comment with |
💚 Build Succeeded
History
|
|
|
Package zscaler_zia - 3.2.1 containing this change is available at https://epr.elastic.co/search?package=zscaler_zia |
4 tasks
kcreddy
added a commit
that referenced
this pull request
Aug 28, 2024
…gs (#10874) Remove `department` field and fix parsing errors in web logs. The `department` value is already being ingested from `dept` field. This PR removes the hex-encoded `department` field in favour of `dept` due to noticed improper hex-encoding in fields prefixed with `e` [here](#10855 (comment)). Remove `urldecode` processor on parsing urls causing parsing errors. The `b64url` field is already being decoded by `script` processor. Also adds `on_failure` clause on `urldecode` processors to continue pipeline execution to prevent parsing errors on hex-encoded values to stop running rest of the pipeline.
harnish-crest-data
pushed a commit
to chavdaharnish/integrations
that referenced
this pull request
Feb 4, 2025
…stic#10855) In the web data stream, the v7 response format requested the hex-encoded fields `eurl`, `eurlpath`, `ereferer`, and `erefererpath`. Although those fields have non-printable characters encoded, they aren't fully URL-encoded (e.g. they don't encode `%`), and they may still include characters that can break JSON (including `"`). URLs and their paths sometimes include characters that break the v7 processing, so the following changes have been made in the v8 response format and pipeline. We switch from `eurl` to `b64url` and from `ereferer` to `b64referer`. We no longer request the `eurlpath` and `erefererpath` fields. They have no base64-encoded equivalents. Paths and query strings are present in the URL fields. From the output we remove the `zscaler_zia.web.url.path` and `zscaler_zia.web.referer.path` fields. However, use of the `uri_parts` processor to populate `url.path` and other `url.*` fields remains intact. The ingest pipeline will tolerate absent fields, so the updated package will accept any v7 data that isn't broken by problematic characters and simply skip population of url/path fields. A new `"version":"v8"` field is inserted at the start of the response format to aid future debugging. No validation or use of that field has been added to the ingest pipeline.
harnish-crest-data
pushed a commit
to chavdaharnish/integrations
that referenced
this pull request
Feb 4, 2025
…gs (elastic#10874) Remove `department` field and fix parsing errors in web logs. The `department` value is already being ingested from `dept` field. This PR removes the hex-encoded `department` field in favour of `dept` due to noticed improper hex-encoding in fields prefixed with `e` [here](elastic#10855 (comment)). Remove `urldecode` processor on parsing urls causing parsing errors. The `b64url` field is already being decoded by `script` processor. Also adds `on_failure` clause on `urldecode` processors to continue pipeline execution to prevent parsing errors on hex-encoded values to stop running rest of the pipeline.
harnish-crest-data
pushed a commit
to chavdaharnish/integrations
that referenced
this pull request
Feb 5, 2025
…stic#10855) In the web data stream, the v7 response format requested the hex-encoded fields `eurl`, `eurlpath`, `ereferer`, and `erefererpath`. Although those fields have non-printable characters encoded, they aren't fully URL-encoded (e.g. they don't encode `%`), and they may still include characters that can break JSON (including `"`). URLs and their paths sometimes include characters that break the v7 processing, so the following changes have been made in the v8 response format and pipeline. We switch from `eurl` to `b64url` and from `ereferer` to `b64referer`. We no longer request the `eurlpath` and `erefererpath` fields. They have no base64-encoded equivalents. Paths and query strings are present in the URL fields. From the output we remove the `zscaler_zia.web.url.path` and `zscaler_zia.web.referer.path` fields. However, use of the `uri_parts` processor to populate `url.path` and other `url.*` fields remains intact. The ingest pipeline will tolerate absent fields, so the updated package will accept any v7 data that isn't broken by problematic characters and simply skip population of url/path fields. A new `"version":"v8"` field is inserted at the start of the response format to aid future debugging. No validation or use of that field has been added to the ingest pipeline.
harnish-crest-data
pushed a commit
to chavdaharnish/integrations
that referenced
this pull request
Feb 5, 2025
…gs (elastic#10874) Remove `department` field and fix parsing errors in web logs. The `department` value is already being ingested from `dept` field. This PR removes the hex-encoded `department` field in favour of `dept` due to noticed improper hex-encoding in fields prefixed with `e` [here](elastic#10855 (comment)). Remove `urldecode` processor on parsing urls causing parsing errors. The `b64url` field is already being decoded by `script` processor. Also adds `on_failure` clause on `urldecode` processors to continue pipeline execution to prevent parsing errors on hex-encoded values to stop running rest of the pipeline.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Proposed commit message
Checklist
changelog.ymlfile.Review tips
The following diff compares pretty-printed versions of the v7 and v8 formats:
You can generate diffs of the the pipeline test files in-pretty printed form as follows, from the package directory:
Note that in one example, I combined a URL value and path in the b64 version, since it seems that URL fields do have the full URL, not only the base.
I did a non-strict URL-decode and Base64 encode on the old values using this CyberChef recipe.