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

[Cortex XDR] Add support for Advanced security level #5244

Merged
merged 1 commit into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/panw_cortex_xdr/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "1.7.0"
changes:
- description: Add support for Advanced security level
type: enhancement
link: https://github.com/elastic/integrations/pull/5244
- version: "1.6.0"
changes:
- description: Update package to ECS 8.6.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,21 @@ request.rate_limit:
remaining: '[[.last_response.header.Get "X-Rate-Limit-Remaining"]]'
reset: '[[(parseDate (.last_response.header.Get "X-Rate-Limit-Reset")).Unix]]'
request.transforms:
{{#if advanced_sec_level }}
- set:
target: header.x-xdr-timestamp
value: '[[ mul (add (now (parseDuration "-0s")).Unix) 1000 ]]'
- set:
target: header.x-xdr-nonce
value: '[[ hash "sha256" uuid ]]'
- set:
target: header.Authorization
value: '[[ hash "sha256" "{{api_token}}" (.header.Get "x-xdr-nonce") (.header.Get "x-xdr-timestamp") ]]'
{{else}}
- set:
target: header.Authorization
value: {{api_token}}
{{/if}}
- set:
target: header.x-xdr-auth-id
value: {{token_id}}
Expand Down
8 changes: 8 additions & 0 deletions packages/panw_cortex_xdr/data_stream/alerts/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ streams:
show_user: true
default: 1
description: The token ID related to the above API token
- name: advanced_sec_level
type: bool
title: Advanced security level
multi: false
required: false
show_user: true
description: Whether the API tokeny was issued with an 'Advanced' security level.
nuno-andre marked this conversation as resolved.
Show resolved Hide resolved
default: false
- name: request_timeout
type: text
title: HTTP Client Timeout
Expand Down
2 changes: 1 addition & 1 deletion packages/panw_cortex_xdr/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: panw_cortex_xdr
title: Palo Alto Cortex XDR
version: "1.6.0"
version: 1.7.0
release: ga
description: Collect logs from Palo Alto Cortex XDR with Elastic Agent.
type: integration
Expand Down