- Notifications
You must be signed in to change notification settings - Fork 519
[Ti_AbuseCH] - Added support for optional "Auth Key" request header across all data streams #13261
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits Select commit Hold shift + click to select a range
104256a auth key param working in malwarebaazar with system tests, docs updated
ShourieG fe0d7cf added auth key support for all data streams and relevant system tests
ShourieG 321842b resolved merge conflicts
ShourieG 99a83cc updated changelog
ShourieG 996113e addressed Dan's suggestions
ShourieG f270808 addressed Dan's suggestions
ShourieG File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions 19 packages/ti_abusech/_dev/deploy/docker/files/config-threatfox.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions 14 packages/ti_abusech/data_stream/malware/_dev/test/system/test-auth-config.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| input: cel | ||
| service: abusech | ||
| vars: | ||
| logging: | ||
| level: debug | ||
| enable_request_tracer: true | ||
| auth_key: test_auth_key | ||
| data_stream: | ||
| vars: | ||
| url: http://{{Hostname}}:{{Port}}/v1/payloads/recent/ | ||
| preserve_original_event: true | ||
| ioc_expiration_duration: 5d | ||
| assert: | ||
| hit_count: 3 |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| | @@ -14,12 +14,22 @@ resource.ssl: {{ssl}} | |||||||||||||
| resource.timeout: {{http_client_timeout}} | ||||||||||||||
| {{/if}} | ||||||||||||||
| resource.url: {{url}} | ||||||||||||||
| {{#if auth_key}} | ||||||||||||||
| state: | ||||||||||||||
| auth_key: {{auth_key}} | ||||||||||||||
| Comment on lines +18 to +19 Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggested change
| ||||||||||||||
| {{/if}} | ||||||||||||||
| redact: | ||||||||||||||
| fields: ~ | ||||||||||||||
| fields: | ||||||||||||||
| - auth_key | ||||||||||||||
| program: | | ||||||||||||||
| state.with( | ||||||||||||||
| request("GET", state.url).with({ | ||||||||||||||
| "Header":{ | ||||||||||||||
| "Content-Type": ["application/json"], | ||||||||||||||
| ?"Auth-Key": has(state.auth_key) ? | ||||||||||||||
| optional.of([state.auth_key]) | ||||||||||||||
| : | ||||||||||||||
| optional.none(), | ||||||||||||||
| } | ||||||||||||||
| }).as(req, req.do_request().as(resp, | ||||||||||||||
| bytes(resp.Body).decode_json().as(body, { | ||||||||||||||
| | @@ -29,6 +39,7 @@ program: | | |||||||||||||
| "url": state.url | ||||||||||||||
| }) | ||||||||||||||
| )) | ||||||||||||||
| ) | ||||||||||||||
| | ||||||||||||||
| {{#if ioc_expiration_duration}} | ||||||||||||||
| fields_under_root: true | ||||||||||||||
| | ||||||||||||||
12 changes: 12 additions & 0 deletions 12 packages/ti_abusech/data_stream/malwarebazaar/_dev/test/system/test-auth-config.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| input: cel | ||
| service: abusech | ||
| data_stream: | ||
| vars: | ||
| url: http://{{Hostname}}:{{Port}}/api/v1/ | ||
| preserve_original_event: true | ||
| ioc_expiration_duration: 5d | ||
| vars: | ||
| auth_key: test_auth_key | ||
| enable_request_tracer: true | ||
| assert: | ||
| hit_count: 3 |
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
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.
Same comments in the other data streams.