Applies To:

Show Versions Show Versions

Manual Chapter: Creating a Security Policy for XML Applications
Manual Chapter
Table of Contents   |   << Previous Chapter   |   Next Chapter >>

Overview: Creating a security policy for web services

Use the Application Security Manager™ to create a security policy for a web application that uses XML formatting or web services. The security policy can verify XML format, and validate XML document integrity against a WSDL or XSD file. The security policy can also handle encryption and decryption for web services.

The Deployment wizard guides you through the steps required to create a security policy to protect web services or XML transactions.

Considerations for developing XML security

Before you get started, you need to understand a bit about the application you are developing a security policy for. For example, you need to know the answers to the following questions:

  • Does the web application use a WSDL or XML schema (XSD) file to validate the XML documents? Some web services use a WSDL or XML schema document to validate whether the incoming traffic complies with XML language rules. If the application uses a WSDL or XSD file, you need a copy of the file.
  • Does the application use a URL or parameter to point to the server that you want to protect? You need to know the URL or parameter that the application uses.

Creating a security policy for web services

You can create a security policy only if you have performed the basic system configuration tasks including defining a VLAN, a self IP address, a local traffic pool, an application security class, and a virtual server, according to the needs of your networking environment.
Application Security Manager™ can help create a security policy that is tailored to protect a web services application. The Deployment wizard guides you through the tasks required.
  1. On the Main tab, click Application Security > Web Applications.
  2. Locate the web application you want to protect, and click the Configure Security Policy link next to it.
    Tip: If you do not see the web application, first create an application security class.
    The Deployment wizard opens the Select Deployment Scenario screen.
  3. For Deployment Scenario, click Create a policy for XML and web services manually and click Next. The Configure Web Application Properties screen opens.
  4. From the Application Language list, select the language encoding of the application.
    Important: You cannot change the configuration of this setting after you have created the security policy.
  5. If the web application is not case-sensitive, clear the Security Policy is case sensitive check box. Otherwise, leave it checked.
    Important: You cannot change this setting after you have created the security policy.
  6. Click Next. The Configure Attack Signatures screen opens.
  7. 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.
  8. Click Next. The Create New XML Profile screen opens and displays the message:

    The initial configuration of the web application is complete. You can now create a new XML profile.

The Deployment wizard starts creating a security policy. You can create an XML profile to define the XML properties of the web service.
If your application has no WSDL or XML schema validation, create a basic XML profile. If the application uses a WSDL file, create an XML profile with WSDL validation. If the application uses an XML schema file, create an XML profile with WSDL validation.

Creating a basic XML profile

Before you can complete this task, you must have created a security policy using the option Create a policy for XML and web services manually.
If your web service includes XML data (without WSDL or schema validation), follow these steps to create a basic XML profile that defines the formatting and attack pattern checks for the security policy. You associate the XML profile with a URL or parameter.
  1. If you are on the Create New XML Profile screen, skip to step 2. If not, on the Main tab, point to Application Security > Content Profiles > XML Profiles and click the icon. The Create New XML Profile screen opens.
  2. For Profile Name, type a unique name.
  3. Select the Use XML Blocking Response Page check box to send an XML response page when the security policy blocks a request that contains XML content that does not comply with this XML profile.
  4. In the Defense Configuration area, for Defense Level, select High (the default value), Medium, or Low to specify the level of protection the security policy provides for XML applications and services. The system determines the defense configuration settings. You can review the settings by selecting Advanced next to Defense Configuration.
  5. Click Create. The Associate XML Profile screen opens.
  6. For the Associate XML Profile setting, specify whether to associate the XML profile with a URL or a parameter:
    Option Description
    URL Validates XML data found in requests to this URL.
    Parameter Validates XML data in a parameter. You also select the parameter level:

    Global Parameter specifies that this is a global parameter that has no association with URLs.

    URL Parameter specifies that this parameter is associated with a specific URL, a protocol (HTTP or HTTPS), and a target URL path.

  7. Click Next. The New URL or Add Parameter screen opens, depending on which entity you choose to associate with the XML profile.
  8. Create the URL or parameter to associate with the XML profile. Your steps depend on which option you selected.
    Option Description
    URL Type the explicit URL or wildcard URL that represents the web application, and click Next.
    Global Parameter Type the name of the parameter, and click Create.
    URL Parameter Type the explicit URL or wildcard URL that represents the web application, and click Next.

    Type the name of the parameter, and click Create.

    The system creates the URL or parameter and displays the list of entities.
The system automatically associates the XML profile with the URL, global parameter, or URL parameter.
Next, you can review the status of the security policy you created.

Creating an XML profile with WSDL validation

Before you can complete this task, you must have created a security policy using the option Create a policy for XML and web services manually. You need to have the WSDL file you want to use for validation, and it must comply with W3C XML schema specifications and use UTF-8 character encoding.
Follow these steps to include the WSDL document in the XML profile. The resulting security policy can then enforce the allowed (or disallowed) methods and URLs.
  1. If you are on the Create New XML Profile screen, skip to step 2. If not, on the Main tab, point to Application Security > Content Profiles > XML Profiles and click the create icon. The Create New XML Profile screen opens.
  2. For Profile Name, type a unique name.
  3. Select the Use XML Blocking Response Page check box to send an XML response page when the security policy blocks a request that contains XML content that does not comply with this XML profile.
  4. In the Validation Configuration area, for the File option of the Configuration Files setting, click Browse and navigate to the WSDL document.
  5. Click Upload. The screen lists the uploaded file.
  6. For Import URL, type the URL that the imported file references.
  7. To allow SOAP messages to have attachments, select the Allow Attachments in SOAP Messages check box.
  8. In the Defense Configuration area, for Defense Level, select High (the default value), Medium, or Low to specify the level of protection the security policy provides for XML applications and services. The system determines the defense configuration settings. You can review the settings by selecting Advanced next to Defense Configuration.
  9. Click Create. In most cases, the system automatically associates a URL or parameter with the application based on the WSDL file. If the XML Profiles screen is displayed, you are done creating the profile. Otherwise, the Associate XML Profile screen opens, and you can continue with the next step.
  10. For the Associate XML Profile setting, specify whether to associate the XML profile with a URL or a parameter:
    Option Description
    URL Validates XML data found in requests to this URL.
    Parameter Validates XML data in a parameter. You also select the parameter level:

    Global Parameter specifies that this is a global parameter that has no association with URLs.

    URL Parameter specifies that this parameter is associated with a specific URL, a protocol (HTTP or HTTPS), and a target URL path.

  11. Click Next. The New URL or Add Parameter screen opens, depending on which entity you choose to associate with the XML profile.
  12. Create the URL or parameter to associate with the XML profile. Your steps depend on which option you selected.
    Option Description
    URL Type the explicit URL or wildcard URL that represents the web application, and click Next.
    Global Parameter Type the name of the parameter, and click Create.
    URL Parameter Type the explicit URL or wildcard URL that represents the web application, and click Next.

    Type the name of the parameter, and click Create.

    The system creates the URL or parameter and displays the list of entities.
The security policy includes the XML profile with WSDL validation.
Next, you can review the status of the security policy you created.

Creating an XML profile with XML schema validation

Before you can complete this task, you must have created a security policy using the option Create a policy for XML and web services manually. You need to have the XML schema file you want to use for validation, and it must comply with W3C XML schema specifications and use UTF-8 character encoding.
Follow these steps to incorporate the schema file into the XML profile.
  1. If you are on the Create New XML Profile screen, skip to step 2. If not, on the Main tab, point to Application Security > Content Profiles > XML Profiles and click the create icon. The Create New XML Profile screen opens.
  2. For Profile Name, type a unique name.
  3. Select the Use XML Blocking Response Page check box to send an XML response page when the security policy blocks a request that contains XML content that does not comply with this XML profile.
  4. In the Validation Configuration area, for the Configuration Files setting File option, click Browse to navigate to the XML schema file (.xsd), then click Upload.
  5. For Import URL, type the URL that the imported file references.
  6. To allow SOAP messages to have attachments, select the Allow Attachments in SOAP Messages check box.
  7. In the Defense Configuration area, for Defense Level, select High (the default value), Medium, or Low to specify the level of protection the security policy provides for XML applications and services. The system determines the defense configuration settings. You can review the settings by selecting Advanced next to Defense Configuration.
  8. Click Create. The Associate XML Profile screen opens.
  9. For the Associate XML Profile setting, specify whether to associate the XML profile with a URL or a parameter:
    Option Description
    URL Validates XML data found in requests to this URL.
    Parameter Validates XML data in a parameter. You also select the parameter level:

    Global Parameter specifies that this is a global parameter that has no association with URLs.

    URL Parameter specifies that this parameter is associated with a specific URL, a protocol (HTTP or HTTPS), and a target URL path.

  10. Click Next. The New URL or Add Parameter screen opens, depending on which entity you choose to associate with the XML profile.
  11. Create the URL or parameter to associate with the XML profile. Your steps depend on which option you selected.
    Option Description
    URL Type the explicit URL or wildcard URL that represents the web application, and click Next.
    Global Parameter Type the name of the parameter, and click Create.
    URL Parameter Type the explicit URL or wildcard URL that represents the web application, and click Next.

    Type the name of the parameter, and click Create.

    The system creates the URL or parameter and displays the list of entities.
The security policy includes the XML profile with XML schema validation.
Next, you can review the status of the security policy you created.

Reviewing the status of an XML security policy

Before you can complete this task, you must have created a security policy using the option Create a policy for XML and web services manually, and traffic must be flowing to the application through the BIG-IP® system.
You can monitor the general progress of the XML security policy created using the Deployment wizard. The system processes the traffic to gather information needed to create the security policy, and displays messages about its progress.
  1. On the Main tab, click Application Security > Policy. The screen shows the properties of the current edited policy.
  2. Review the messages in the identification and messages area to learn about the security policy status.
    Status Message Description
    Checking to see if ASM is detecting traffic The Application Security Manager™ is parsing and analyzing received requests. Allow the system several minutes to analyze requests.
    The ASM did not detect any traffic Verify the networking configuration (check the VLAN, self IP address, pool, HTTP class, and virtual server).
    The ASM detected traffic successfully. Waiting for a minimum of 10000 requests and at least one hour from running the wizard for the application. The ASM detected n requests during x hours and y minutes. Application Security Manager detected traffic and will sample requests until it processes at least 10,000 requests, and at least one hour has passed since you started the Deployment wizard.
    Processing XML violations for at least one hour After successfully detecting traffic and sampling requests, the Application Security Manager processes XML violations. Based on what it finds in the traffic sample and the violations, Application Security Manager automatically adjusts security policy settings to match the traffic and eliminate false positives. The system samples requests for at least one hour.
    The system did not detect any new XML violations over the last hour For at least an hour, none of the traffic going to or from the application has caused XML violations. When you see this message, you can fine-tune the security policy.

Fine-tuning an XML security policy

Before you can complete this task, you must have created a security policy using the Web Services deployment scenario, and have seen the message:

The system did not detect any new XML violations over the last hour

When no XML violations have occurred for at least an hour, the security policy includes learning suggestions based on the traffic. You can evaluate each suggestion and decide whether to add it to the security policy.
  1. In the identification and messages area of the screen, click the Traffic Learning link.
    Tip: If you do not see the link, click Policy Building > Manual.
    The Traffic Learning screen opens, and lists violations that the system has found based on real traffic.
  2. In the Traffic Learning area, click each violation hyperlink, then review and handle learning suggestions:
    Option Description
    Accept Select a learning suggestion, click Accept, and then click Apply Policy. The system updates the security policy to allow the file type, URL, parameter, or other element.
    Clear Select a learning suggestion, and click Clear. The system removes the learning suggestion and continues to generate suggestions for that violation.
    Cancel Click Cancel to return to the Traffic Learning screen.
    Note: Learning suggestions are not available for every violation.
  3. On the Traffic Learning screen, review the violations and consider whether you want to permit any of them (for example, if a violation is causing false positives). Select any violations you do not want the system to trigger, and click Disable Violation. A popup screen opens, and you can verify that you want to disable the violations or cancel the operation.
  4. To activate the updated security policy, in the editing content area, click Apply Policy, then click OK to confirm.
The security policy includes elements unique to your web service or XML application but it is not blocking the requests that cause violations.

Enforcing a security policy

To enforce a security policy, you change the enforcement mode from transparent to blocking.
  1. On the Main tab, expand Application Security and click Policy.
  2. In the editing context area near the top of the screen, verify that the edited security policy is the one you want to work on.
  3. From the Blocking menu, choose Settings.
  4. For the Enforcement Mode setting, select Blocking.
  5. Select or clear the Block check boxes for the violations, as required (or use the default settings).
  6. Click Save.
  7. In the editing context area, click Apply Policy to immediately put the changes into effect.
When the enforcement mode is set to blocking and the violations you want to enforce are set to block, the security policy no longer allows requests that cause these violations to reach the back-end resources. Instead, the security policy blocks the request, and sends the blocking response page to the client.
Table of Contents   |   << Previous Chapter   |   Next Chapter >>

Was this resource helpful in solving your issue?




NOTE: Please do not provide personal information.



Incorrect answer. Please try again: Please enter the words to the right: Please enter the numbers you hear:

Additional Comments (optional)