Skip to content

Commit

Permalink
Merge pull request #455 from cisagov/AL-restrict-IPs
Browse files Browse the repository at this point in the history
Restrict DMZ API gateways to Glebe VPN
  • Loading branch information
cduhn17 authored Jul 18, 2024
2 parents 71fb37f + 3abcb61 commit cc0e9f3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions backend/env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ staging:
DOMAIN: ${ssm:/crossfeed/staging/DOMAIN}
FARGATE_SG_ID: ${ssm:/crossfeed/staging/WORKER_SG_ID}
FARGATE_SUBNET_ID: ${ssm:/crossfeed/staging/WORKER_SUBNET_ID}
DMZ_CIDR: ${ssm:/crossfeed/staging/DMZ_CIDR}
FARGATE_MAX_CONCURRENCY: 100
SCHEDULER_ORGS_PER_SCANTASK: 10
FARGATE_CLUSTER_NAME: crossfeed-staging-worker
Expand Down
4 changes: 4 additions & 0 deletions backend/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ provider:
Principal: '*'
Action: execute-api:Invoke
Resource: execute-api:/${self:provider.stage}/*/*
Condition:
IpAddress:
aws:SourceIp:
- ${file(env.yml):${self:provider.stage}.DMZ_CIDR, ''}
logs:
restApi: true
deploymentBucket:
Expand Down
1 change: 1 addition & 0 deletions frontend/env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dev:

staging:
DOMAIN: staging-cd.crossfeed.cyber.dhs.gov
DMZ_CIDR: ${ssm:/crossfeed/staging/DMZ_CIDR}

prod:
DOMAIN: crossfeed.cyber.dhs.gov
Expand Down
6 changes: 5 additions & 1 deletion frontend/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ provider:
- Effect: Allow
Principal: '*'
Action: execute-api:Invoke
Resource: 'execute-api:/${self:provider.stage}/*/*'
Resource: execute-api:/${self:provider.stage}/*/*
Condition:
IpAddress:
aws:SourceIp:
- ${file(env.yml):${self:provider.stage}.DMZ_CIDR, ''}
logs:
restApi: true
deploymentBucket:
Expand Down

0 comments on commit cc0e9f3

Please sign in to comment.