-
Notifications
You must be signed in to change notification settings - Fork 233
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
feature: OpenSearch SIEM for ASEA #853
Conversation
…ronment-accelerator-1 into siem_feature
Question - Can you confirm you append the 'es_loader' S3 Event Notifications on the bucket and do not overwrite any existing notifications? |
Yes. Here's what it looks like:
Note how there's a fetch to get existing notifications and then 'push' a new one into the array. |
src/lib/custom-resources/cdk-opensearch-siem-configure/README.md
Outdated
Show resolved
Hide resolved
…ronment-accelerator-1 into siem_feature
…enable AdvancedSecurty for cognito
UPDATE: THIS PR TO BE REVERTED
|
* initial opensearch cdk work * working os configure * working dashboard * Remove debug statement * removal updates * update for linting * eslint fixes * update sample config * Add artifacts * prettier * eslint * initial opensearch cdk work * working os configure * working dashboard * Remove debug statement * removal updates * update for linting * eslint fixes * update sample config * Add artifacts * prettier * eslint * more eslint * update jest snapshot with latest TransitGateway cloudformation immutable property changes * updated snapshot with log-archive phase 4 (this is the phase that adds s3 notifications) * Update test sample * update verify files with siem config * remove unused folder * opensearch logs * add geoip * remove admin role. use lambda role to bootstrap OpenSearch * configure siem geoip custom resource to bootstrap download * update cdk version number in script file * merge * prettier * update sample config * update sample config * remove unused unauthenticated cognito roles, enable MFA for cognito, enable AdvancedSecurty for cognito * update README Co-authored-by: Brian969 <[email protected]>
|
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
OpenSearch SIEM for ASEA
This pull request adds a new deployment feature that deploys an implementation of https://github.com/aws-samples/siem-on-amazon-opensearch-service.
That project is composed for three main pieces:
This implementation:
it does the following:
Creates roles for OpenSearch
Registers the Service-Linked Role for OpenSearch
Creates a role that will be use by the 'loader' Lambda
Creats an OpenSearch 1.0 cluster with values specified in the above 'siem' config section.
Deploys a Cognito User Pool and Identity Pool
Lambda 'loader' is created
Lambda 'configuration' is created and re-written as a custom cdk-resource
Lambda 'S3Notifications' is created to configure the log-archive buckets (two of them)
Upgraded to a later CDK library that uses the OpenSearch references. The upgrade conversion from Elasticsearch CDK should be avoided
Deploys a Lambda function if the maxmind license is provide. This lambda will download the latest database from maxmind to populate IP/world visualizations in OpenSearch.
The OpenSearch dashboard can be configured by manually uploading the Dashboard zip file from the above project
Configuration Steps
opensearch-config.json
andos-loader.zip
found in the reference-artifacts/siem folder. This folder and filename should align to the S3 key values referenced in the SIEM configuration section. For example:a) configure Client VPN in the Operations account VPC. Create the ClientVPN using the ASEA-Pipeline roll (SCPs block it) with the following configuration parameters
b) Access the RDGW bastion host in the ops account using SSM and RDSH per FAQ1.1.13
Additional Tweaks
In an SEA environment where there is no outbound internet connectivity (example: perimeter firewalls off), HostedZones + Endpoints should handle connectivity to required AWS services. However, in development, it was noticed that sts.amazonaws.com would NOT resolve to an endpoint IP; always a public ip. This can be replicated by creating a VPC lambda function and running a DNS resolver command for sts.amazonaws.com. Even with the sts Hosted Zone and properly configured endpoint. The configuration lambda assume the OpenSearch admin role, but this fails in an environment with no egress internet. As a work around, the lambda will iterate over possible sts options: sts.amazonaws.com, sts.{region}.amazonaws.com, and finally the sts vpc endpoint value from the 'output'. The latter requires the above CfnHostedZone update such that it can be fetched from Outputs. This works and lambda is able to assume role in a private network.This Lambda that configures OpenSearch no longer assumes role, which exposed this issue. The Lambda runs with the 'Admin' OpenSearch role.IAM Asset role creation was updated with improved logic for 'sourceAccount' when specifying an IAM role in the config file.This change was revertedJest Snapshot Update:
There are several TransitGateway properties that have switched from Immutable to now support 'No-interruption' (Mutable). See the following github documentation change and public docs reference. The snap shot update removes the previous immutable fields.
awsdocs/aws-cloudformation-user-guide@dafa014
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgateway.html
New:
Previous:
Considerations