-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
x-pack/filebeat/input/httpjson: Add hexDecode function #31886
Conversation
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
Can you provide an example template showing how this will be used in that context. |
Sure, we are trying to use it in that context as follows: def sign(key, msg):
return hmac.new(key, msg.encode("utf-8"), hashlib.sha256).digest()
def getSignatureKey(key, dateStamp, regionName, serviceName):
kDate = sign(("AWS4" + key).encode("utf-8"), dateStamp)
kRegion = sign(kDate, regionName)
kService = sign(kRegion, serviceName)
kSigning = sign(kService, "aws4_request")
return kSigning Example template:
|
This pull request is now in conflicts. Could you fix it? 🙏
|
…tic/beats into httpjson_hex_decode
9a90aeb
to
324642d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
* Add hexDecode function to enhance httpjson * Add CHANGELOG.next.asciidoc entry * Update documentation to include example * Conditionally return empty string in case of error
What does this PR do?
This adds template helper function for decoding hexadecimal string, output will be in bytes representation.
Why is it important?
This feature is needed for authentication with some APIs. For example, https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html for the
AWS Security Hub
integration package.Checklist
- [ ] I have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.