Skip to content

zscaler_zpa: fix handling of multiple remote IPs, and event categorisation#13755

Merged
efd6 merged 1 commit intoelastic:mainfrom
efd6:13754-zscaler_zpa
May 23, 2025
Merged

zscaler_zpa: fix handling of multiple remote IPs, and event categorisation#13755
efd6 merged 1 commit intoelastic:mainfrom
efd6:13754-zscaler_zpa

Conversation

@efd6
Copy link
Contributor

@efd6 efd6 commented May 1, 2025

Proposed commit message

zscaler_zpa: fix handling of multiple remote IPs, and event categorisation

ZScaler appears to sometimes send events with multiple remote IPs. So
split the list an raise client.ip to an array if this is the case. The
Zscaler ZPA documentation does not make clear what the semantics of this
case are, so we bend the ECS a little here.

Also fix handling of event.type and event.category to ensure that they
agree with ECS definitions, and add event.outcome mappings.

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

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Screenshots

@efd6 efd6 added Integration:zscaler_zpa Zscaler Private Access bugfix Pull request that fixes a bug issue Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] labels May 1, 2025
@efd6 efd6 self-assigned this May 1, 2025
…ation

ZScaler appears to sometimes send events with multiple remote IPs. So
split the list an raise client.ip to an array if this is the case. The
Zscaler ZPA documentation does not make clear what the semantics of this
case are, so we bend the ECS a little here.

Also fix handling of event.type and event.category to ensure that they
agree with ECS definitions, and add event.outcome mappings.
@efd6 efd6 force-pushed the 13754-zscaler_zpa branch from a1a6de7 to 1c9eae2 Compare May 1, 2025 20:41
@elasticmachine
Copy link

elasticmachine commented May 1, 2025

💔 Build Failed

Failed CI Steps

History

cc @efd6

@efd6 efd6 marked this pull request as ready for review May 1, 2025 21:19
@efd6 efd6 requested a review from a team as a code owner May 1, 2025 21:19
@elasticmachine
Copy link

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

Comment on lines +263 to +266
- split:
field: client.ip
separator: ', *'
if: ctx.client?.ip instanceof String && ctx.client.ip.contains(',')
Copy link
Contributor

Choose a reason for hiding this comment

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

I think having a list of client.ip/ source.ip will prevent us from using geoip processor on them. Maybe we should find the public IP among the 2 IPs and populate just with it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm following this up to see if there is a known behaviour we can rely on to do this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@StellaFreyju can you provide some insight here? I understand that the first element of the array is the public IP address, but that the second may be somewhat public. I do not think that it is a good idea to do geoip look-ups on both, but doing it on the first element seems fine; users interested in the second (and subsequent) addresses can do look-ups in an @custom pipeline. Does this sound reasonable to you?

@efd6
Copy link
Contributor Author

efd6 commented May 22, 2025

@kcreddy I haven't had a response, so I would like to merge this either as is. PTAL

Copy link
Contributor

@kcreddy kcreddy left a comment

Choose a reason for hiding this comment

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

Sounds good. Thanks!

@efd6 efd6 merged commit 8ec64df into elastic:main May 23, 2025
5 checks passed
@elastic-vault-github-plugin-prod

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

v1v added a commit to v1v/integrations that referenced this pull request May 26, 2025
* main: (42 commits)
  [jamf_pro] Fix `flattened` field types for non-object values (elastic#13985)
  [Netskope Alerts] Add text multi-field to netskope.alerts.breach.description field (elastic#13977)
  zscaler_zia: add strict field template mode for tcp and http_endpoint input data streams (elastic#13904)
  apm: Add config for tail-based sampling discard on write (elastic#13950)
  [CI] Add dev/coverage into backport script (elastic#13987)
  Update configuration updatecli for 8.x snapshot (elastic#13981)
  [Prometheus] Add username, password, and SSL related fields for query dataset (elastic#13969)
  o365: Ignore failures in rename processors for organization fields (elastic#13983)
  aws.firewall: Document ingested log types of AWS Network Firewall (elastic#13978)
  mimecast: resolve field data type conflicts between data streams (elastic#13825)
  [Infoblox NIOS] Handle the parsing of IPv6 address (elastic#13947)
  [Cribl] Fix handling of metric event type (elastic#13930)
  zscaler_zpa: fix handling of multiple remote IPs, and event categorisation (elastic#13755)
  Adding agentless deployment to the sublime security integration (elastic#13963)
  [integration/system] add use_performance_counters in system integration (elastic#13150)
  crowdstrike,m365_defender,microsoft_defender_{cloud,endpoint},sentinel_one: normalise severity handling (elastic#13955)
  [forgerock] Map `forgerock.response.elapsedTime` as a long not a date (elastic#13959)
  github: squelch errors from pagination ends (elastic#13965)
  cisco_secure_endpoint: squelch errors from pagination ends (elastic#13964)
  [Cloud Security] Cloud Asset Inventory:  fixed cloud formation URL (elastic#13971)
  ...
v1v added a commit that referenced this pull request May 26, 2025
* feature/use-google-secrets: (43 commits)
  use -ci account
  [jamf_pro] Fix `flattened` field types for non-object values (#13985)
  [Netskope Alerts] Add text multi-field to netskope.alerts.breach.description field (#13977)
  zscaler_zia: add strict field template mode for tcp and http_endpoint input data streams (#13904)
  apm: Add config for tail-based sampling discard on write (#13950)
  [CI] Add dev/coverage into backport script (#13987)
  Update configuration updatecli for 8.x snapshot (#13981)
  [Prometheus] Add username, password, and SSL related fields for query dataset (#13969)
  o365: Ignore failures in rename processors for organization fields (#13983)
  aws.firewall: Document ingested log types of AWS Network Firewall (#13978)
  mimecast: resolve field data type conflicts between data streams (#13825)
  [Infoblox NIOS] Handle the parsing of IPv6 address (#13947)
  [Cribl] Fix handling of metric event type (#13930)
  zscaler_zpa: fix handling of multiple remote IPs, and event categorisation (#13755)
  Adding agentless deployment to the sublime security integration (#13963)
  [integration/system] add use_performance_counters in system integration (#13150)
  crowdstrike,m365_defender,microsoft_defender_{cloud,endpoint},sentinel_one: normalise severity handling (#13955)
  [forgerock] Map `forgerock.response.elapsedTime` as a long not a date (#13959)
  github: squelch errors from pagination ends (#13965)
  cisco_secure_endpoint: squelch errors from pagination ends (#13964)
  ...
anupratharamachandran pushed a commit to anupratharamachandran/integrations that referenced this pull request Jun 2, 2025
…ation (elastic#13755)

ZScaler appears to sometimes send events with multiple remote IPs. So
split the list an raise client.ip to an array if this is the case. The
Zscaler ZPA documentation does not make clear what the semantics of this
case are, so we bend the ECS a little here.

Also fix handling of event.type and event.category to ensure that they
agree with ECS definitions, and add event.outcome mappings.
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:zscaler_zpa Zscaler Private Access Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Zscaler Private Access]: audit data stream does not tolerate remoteIP lists

3 participants