Manual Chapter :
Common elements for security policies
Applies To:
Show Versions
BIG-IP ASM
- 16.0.1, 16.0.0, 15.1.0, 15.0.1, 15.0.0
Common elements for security policies
- On the Main tab, click .The Policies List screen opens.
- Click the name of the security policy you want to work on.The Policy Summary opens.
- From the list, selectAdvanced.
- On the Main tab, click .The Policy Properties screen for the current edited policy opens.
- Review each of the Policy Building Settings so you understand how the security policy handles requests that cause the associated violations, and adjust if necessary. You need to expand most of the settings to see the violations.To the right of Policy Building Settings, clickBlocking Settingsto see and adjust all of the violations at once.OptionWhat happens when selectedLearnThe system generates learning suggestions for requests that trigger the violation (except learning suggestions are not generated for requests that return HTTP responses with 400 or 404 status codes).AlarmWhen selected, the system marks requests that trigger the violation as illegal. The system also records illegal requests in the Charts screen, the system log (/var/log/asm), and possibly in local or remote logs (depending on the settings of the logging profile).BlockThe system blocks requests that trigger the violation when (1) the security policy is in the blocking enforcement mode, (2) a violation occurs, and (3) the entity is enforced. The system sends the blocking response page (containing a Support ID to identify the request) to the client.
- For theEnforcement Modesetting, selectBlocking.
- Adjust theEnforcement Modesetting if needed.
- To block traffic that causes violations, selectBlocking.
- To allow traffic even if it causes violations (allowing you to make sure that legitimate traffic would not be blocked), selectTransparent.
You can only configure the Block flag on violations if the enforcement mode is set toBlocking. - Select or clear theLearn,Alarm, andBlockcheck boxes for the violations, as required (using the default settings is recommended).
- Note how theEnforcement Modeis set.OptionWhat HappensTransparentWhen the system receives a request that violates the security policy, the system logs the violation event.BlockingWhen the system receives a request that violates the security policy, the system logs the violation event, blocks the request, and responds to the request by sending the Blocking Response page and Support ID information to the client.
- On the Default Response Page tab, for theResponse Typesetting, select one of the following options.OptionSystem Response to Blocked RequestDefault ResponseThe system returns the system-supplied response page in HTML. No further configuration is needed.Custom ResponseThe system returns a response page with HTML code that you define.Redirect URLThe system redirects the user to a specified web page.SOAP FaultThe system returns the system-supplied blocking response page in XML format. You cannot edit the text, but you need to selectUse XML Blocking Response Pageon the XML profile.Erase CookiesThe system deletes all client side domain cookies. As a result, the system blocks web application users once, and redirects them to the login page. Legitimate users can login and get new cookies. This feature is primarily for session hijacking.The settings on the screen change depending on the selection that you make for theResponse Typesetting.
- If you selected theCustom Responseoption, you can either modify the default text or upload an HTML file.To modify the default text:
- For theResponse Headerssetting, type the response header you want the system to send.
- For theResponse Bodysetting, type or paste the text you want to send to a client in response to an illegal blocked request. Use standard HTTP syntax.
- ClickShowto see what the response will look like.
To upload a file containing the response:- In theResponse Body, for theUpload Filesetting,clickChoose Fileto specify an HTML file that contains the response you want to send to blocked requests.
- ClickUploadto upload the file into the response body.
- If you selected theRedirect URLoption, then in theRedirect URLfield, type the URL to which the system redirects the user, for example,http://www.myredirectpage.com.The URL should be for a page that is not within the web application itself.For example, to redirect the blocking page to a URL with a support ID in the query string, type the URL and the support ID in the following format:http://www.myredirectpage.com/block_pg.php?support_id= <%TS.request.ID()%>The system replaces<%TS.request.ID%>with the relevant support ID so that the blocked request is redirected to the URL with the relevant support ID.
- In the editing context area, clickApply Policyto put the changes into effect.
- On the Main tab, click .The Learning and Blocking Settings screen opens.
- On the Main tab, click .The Response Pages screen opens.
- At the top of the screen, clickCurrent edited policyto display the security policy properties.
- On the Main tab, click .
- From the Blocking menu, choose Settings.
- On the Main tab, click .
- On the Main tab, click .The Login Pages List screen opens.
- ClickCreate.The New Login Page screen opens.
- For theLogin URLsetting, specify a URL that users must pass through to get to the application.
- From the list, select the type of URL:ExplicitorWildcard.
- Select eitherHTTPorHTTPSbased on the type of traffic the web application accepts.
- Type an explicit URL or wildcard expression in the field.When you click in the field, the system lists URLs that it has seen, and you can select a URL from the list. Or, you can type explicit URLs in the format/login, and wildcard URLs without the slash, such as*.php.Wildcard syntax is based on shell-style wildcard characters. This table lists the wildcard characters that you can use so that the entity name can match multiple objects.
Note that wildcards do not match regular expressions.Wildcard CharacterMatches*All characters?Any single character.[abcde]Exactly one of the characters listed.[!abcde]Any character not listed.[a-e]Exactly one character in the range.[!a-e}Any character not in the range.
- From theAuthentication Typelist, select the method the web server uses to authenticate the login URL's credentials with a web user.OptionDescriptionNoneThe web server does not authenticate users trying to access the web application through the login URL. This is the default setting.HTML FormThe web application uses a form to collect and authenticate user credentials. If using this option, you also need to type the user name and password parameters written in the code of the HTML form.HTTP Basic AuthenticationThe user name and password are transmitted in Base64 and stored on the server in plain text.HTTP Digest AuthenticationThe web server performs the authentication; user names and passwords are not transmitted over the network, nor are they stored in plain text.NTLMMicrosoft LAN Manager authentication (also called Integrated Windows Authentication) does not transmit credentials in plain text, but requires a continuous TCP connection between the server and client.JSON/AJAX RequestThe web server uses JSON and AJAX requests to authenticate users trying to access the web application through the login URL. For this option, you also need to type the name of the JSON element containing the user name and password.
- In the Access Validation area, define at least one validation criteria for the login page response.If you define more than one validation criteria, the response must meet all the criteria before the system allows the user to access the application login URL.The system checks the access validation criteria on the response according to the content-type of the login URL. Supported content-types are text/*, application/x-javascript, application/sgml, application/xml, application/x-asp, application/x-aspx, application/xhtml+xml, application/json, application/x-shockwave-flash. You can use the internal parameteruser_defined_accum_typeto add supported content-types.
- ClickCreateto add the login page to the security policy.The new login page is added to the login pages list.
- Add as many login pages as needed for your web application.
- On the Main tab, click .The Login Enforcement screen opens.
- If you want the login URL to be valid for a limited time, setExpiration TimetoEnabled, and type a value, in seconds (1-99999) that indicates how long the session will last.If enabled, the login session ends after the number of seconds has passed.
- For theAuthenticated URLssetting, specify the target URLs that users can access only by way of the login URL:
- In theAuthenticated URLs (Wildcards supported)field, type the target URL name in the format/private.php(wildcards are allowed).
- ClickAddto add the URL to the list of authenticated URLs.
- Repeat to add as many authenticated URLs as needed.
- On the Main tab, click .The Session Tracking screen opens.
- In the Session Tracking Configuration area, select theSession Awarenesscheck box.
- From theApplication Usernamelist, selectUse All Login Pagesto track login sessions for all of the login pages in the security policy.
- From theApplication Usernamelist, selectUse APM Usernames and Session ID.
- In the Violation Detection Actions area, select theTrack Violations and Perform Actionscheck box.
- In theViolation Detection Periodfield, type the number of seconds that indicates the sliding time period to count violations for violation thresholds.The default is900seconds.
- If you want the system to log activity when the number of violations for user, session, device ID, or IP address, exceeds the threshold during the violation detection period, specify one or more of the following settings on the Log All Requests tab.OptionDescriptionUsername ThresholdSelectEnableand specify the number of violations allowed before the system starts logging this user's activity for the log all requests period.Session ThresholdSelectEnableand specify the number of violations allowed before the system starts logging activity for this HTTP session for the log all requests period.Device ID ThresholdSelectEnableand specify the number of violations allowed before the system starts to log requests for this device.IP Address ThresholdSelectEnableand specify the number of violations allowed before the system starts logging the activity of this IP address for the log all requests period.Log All Requests PeriodSpecify how long the system should log all requests when any of the enabled thresholds is reached. Type the number of seconds in the field.
- If you want more tolerant blocking for selected violations, such as those prone to false positives, specify one or more of the following settings on the Delay Blocking tab.OptionDescriptionUsername ThresholdSelectEnableand specify the number of violations a user must cause before the system begins blocking this user for the delay blocking period.Session ThresholdSelectEnableand specify the number of violations users must cause (during the violation detection period) before the system begins blocking this HTTP session for the delay blocking period.Device ID ThresholdSelectEnableand specify the number of violations allowed per device ID before the system starts to block illegal requests from the device.IP Address ThresholdSelectEnableand specify the number of violations allowed before the system begins blocking this IP address for the delay blocking period.Delay Blocking PeriodType the number of seconds that the system should block the user, session, or IP address when any of the enabled thresholds is reached.Associated ViolationsMove the violations for which you want delay blocking from theAvailablelist into theSelectedlist. If the selected violations occur, the system does not block traffic until one of the enabled thresholds is reached. At that point, the system blocks traffic causing those violations for the user, session, or IP address, but allows other transactions to pass.For the system to block requests, the security policy Enforcement Mode must be set to blocking and some violations must be set to block.
- If you want the system to block all activity for a user, session, device ID, or IP address when the number of violations exceeds the threshold within the violation detection period, specify one or more of the following settings on the Block All tab.OptionDescriptionBlocked URLsSpecify which URLs to block after the number of violations exceeds the enabled thresholds. To block all URLs, selectBlock all URLs. To block authenticated URLs protected by login pages, selectBlock Authenticated URLs.Username ThresholdSelectEnableand specify the number of violations allowed before the system starts to block this user's activity.Session ThresholdSelectEnableand specify the number of violations allowed before the system starts to block activity for this HTTP session.Device ID ThresholdSelectEnableand specify the number of violations allowed per device ID before the system starts to block activity for this device.IP Address ThresholdSelectEnableand specify the number of violations allowed before the system starts to block the activity for this IP address.Block All PeriodSpecify how long to block users, sessions, or IP addresses if the number of violations exceeds the threshold. To block the user, session, or IP address indefinitely, clickInfinite. Otherwise, clickUser-definedand type the number of seconds to block the traffic. The default is600seconds.For the system to block requests, the security policy Enforcement Mode must be set to blocking and some violations must be set to block.
- On the Main tab, click .The IP Address Exceptions screen opens, and displays a centralized list of configured IP address exceptions.
- On the Main tab, click .
- From theFirst PolicyandSecond Policylists, select the security policies you want to compare or merge, or browse to search your computer for an exported security policy.The two security policies you are comparing can be active, inactive, policies imported in binary or XML format, or a combination of both.
- If you plan to merge security policy attributes, it is a good idea to safeguard the original security policy. In theWorking Modefield, select how you want to work.OptionDescriptionWork on OriginalIncorporate changes to one (or both) of the original security policies depending on the merge options you select without making a copy of it.Make a CopyMake a copy of the security policy into which you are incorporating changes.Work on CopyWork on a copy of the original security policy. First, a copy is made, then incorporate possible changes on the original policies. If comparing one or more policies with Policy Builder enabled, this option is automatically selected (and the other options become unavailable).
- Click theCalculate Differencesbutton to compare the two security policies.The system does not compare navigation parameters. They are ignored and do not appear in the results.The Policy Differences Summary lists the number of differences for each entity type.
- Click any row in the Policy Differences Summary to view the differing entities with details about the conflicting attributes.The system displays a list of the differing entities and shows details about each entity's conflicting attributes.
- To automatically merge the differences between the two security policies, clickAuto Merge.An Auto Merge popup screen opens.
- In theHandle missing entitiessetting, specify how you want the system to treat entities that exist in one security policy but not the other.By default, both check boxes are selected; the auto-merge process adds unique entities from each policy into the policy from which they are missing.
- To move missing entities from the second policy to the first, selectAdd all unique entities from <second policy> to <first policy>.
- To move missing entities from the first policy to the second, selectAdd all unique entities from <first policy> to <second policy>.
- If you do not want to merge missing entities, leave both check boxes blank.
- In theHandle common entities for <first policy> and <second policy>, specify how you want the system to treat entities that have conflicting attributes.
- To make no changes to either policy when entities are different, selectLeave unchanged.
- To use the differing entities from the first policy and move them to the second, selectAccept all from <first policy> to <second policy>.
- To use the differing entities from the second policy and move them to the first, selectAccept all from <second policy> to <first policy>.
- ClickMerge.The system merges the two security policies.