Skip to content

Commit e3110a8

Browse files
OpenSearch SIEM for ASEA Addon (#915)
* opensiem addon initial import * prettier * update build script * update readme * update files * opensiem addon initial import * prettier * update build script * update readme * update files * Tweak documentation * update SIEM solution version * prettier * update SIEM readme * remove dashboard.zip * add the via-cwl true to the lambda processor config Co-authored-by: Brian969 <56414362+Brian969@users.noreply.github.com>
1 parent 5b85291 commit e3110a8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+28165
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules
2+
dist
3+
cdk.out
4+
# TODO Add ESLint for the UI project at one point, there are too many changes to do right now
5+
src/ui/*
6+
reference-artifacts
7+
deployment
8+
.eslintrc.js
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
*.js
2+
!jest.config.js
3+
4+
node_modules
5+
6+
# CDK asset staging directory
7+
.cdk.staging
8+
cdk.out
9+
10+
config/license.txt
11+
**/dist
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*.ts
2+
!*.d.ts
3+
4+
# CDK asset staging directory
5+
.cdk.staging
6+
cdk.out
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"tabWidth": 2,
3+
"printWidth": 120,
4+
"singleQuote": true,
5+
"trailingComma": "all",
6+
"arrowParens": "avoid"
7+
}

reference-artifacts/Add-ons/opensiem/README.md

Lines changed: 389 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"operationsAccountId": "----- REPLACE -----",
3+
"logArchiveAccountId": "----- REPLACE -----",
4+
"vpcId": "----- REPLACE -----",
5+
"region": "ca-central-1",
6+
"s3LogBuckets": [
7+
"asea-logarchive-phase0-aescacentral1------ REPLACE -----",
8+
"asea-logarchive-phase0-cacentral1------ REPLACE -----"
9+
],
10+
"securityGroups": [
11+
{
12+
"name": "OpenSearch-SIEM-SG",
13+
"inboundRules": [
14+
{
15+
"description": "Allow Traffic Inbound",
16+
"tcpPorts": [
17+
443
18+
],
19+
"source": [
20+
"10.0.0.0/8",
21+
"100.96.252.0/23",
22+
"100.96.250.0/23"
23+
]
24+
}
25+
],
26+
"outboundRules": [
27+
{
28+
"description": "All Outbound",
29+
"type": [
30+
"ALL"
31+
],
32+
"source": [
33+
"0.0.0.0/0"
34+
]
35+
}
36+
]
37+
}
38+
],
39+
"appSubnets": [
40+
"subnet------ REPLACE -----",
41+
"subnet------ REPLACE -----"
42+
],
43+
"lambdaLogProcessingRoleArn": "arn:aws:iam::----- REPLACE -----:role/SIEM-Lambda-Processor",
44+
"cognitoDomainPrefix": "asea-siem------ REPLACE -----",
45+
"openSearchDomainName": "siem",
46+
"openSearchInstanceTypeMainNodes": "c6g.xlarge.search",
47+
"openSearchInstanceTypeDataNodes": "r6g.xlarge.search",
48+
"openSearchCapacityMainNodes": 3,
49+
"openSearchCapacityDataNodes": 4,
50+
"openSearchVolumeSize": 100,
51+
"openSearchConfiguration": "opensearch-config.json",
52+
"maxmindLicense": "license.txt",
53+
"siemVersion": "v2.6.1a"
54+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/usr/bin/env node
2+
3+
/**
4+
* Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
7+
* with the License. A copy of the License is located at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
12+
* OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
13+
* and limitations under the License.
14+
*/
15+
16+
import 'source-map-support/register';
17+
import * as cdk from 'aws-cdk-lib';
18+
import { OpenSearchSiemStack } from '../lib/opensearch-siem-stack';
19+
import { OpenSearchSiemS3NotificationsStack } from '../lib/opensearch-siem-s3-notifications-stack';
20+
import * as sc from '../lib/siem-config';
21+
22+
sc.loadSiemConfig().then(siemConfig => {
23+
console.log(siemConfig);
24+
25+
const app = new cdk.App();
26+
27+
new OpenSearchSiemStack(app, 'OpenSearchSiemStack', {
28+
provisionServiceLinkedRole: false,
29+
siemConfig,
30+
env: {
31+
account: siemConfig.operationsAccountId,
32+
region: siemConfig.region,
33+
},
34+
tags: {
35+
Application: 'OpenSearch SIEM',
36+
},
37+
});
38+
39+
new OpenSearchSiemS3NotificationsStack(app, 'OpenSearchSiemS3NotificationsStack', {
40+
siemConfig,
41+
env: {
42+
account: siemConfig.logArchiveAccountId,
43+
region: siemConfig.region,
44+
},
45+
tags: {
46+
Application: 'OpenSearch SIEM',
47+
},
48+
});
49+
});
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"app": "npx ts-node --prefer-ts-exts bin/opensearch-siem.ts",
3+
"watch": {
4+
"include": [
5+
"**"
6+
],
7+
"exclude": [
8+
"README.md",
9+
"cdk*.json",
10+
"**/*.d.ts",
11+
"**/*.js",
12+
"tsconfig.json",
13+
"package*.json",
14+
"yarn.lock",
15+
"node_modules",
16+
"test"
17+
]
18+
},
19+
"context": {
20+
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
21+
"@aws-cdk/core:stackRelativeExports": true,
22+
"@aws-cdk/aws-rds:lowercaseDbIdentifier": true,
23+
"@aws-cdk/aws-lambda:recognizeVersionProps": true,
24+
"@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021": true,
25+
"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true,
26+
"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true,
27+
"@aws-cdk/core:target-partitions": [
28+
"aws",
29+
"aws-cn"
30+
]
31+
}
32+
}

0 commit comments

Comments
 (0)