Skip to content

1. Public Facing Workload Configuration Sample(link)

1.1. Overview(link)

This page describes the steps needed to configure a public facing web application that is deployed within a workload AWS Account in the Secure Environment Accelerator (SEA).

The high-level steps are the following:

  1. Create a SSL public certificate in AWS Certificate Manager.
  2. Create a DNS entry for the web application.
  3. Create Application Load Balancer Target Groups for the web application
  4. Create an Application Load Balancer Rule to forward traffic to the Firewalls.
  5. Configure the Firewalls.

The screenshots and steps in this page are specific to the Fortigate Firewalls.

1.2. Perimeter SEA AWS Account(link)

1.2.1. SSL Certificate Configuration(link)

  1. Within the Perimeter SEA AWS Account, navigate to the Certificate Manager service.

  2. Follow the steps to request a new public certificate. This will be used to support https for the web application. Note that the SEA deploys 'example' certificates, but these should not be used at the perimeter. Here's an example showing a wildcard cert.

Certificates

  1. Navigate to the ALBs and select the Load Balancer that will support the incoming requests for the web application. In this example, it will be the 'Public-DevTest-perimeter-alb'.

ALBDevTest

  1. Select the 'Public-DevTest-perimeter-alb' ALB and click the View/edit certificates link button.

ALBSSLConfigure

  1. Click the + button and select the new SSL Certificate. Click Add.

  2. Return back to the ALBs and select the 'Public-DevTest-perimeter-alb' ALB. Select the default HTTPS listener and click Edit

ALBDevTest

  1. Change the Default SSL certificate to the newly created public cert and update the settings.

ALBDefaultSSL


1.2.2. ALB Target Group Configuration(link)

  1. Navigate to the EC2 Load Balancers and view the default Application Load Balancers (ALB).

ALBs

  1. List the ALB Target Groups

ALB Target Groups

These are pairs of targets (one for each firewall) that direct traffic from the perimeter ALB to the firewall. The two pairs were created as part of the default configuration and provide health checks to the shared VPCs. For support a new web application, a new pair will be created. One for each firewall (i.e. one per AZ).

  1. Click the Create target group button. (Note: This will be repeated for each Firewall).

  2. Enter the following parameter values:

    • Target group name: Public-DevTest-SampleApp-azA
    • Protocol: HTTPS
    • Port: (pick an unused port on the Firewall). Example 7006
    • VPC: Perimeter_VPC

ALB New Target Group

  1. When Registering a target, pick the instance that aligns with the Availability Zone (AZ) that is being configured. Example: Firewall*az[A|B]. If creating 'Public-DevTest-SampleApp-azA', then choose Firewall instance 'Firewall*azA'.

ALB New Target Group Register

  1. Ensure that the port value is using the previous entered port value. Click the Include as pending below.

ALB New Target Group Register Instance

  1. Click the Create target group button when ready.

  2. Repeat for the additional firewalls.


1.2.3. ALB Listener Rule Configuration(link)

  1. Create a DNS entry for the web application that resolves to the perimeter ALB being configured. For example: webapplication.mydomain.ca resolves to 'Public-DevTest-perimeter-alb-1616856287.ca-central-1.elb.amazonaws.com'

  2. Navigate to the ALBs and select the 'Public-DevTest-perimeter-alb' ALB. Click the View/edit rules link button.

ALBDevTest

  1. Click the + button to create a new rule. Then click the + Insert Rule button.

ALBNeRule

  1. Configure a match condition on Host header.... enter the value of the DNS entry for the web application.

ALBNeRuleHostHeader

ALBNeRuleHostHeader

  1. Click the checkmark to update it.

  2. Click the + Add action and select Forward to...

ALBNeRuleForwardTo

  1. Configure both Targets using the ones previously created (one per firewall). Adjust for 50% load balanced traffic.

ALBNeRuleForwardToTargetGroup

ALBNeRuleForwardToTargetGroupLB

  1. Click the checkmark to update and then click the Save button.

1.3. Fortigate Firewall Configuration(link)

The following configuration will be executed per Firewall instance (twice with the default SEA configuration).

  1. Log in to the firewall instance.
  2. Switch the Virtual Domain (vdom) to FG-traffic.

FGVdeom

  1. Navigate to Policy & Objects and select Addresses

FGVdeom

  1. Create a new entry using the following parameter values:

  2. Name: Dev1-SampleWebApplication-ALB-FQDN

  3. Type: FQDN
  4. FQDN: (use the DNS value of the internal load balancer in front of the web application)
  5. Interface: tgw-vpn1

FGNewAddress

  1. After saving the entry, refresh the Address grid and verify that the row colour is white.

FGAddress2

  1. Navigate to Policy & Objects and select Virtual IPs

FGVIPs

  1. Make note of the used ip address in the Details column. In the example above “100.96.250.22”.

  2. Click the CLI command icon in the top right corner. Note that the following must be done using the CLI.

FGVIPsCLI

FGVIPsCLI1

  1. Update the following script template replacing values for the following: name, extip, mapped-addr, extport
config firewall vip
edit "Dev1-SampleWebApplication-ALB"
        set type fqdn
        set extip 100.96.250.22
        set extintf "port1"
        set portforward enable
        set mapped-addr "Dev1-SampleWebApplication-ALB-FQDN"
        set extport 7006
        set mappedport 443
    next
end

FGVIPsCLI2

  1. Returning back to the UI interface shows the new entry.

FGVIPsCLI3

  1. Navigate to Policy & Objects and select IPv4 Policy and expand public (port1)

FGIPv4Policy1

  1. Locate the desired policy (ex: Dev-Test #8 in the example below). Right-click and click Edit.

FGIPv4Policy2

  1. Locate the Destination field entry and click the + button.

FGIPv4Policy3

  1. Locate the newly created VirtualIP entry (ex: Dev1-SampleWbApplication-ALB) and save the changes. NOTE: The entry is NOT the Address/FQDN entry.

FGIPv4Policy4

  1. After refreshing the page, the row background should be white, and the new destination is visible.

FGIPv4Policy5