- Notifications
You must be signed in to change notification settings - Fork 4
MVP saf-cli Lambda Function #2
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
Conversation
Signed-off-by: yarick <yarick@yarick.net>
- added TODO items - paramaterized things that we have Signed-off-by: Aaron Lippold <lippold@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Added simple logging Fixed S3 get/save Signed-off-by: yarick <yarick@yarick.net>
Added winston template to match Lambda CloudWatch format Signed-off-by: yarick <yarick@yarick.net>
- adding logger to our throw/error cases - moved error checking to the top of the process so we did not start down a road that we couldn't go down for no reason - added lagger to the remaining console.log statments - fixed incorrect License reference in package.json - removed all unused commented code from files - removed unused files from project - standardized formatting and linting on files Signed-off-by: Aaron Lippold <lippold@gmail.com>
Signed-off-by: Aaron Lippold <lippold@gmail.com>
Signed-off-by: Aaron Lippold <lippold@gmail.com>
Signed-off-by: Aaron Lippold <lippold@gmail.com>
const HEC_TOKEN = "473b3297-1d88-4740-96ff-e6048e51b785"; | ||
const SPLUNK_SERVER = "splk1.efficacy.online"; |
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.
Might want to remove this and clear git history
const HEC_TOKEN = "473b3297-1d88-4740-96ff-e6048e51b785"; | |
const SPLUNK_SERVER = "splk1.efficacy.online"; | |
const HEC_TOKEN = "YOUR_HEC_TOKEN"; | |
const SPLUNK_SERVER = "YOUR_SPLUNK_SERVER"; |
app.js Outdated
let HDF_FILE = path.resolve("/tmp/", params.Key.toString()); | ||
Body = Body.toString(); | ||
| ||
const command_string = [CLI_COMMAND + ":" + CLI_FUNCTION, "-i", HDF_FILE, "-H", SPLUNK_SERVER, "-t", HEC_TOKEN]; |
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.
The HDF2Splunk mapper is going to be taking a username/password or token in the future once moved to the splunk-sdk library.
Splunk options: mitre/heimdall2@d183b12#diff-19410c8789053ca0d35bbdd8acd403aa1e4165ed4b17d9733d763242817e9694R21-R26
Signed-off-by: yarick <yarick@yarick.net>
# Conflicts: # app.js
app.js Outdated
} | ||
| ||
// TODO: REMOVE ALL THESE COMMENTS | ||
// TODO: Decide is we want to catch undefined saf-cli command groupings https://stackoverflow.com/questions/15201939/jquery-javascript-check-string-for-multiple-substringsa |
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.
I added this check in saf_action
if that helps.
https://github.com/mitre/saf_action/blob/main/index.js#L9
- main | ||
| ||
branches: [ main ] | ||
pull_request: |
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.
Why do you want to draft releases on pull requests?
Signed-off-by: yarick <yarick@yarick.net>
Signed-off-by: yarick <yarick@yarick.net>
Signed-off-by: yarick <yarick@yarick.net>
Closing in favor of #3 Please move your comments and reviews there |
MVP of the
saf-cli
lambda function. The function will supporting reading HDF data out of an s3 bucket and providing those file(s) to the SAF CLI app and then either pushing the result to the saf convert functions end-point and or writting the result to the perscribed s3 target bucket.Items Left To Resolve
AWS Marketplace of Functions
- find out what that means :)