[AWS] Add the Security Hub data streams - #3553
Merged
Merged
Conversation
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
💚 CLA has been signed
Add the securityhub data streams25b0896faf7157to25b0896CompareUh oh!
There was an error while loading. Please reload this page.
💚 Build Succeeded
Expand to view the summary
Build stats
Start Time: 2022-08-15T20:55:20.750+0000
Duration: 36 min 26 sec
Test stats 🧪
🤖 GitHub comments
To re-run your PR in the CI, just comment with:
/test: Re-trigger the build.Merge branch 'main' into aws-security-hub134563cUpdate the dashboard version to resolve CI failure6360da5Pinging @elastic/security-external-integrations (Team:Security-External Integrations)
Uh oh!
There was an error while loading. Please reload this page.
🌐 Coverage report
covered/total)13/13)13/14)13/14)202/240)5190/5424)0/0)Uh oh!
There was an error while loading. Please reload this page.
It seems like one panel on the dashboard is using a non-existing field name (maybe it got renamed):

Also, is there a special reason most of the "event distribution" charts are pies, but some of them are bar charts?
As there are a lot of similar panels and the dashboard gets pretty long, would it make sense to split it up into multiple dashboards and link it up via a markdown visualization so the user can "select" the charts they are interested in instead of scrolling through a long dashboard? This really depends on how it's meant to be used though.
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.
There are multiple calls to
nowin here that need to match the already setX-Amz-Dateheader down to the second. This is a race condition. Instead of callingformatDate now "20060102T150405Z"twice, can you replace that with an access to the header value? Like(index .header "X-Amz-Date")assuming the header map is available in this context.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.
@marc-gr @P1llus Have you come across this type of issue before? I was thinking it would useful to have a "now"-like function that returns the same time for all invocations within the context of a given request. This would allow all "now"s used in a request to be the same.
Or another option would to provide a generic scratch pad where you can store the current time once and then reference it later. A similar concept is used in consul-template https://github.com/hashicorp/consul-template/blob/main/docs/templating-language.md#scratch. The idea would be like
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.
This does not fully fix the problem but it does reduce the number of
nowinvocations to one (credit to @efd6). You can declare variable in the template then use the variable instead of callingnow. Like[[$now := now]]then replace thenowcalls with$now.Uh oh!
There was an error while loading. Please reload this page.
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.
Do we have any documentation for this?
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.
Assuming by "this" you mean declaring variables in templates, then you can look at https://pkg.go.dev/text/template#hdr-Variables. Variable declarations in templates is something built in to Go text/template.
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.
Leaving this comment here because it's close to the
kibana.version. What are the Agent version requirements? Are there newly introduced httpjson template functions required for this?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.
Yes newly introduced httpjson template functions is required for this. So we have mentioned it in Readme that 8.4.0 version will be required.
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.
It looks like this did not happen.
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.
For reviewers, I formatted this for to help make sense of it.
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 think this needs a system test so that we can test indexing. With only pipeline tests we can't catch various mapping issues.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Update as per review commentsc4164d7Merge branch 'main' into aws-security-hub28c8fb9Update the dashboard version to resolve CI failure822b7b9/test
Add system testab4528fMerge branch 'elastic:main' into aws-security-hubf539b87Uh oh!
There was an error while loading. Please reload this page.
@andrewkroh We are facing below issue when we are updating version to 8.3.0

So can we do the changes in Redshift data stream?
Update system test with new logs and certificate77407a6Let's back out the 8.3.0 ECS change and handle the upgrade separately as to not mix the redshift updates with the security hub additions.
Skip System test and Update Data collectiond9714daupdate manifesteb06e5b/test
9a28dd2toeb06e5bCompareMerge branch 'main' into aws-security-hubfa8777cAdd on_failure in date, convert and uri_parts processord0c1e24Merge branch 'main' into aws-security-hubec19418Merge branch 'main' into aws-security-hubef34c25Merge branch 'main' into aws-security-hub3f8fb39Merge branch 'main' into aws-security-hub48435d4Uh oh!
There was an error while loading. Please reload this page.
@elastic/obs-cloud-monitoring, can you please take a look at this PR? As a codeowner for aws you are a required reviewer.
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.
looks good to me
Merge branch 'main' into aws-security-hub35d5695Changed version to 1.21.0 to resolve conflicts9fed399e18a067into elastic:main[AWS] Add the Security Hub data streams (elastic#3553)242403f