You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lab: Protecting AWS Hosted Web Application with F5 Distributed Cloud WAF
Lab 1 will focus on the deployment and security of an existing AWS hosted application using F5
Distributed Cloud Platform and Services. This lab will be deployed in a SaaS only configuration
with no on-premises (public or private cloud) elements. All configurations will be made via
the F5 Distributed Cloud Console and within the F5 Distributed Cloud Global Network services architecture.
The protected application is an AWS Hosted application utilizing Amazon's Elastic Kubernetes Services (EKS)
https://aws.amazon.com/eks/. This managed container service, alllows us to run and scale Kubernetes based
applications wherever EKS is running.
For the tasks that follow, you should have already noted your individual namespace. If you
failed to note it, return to the Introduction section of this lab, follow the instructions
provided and note your namespace accordingly. The Delegated Domain and the F5 Distributed Cloud
Tenant are listed below for your convenience as they will be the same for all lab attendees.
Following the tasks in the prior Introduction Section, you should now be able to access the
F5 Distributed Cloud Console, having set your Work Domain Roles and Skill levels. If you have not
done so already, please login to your tenant for this lab and proceed to Task 1.
Task 1: Configure Load Balancer and Origin Pool
The following steps will allow you to deploy and advertise a globally available application. These
steps will define an application, register its DNS and assign a target as an origin.
Following the Introduction section instructions, you should now be in the Load
Balancers configuration window. If for some reason you are not in the Load
Balancers window, use the Select Service in the left-hand navigation, and click
Load Balancers as shown in the Introduction section, Task 2, Step 9.
In the left-hand navigation expand Manage and click Load Balancers > HTTP Load
Balancers
In the resulting screen click the Add HTTP Load Balancer in the graphic as shown.
Note
You have defaulted to your specific namespace as that is the only namespace to which you
have administrative access.
Using the left-hand navigation and in the sections as shown, enter the following
data. Values where <namespace> is required, use the name of your given namespace.
Metadata:Name ID:<namespace>-lb
Basic Configuration: List of Domains:<namespace>.lab-sec.f5demos.com
Basic Configuration: Select Type of Load Balancer:HTTP
Basic Configuration: Automatically Manage DNS Records:(Check the checkbox)
Basic Configuration: HTTP Port:80
In the current window's left-hand navigation, click Default Origin Servers. Next,
click Add Item within the Origin Pools section of Default Origin Servers.
In the resulting window, use the drop down as shown and click Create new Origin Pool.
In the resulting window, enter <namespace>-pool in the Name field and click
Add Item under Basic Configuration: Origin Servers
In the resulting window, Public DNS Name of Origin Server should be selected for
Select Type of Origin Server.
For DNS Name enter the following hostname:
demo-app.amer.myedgedemo.com and then click Add Item
Note
This is targeting the AWS hosted EKS where our containerized application is running.
While we are targeing the public DNS name, we could within design options also target
the EKS resources by service name using a Mesh node within the EKS Cluster.
After returning to the prior window, make sure Port: under Basic Configuration
is configured for 80.
Leave all other values as shown while scrolling to the bottom and click, Continue.
After returning to the next window and confirming the content, click Add Item.
Task 2: Configure WAF Policy on the Load Balancer
The following steps will guide you through adding a Web Application Firewall (WAF) Policy.
These steps will demonstrate various aspects of the configuration.
Continuing in the Security Configuration section, click on the Select Web
Application Firewall (WAF Config) and select App Firewall.
In the resulting App Firewall drop down select Create new App Firewall.
Note
The "shared/base-appfw" policy is in the "shared namespace" which can be applied to
multiple Load Balancer configurations across namespaces, reducing policy sprawl.
In the resulting window's Metadata section enter <namespace>-appfw for the
Name.
Under Enforcement Mode, change the mode to Blocking.
In the Detection Settings section, click the Security Policy dropdown.
Select Custom from the dropdown menu. Additional configurations will become available.
In the expanded configuration, use the dropdown for Signature Selection by Accuracy
and select High, Medium, and Low.
Leaving all other values as default, scroll to the bottom and click Continue.
In the resulting HTTP Load Balancer window, scroll to the Advanced Configuration
section and note the Where to Advertise the VIP setting.
Note
The above selection controls how/where the application is advertised. The "Advertise On
Internet" setting means that this application will be advertised globally using the F5
Distributed Cloud Global Network utilizing Anycast.
Click Save and Exit at the bottom of the HTTP Load Balancer configuration screen.
In the HTTP Load Balancers window, note the application hostname under the
Domains column (This was done in Task1: Step 4).
Click the Action dots, and then in the subsequent menu Manage Configuration.
Click DNS Information in the left-hand navigation.
Note
The pointer record for the CNAME is listed under "Host Name". It is also listed on the
"HTTP Load Balancers" screen for each Load Balancer. The associated "Tenant IP" is also
shown. The "Tenant IP" is uniquely assigned to each F5 Distributed Cloud Tenant.
Click JSON in the horizontal navigation at the top of the screen.
Note
The JSON payload (or YAML format, from dropdown) provides the entire Load Balancer
configuration for backup or subsequent CI/CD automation operations.
Click Documentation in the horizontal navigation at the top of the screen.
Note
The Documentation screen provides details on the F5 Distributed Cloud Console API.
All operations in the F5 Distributed Cloud Platform are API-first. This includes all GUI
actions and associated audit logging.
Click Cancel and Exit to return to the HTTP Load Balancers screen.
Task 3: Testing the WAF Policy & Reviewing Event Data
You will now perform basic testing of the Web Application Firewall (WAF) Policy. You will also
review the generated event data to make additional configuration changes.
Open another tab in your browser (Chrome shown), navigate to the newly configured Load
Balancer configuration: http://<namespace>.lab-sec.f5demos.com, to confirm it is
functional.
Using some of the sample attacks below, add the URI path & variables to your application