Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ping_one: fix handling of potentially null method call receivers #9076

Merged
merged 2 commits into from Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/ping_one/changelog.yml
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "1.13.2"
changes:
- description: Fix ingest pipeline conditional field handling.
type: bugfix
link: https://github.com/elastic/integrations/pull/9076
- version: "1.13.1"
changes:
- description: Changed owners
Expand Down
Expand Up @@ -21,51 +21,57 @@ processors:
value: [iam]
- append:
field: event.category
if: ctx.json?.action?.type?.toLowerCase().contains('created') || ctx.json.action.type.toLowerCase().contains('deleted') || ctx.json.action.type.toLowerCase().contains('updated') || ctx.json.action.type.toLowerCase().contains('access_allowed')
if: >-
ctx.json?.action?.type != null && (
ctx.json.action.type.toLowerCase().contains('created') ||
ctx.json.action.type.toLowerCase().contains('deleted') ||
ctx.json.action.type.toLowerCase().contains('updated') ||
ctx.json.action.type.toLowerCase().contains('access_allowed')
)
value: [configuration]
- append:
field: event.type
if: ctx.json?.action?.type?.toLowerCase().contains('created')
if: ctx.json?.action?.type?.toLowerCase().contains('created') == true
Copy link
Contributor

Choose a reason for hiding this comment

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

One more after .toLowerCase():

ctx.json?.action?.type?.toLowerCase()?.contains('created') == true

Below as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True Thanks.

value: [creation]
- append:
field: event.type
if: ctx.json?.action?.type?.toLowerCase().contains('deleted')
if: ctx.json?.action?.type?.toLowerCase().contains('deleted') == true
value: [deletion]
- append:
field: event.type
if: ctx.json?.action?.type?.toLowerCase().contains('updated')
if: ctx.json?.action?.type?.toLowerCase().contains('updated') == true
value: [change]
- append:
field: event.type
if: ctx.json?.action?.type?.toLowerCase().contains('user')
if: ctx.json?.action?.type?.toLowerCase().contains('user') == true
value: [user]
- append:
field: event.type
if: ctx.json?.action?.type?.toLowerCase().contains('group')
if: ctx.json?.action?.type?.toLowerCase().contains('group') == true
value: [group]
- append:
field: event.type
if: ctx.json?.action?.type?.toLowerCase().contains('allowed')
if: ctx.json?.action?.type?.toLowerCase().contains('allowed') == true
value: [info]
- append:
field: event.type
if: ctx.json?.action?.type?.toLowerCase().contains('denied')
if: ctx.json?.action?.type?.toLowerCase().contains('denied') == true
value: [denied]
- append:
field: event.type
if: ctx.json?.action?.type?.toLowerCase().contains('started')
if: ctx.json?.action?.type?.toLowerCase().contains('started') == true
value: [start]
- append:
field: event.type
if: ctx.json?.action?.type?.toLowerCase().contains('access_allowed')
if: ctx.json?.action?.type?.toLowerCase().contains('access_allowed') == true
value: [access]
- append:
field: event.category
if: ctx.json?.action?.type?.toLowerCase().contains('password.check_succeeded')
if: ctx.json?.action?.type?.toLowerCase().contains('password.check_succeeded') == true
value: [authentication]
- append:
field: event.category
if: ctx.json?.action?.type?.toLowerCase().contains('email')
if: ctx.json?.action?.type?.toLowerCase().contains('email') == true
value: [email]
- set:
field: event.type
Expand Down
2 changes: 1 addition & 1 deletion packages/ping_one/manifest.yml
@@ -1,7 +1,7 @@
format_version: "3.0.0"
name: ping_one
title: PingOne
version: "1.13.1"
version: "1.13.2"
description: Collect logs from PingOne with Elastic-Agent.
type: integration
categories:
Expand Down