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

[filebeat][httpjson] Add support for setting hash in request header. #31613

Closed
vinit-chauhan opened this issue May 12, 2022 · 1 comment · Fixed by #31630
Closed

[filebeat][httpjson] Add support for setting hash in request header. #31613

vinit-chauhan opened this issue May 12, 2022 · 1 comment · Fixed by #31630
Assignees

Comments

@vinit-chauhan
Copy link
Contributor

vinit-chauhan commented May 12, 2022

Describe the enhancement:
This issue here is to request support for adding the SHA256 hash of given strings and set it in the request header the current httpjson input of filebeat.

We need a function in the value template to generate the SHA256 digest of a given list of strings. Moreover, the function can be a generic hash function that can support different types of hashes for better compatibility with other APIs.

- type: httpjson
  request.transforms:
    - set:
        target: header.Authorization
        value: 'Basic [[ hash "sha256" "string-1" "string-2" ]]'

Describe a specific use case for the enhancement or feature:
Here's a reference link for generating a digest for AWS Signature Version 4,
https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label May 12, 2022
@vinit-chauhan vinit-chauhan changed the title [httpjson] [filebeat][httpjson] Add support for setting hash in request header. May 12, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants