Skip to content

Commit fa82f17

Browse files
committed
remove api key
1 parent 27821a3 commit fa82f17

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

modules/Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ PARAM_NAME_SUFFIX ?= test
88
PARAM_IS_ORGANIZATIONAL ?= false
99
PARAM_EXTERNAL_ID ?= test
1010
PARAM_TRUSTED_IDENTITY ?= arn:aws:iam:::role/$(PARAM_NAME_SUFFIX)
11-
PARAM_TARGET_EVENT_BUS_ARN ?= arn:aws:events:us-east-1::event-bus/default
11+
PARAM_API_KEY ?= <your_api_key>
12+
PARAM_INGESTION_URL ?= https://app-staging.sysdigcloud.com/api/cloudingestion/webhooks/eventbridge/v1/64616366-3130-6163-3665-346636653537
13+
PARAM_RATE_LIMIT ?= 300
1214
PARAM_BUCKET_ARN ?= arn:aws:s3:::cloudtrail-$(PARAM_NAME_SUFFIX)
1315
PARAM_REGIONS ?= us-east-1
1416
PARAM_LAMBDA_SCANNING_ENABLED ?= true
@@ -64,7 +66,9 @@ deploy:
6466
"ExternalID=$(PARAM_EXTERNAL_ID)" \
6567
"TrustedIdentity=$(PARAM_TRUSTED_IDENTITY)" \
6668
"Regions=$(PARAM_REGIONS)" \
67-
"TargetEventBusARN=$(PARAM_TARGET_EVENT_BUS_ARN)" \
69+
"ApiKey=$(PARAM_API_KEY)" \
70+
"IngestionUrl=$(PARAM_INGESTION_URL)" \
71+
"RateLimit=$(PARAM_RATE_LIMIT)" \
6872
"IsOrganizational=$(PARAM_IS_ORGANIZATIONAL)" \
6973
"OrganizationalUnitIDs=$(PARAM_ORGANIZATIONAL_UNIT_IDS)" \
7074
"Partition=${PARAM_PARTITION}" \
@@ -125,5 +129,3 @@ clean:
125129
aws cloudformation delete-stack --stack-name $(STACK_NAME)-LogIngestion-S3-$(PARAM_NAME_SUFFIX)
126130
aws cloudformation delete-stack --stack-name $(STACK_NAME)-VolumeAccess-$(PARAM_NAME_SUFFIX)
127131
aws cloudformation delete-stack --stack-name $(STACK_NAME)-VMWorkloadScanning-$(PARAM_NAME_SUFFIX)
128-
129-

modules/log_ingestion.events.cft.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ Resources:
261261
Action:
262262
- "events:InvokeApiDestination"
263263
Resource:
264-
- !Sub "arn:aws:events:*:*:api-destination/sysdig-secure-events-${NameSuffix}-destination/*"
264+
- !Sub "arn:${Partition}:events:*:*:api-destination/sysdig-secure-events-${NameSuffix}-destination/*"
265265
- Effect: Allow
266266
Action:
267267
- "events:DescribeRule"
@@ -374,13 +374,13 @@ Resources:
374374
Type: AWS::Events::Rule
375375
Properties:
376376
Name: !Sub ${Name}
377-
Description: Capture all CloudTrail events
378-
EventPattern: !Ref EventBridgeEventPattern
379-
State: !Ref EventBridgeState
377+
Description: Forwards events to Sysdig via API Destination
378+
EventPattern: !Ref RuleEventPattern
379+
State: !Ref RuleState
380380
Targets:
381381
- Id: !Sub ${Name}
382382
Arn: !GetAtt EventBridgeApiDestination.Arn
383-
RoleArn: !Sub "arn:aws:iam::${AWS::AccountId}:role/${Name}"
383+
RoleArn: !Sub "arn:${Partition}:iam::${AWS::AccountId}:role/${Name}"
384384
OrganizationRoleStackSet:
385385
Type: AWS::CloudFormation::StackSet
386386
Condition: IsOrganizational
@@ -495,14 +495,14 @@ Resources:
495495
Action:
496496
- "events:InvokeApiDestination"
497497
Resource:
498-
- !Sub "arn:aws:events:*:*:api-destination/${EventBridgeRoleName}-destination/*"
498+
- !Sub "arn:${Partition}:events:*:*:api-destination/${Name}-destination/*"
499499
- Sid: "CloudTrailEventRuleAccess"
500500
Effect: Allow
501501
Action:
502502
- "events:DescribeRule"
503503
- "events:ListTargetsByRule"
504504
Resource:
505-
- !Sub "arn:aws:events:*:*:rule/${EventBridgeRoleName}"
505+
- !Sub "arn:${Partition}:events:*:*:rule/${Name}"
506506
- Sid: "ValidationAccess"
507507
Effect: Allow
508508
Action:
@@ -627,15 +627,15 @@ Resources:
627627
Type: AWS::Events::Rule
628628
Properties:
629629
Name: !Ref Name
630-
Description: Capture all CloudTrail events for Sysdig Secure
631-
EventPattern: !Ref EventBridgeEventPattern
632-
State: !Ref EventBridgeState
630+
Description: Forwards events to Sysdig via API Destination for Sysdig Secure
631+
EventPattern: !Ref RuleEventPattern
632+
State: !Ref RuleState
633633
Targets:
634634
- Id: !Ref Name
635635
Arn: !GetAtt EventBridgeApiDestination.Arn
636-
RoleArn: !Sub "arn:aws:iam::${AWS::AccountId}:role/${Name}"
636+
RoleArn: !Sub "arn:${Partition}:iam::${AWS::AccountId}:role/${Name}"
637637
Outputs:
638638
EventBridgeRoleARN:
639639
Description: Sysdig Secure EventBridge Role ARN
640640
Value:
641-
Fn::Sub: ${EventBridgeRole.Arn}
641+
Fn::Sub: ${EventBridgeRole.Arn}

0 commit comments

Comments
 (0)