Applies To:Show Versions
- 11.6.5, 11.6.4, 11.6.3, 11.6.2, 11.6.1
Configuring ASM with Local Traffic Policies
About application security and local traffic policies
When you use Application Security Manager™ (ASM) to create a security policy attached to a virtual server, the BIG-IP® system automatically creates a local traffic policy. The local traffic policy forms a logical link between the local traffic components and the application security policy.
By default, the system automatically creates a simple local traffic policy directs all HTTP traffic coming to the virtual server to the ASM security policy that you created. ASM examines the traffic to ensure that it meets the requirements of the security policy. If that is all you need to do, your task is done. If, however, you want more flexibiliy, such as applying different security policies depending on the type of traffic or disabling ASM for certain types of traffic, you can use the local traffic policy to do that.
Local traffic policies can include multiple rules. Each rule consists of a condition and one or more actions to be performed if the condition holds. So you can create a local traffic policy that works with ASM and includes multiple rules that do different things depending on the conditions you set up. In this type of traffic policy, each rule must include one of these ASM actions:
- Enable ASM enforcing a specific security policy
- Disable ASM
For example, you may want a local traffic traffic policy directed to a specific URL to enforce a security policy. As a default rule, all other traffic could disable ASM. You can also direct people using different aspects of an application (or different applications) to various security policies. Many other options are available for directing ASM traffic using local traffic policies.
About application security and manually adding local traffic policies
If you use the Deployment wizard to create a security policy not attached to a virtual server, the system creates the security policy but does not create a local traffic policy. However, you will need to have a virtual server and local traffic policy to select the traffic for the security policy to enforce.
In that case, you can develop the security policy adding the features that you want to use. Without a virtual server, the system cannot build the security policy automatically until you have traffic going through. But you can manually develop the security policy.
When you are ready to enforce the security policy and start sending traffic through the system, create a virtual server with an http profile, and enable the security policy you created in the virtual server resources. When you save the virtual server, the system automatically creates a default local traffic policy that enforces the security policy on all traffic. You can edit the local traffic policy rules if you want more flexibility concerning how the security policies are implemented.
Overview: Configuring ASM with local traffic policies
Application Security Manager™ applies security policy rules to traffic that is controlled and defined using a local traffic policy. To provide more flexibility in selecting the traffic, you can edit the local traffic policy and add rules to it.
This implementation shows how to create a security policy and edit at the local traffic policy that is created. The example provided describes how to add rules to the local traffic policy so that the security policy applies only to administrative traffic beginning with /admin. No security policy applies to the other traffic.
Many other options are available for configuring local traffic policies with ASM. By following through the steps in this example, you can see the other options that are available on the screens, and can adjust the example for your needs.
Creating a security policy automatically
On the Main tab, click
.The Active Policies screen opens.
Click the Create button.
The Deployment wizard opens to the Select Local Traffic Deployment Scenario screen.
For the Local Traffic Deployment Scenario setting,
specify a virtual server to use for the security policy.
The virtual server represents the web application you want to protect.The Configure Local Traffic Settings screen opens if you are adding a virtual server. Otherwise, the Select Deployment Scenario screen opens.
- To secure an existing virtual server that has no security policy associated with it, select Existing Virtual Server and click Next.
- To create a new virtual server and pool with basic configuration settings, select New Virtual Server and click Next.
- To create an active but unused security policy, select Do not associate with Virtual Server and click Next. No traffic will go through this security policy until you associate it with a virtual server. The Policy Builder cannot begin automatically creating a policy until traffic is going to ASM through the virtual server.
If adding a virtual server, configure the new or existing virtual server, and
The name of the virtual server becomes the name of the security policy.The Select Deployment Scenario screen opens.
- If creating a new virtual server, specify the protocol, name, virtual server destination address and port, and pool member IP address and port.
- If using an existing virtual server, it must have an HTTP profile and cannot be associated with a local traffic policy.
- If you selected Do not associate with Virtual Server, you will have to manually associate the security policy with a virtual server at a later time. On the policy properties screen, you need to specify a name for the security policy.
For Deployment Scenario, select Create a
policy automatically and click
The Configure Security Policy Properties screen opens.
- If not associating a virtual server, in the Security Policy Name field, type a name for the policy.
From the Application Language list, select the language
encoding of the application, or select Auto detect and
let the system detect the language.
Important: You cannot change this setting after you have created the security policy.
If the application is not case-sensitive, clear the Security Policy
is case sensitive check box. Otherwise, leave it selected.
Important: You cannot change this setting after you have created the security policy.
- If you do not want the security policy to distinguish between HTTP and HTTPS URLs, clear the Differentiate between HTTP and HTTPS URLs check box. Otherwise, leave it selected.
The Configure Attack Signatures screen opens.
To configure attack signatures, move the systems used by your web application
from the Available Systems list into the
Assigned Systems list.
The system adds the attack signatures needed to protect the selected systems.
For the Signature Staging setting, verify that the
default option Enabled is selected.
Note: Because the Real Traffic Policy Builder® begins building the security policy in Blocking mode, you can keep signature staging enabled so you can check whether legitimate traffic is being stopped to reduce the chance of false positives.New and updated attack signatures remain in staging for 7 days, and are recorded but not enforced (according to the learn, alarm, and block flags in the attack signatures configuration) during that time.
The Configure Automatic Policy Building screen opens.
For Policy Type, select an option to determine the
security features to include in the policy.
Option Description Fundamental Creates a security policy enforcing HTTP protocol compliance, evasion techniques, explicit file types (including length checks), explicit parameters in selective mode at the global level, attack signatures, the violation Request Length Exceeds Defined Buffer Size, host names, header lengths, cookie lengths, the violation Failed to Convert Character, and learn explicit redirection domains. Enhanced Creates a security policy with all the elements of the Fundamental policy type; also checks for explicit URLs in selective mode plus meta characters, explicit parameter length checks in selective mode at the global level, methods, explicit cookies, and content profiles. Comprehensive Creates a security policy with all the elements of the Enhanced policy type; also checks for explicit URLs and meta characters, explicit parameters and lengths at the URL level, parameter meta characters, and dynamic parameters.A bulleted list on the screen describes which security features are included in each type.
For Rules, move the slider to set the Policy Builder
Option Description Fast Use if your application supports a small number of requests from a small number of sessions; for example, useful for web sites with less traffic. However, choosing this option may present a greater chance of adding false entities to the security policy. Medium Use if your application supports a medium number of requests, or if you are not sure about the amount of traffic on the application web site. This is the default setting. Slow Use if your application supports a large number of requests from many sessions; for example, useful for web sites with lots of traffic. This option creates the most accurate security policy, but takes Policy Builder longer to collect the statistics.Based on the option you select, the system sets greater or lesser values for the number of different user sessions, different IP addresses, and length of time before it adds to the security policy and enforces the elements.
For Trusted IP Addresses, select which IP addresses to
Option Description All Specifies that the policy trusts all IP addresses. For example, if the traffic is in a corporate lab or preproduction environment where all of the traffic is trusted, the policy is created faster when you select this option. Address List Specifies networks to consider safe. Fill in the IP Address and Netmask fields, then click Add. This option is typically used in a production environment where traffic could come from untrusted sources. The IP Address can be either an IPv4 or an IPv6 address.If you leave the trusted IP address list empty, the system treats all traffic as untrusted. In general, it takes more untrusted traffic, from different IP addresses, over a longer period of time to build a security policy.
If you want the security policy to automatically detect JSON and XML protocols,
select the JSON/XML payload detection check box.
If requests contain legitimate XML or JSON data, the Policy Builder creates content profiles in the security policy according to the data it detects.
- If you want to display a response page when an AJAX request does not adhere to the security policy, select the AJAX blocking response behavior check box.
The Security Policy Configuration Summary opens where you can review the settings to be sure they are correct.
Click Finish to create the security policy.
The Automatic Policy Building Status screen opens where you can view the current state of the security policy.
Creating local traffic policy rules for ASM
- On the Main tab, click .
- Click the name of the local traffic policy that was created automatically. The name is asm_auto_l7policy__name where name is the name of the security policy.
- In the Rules area, click Add to create a rule that defines when traffic is handled by the security policy.
- In the Rule field, type the name admin.
In the Manage Conditions area, define the application traffic to which this
rule applies. Specify the following values and use the default values for the
- From the Operand list, select http-uri.
- From the Selector list, select path.
- From the Condition list, select starts_with; then, in the field below, type /admin and click Add.
- Click Add Condition.
In the Manage Actions area, define the action to apply to the traffic. Specify
the following values and use the default values for the rest.
From the Target list, select
Event is set to request, Action is set to enable , and a security policy is selected.
- In the Action setting, for policy, select the security policy you created, then click Add.
- Click Add Action.
- From the Target list, select asm.
- Click Finished to add the rule to the local traffic policy.
- Click Properties to return to the local traffic policy.
In the Rules area, click the rule called default.
The default rule was added to the local traffic policy when the system created it.The screen displays the General Properties of the rule.
To change the default action for all other traffic, in the Manage Actions area,
edit the action that is shown there.
The default rule now disables ASM protection for other traffic.
- In the Actions setting, select the action that you see in the list and click Edit Action.
- From the Action list, select disable.
- Click Add Action.
When you have completed the steps in this implementation, you have configured the Application Security Manager™ (ASM) to enforce security policy rules only on traffic with a URI beginning with /admin. All other traffic bypasses ASM™.
This is simply one way to illustrate how you can use a local traffic policy to determine different conditions and specify multiple actions instead of having all traffic treated the same way. We encourage you to explore the local traffic policy options and documentation to learn how to use this flexible feature to best suit your needs.