Creating Session Attributes

Based on session attributes, WAF generates a session ID. The session ID format is not specified; it is implemented as a hash function of a set of session attribute values and differs for different sessions. Only used inside WAF.

You can create session attributes both on the “Users and Sessions” tab of the “Applications” window, then the session attribute will be used for the selected application, and on the

“Session Tracking” of the “Settings” window, then you will be able to choose whether this session attribute will be used for all applications in the installation or only for a specific application.

The window for creating a session attribute is shown in Figure 167.

In order for the session model to work, you need to make sure that the lightweight session tracking module (LWSessionTracker) is enabled in the analyzer settings. If you need functionality for tracking the preliminary setting of a session cookie, you must enable the request parsing module (DecisionTreeResponseParser). More information about the settings of the analyzer modules is written in the section section 17

image284

Figure 167 – “Session Attribute” window

Session attribute settings contain the following elements:

  1. Attribute name – input field for the name of the session attribute.

  2. Web application – field for selecting an application from those installed on the installation.

  3. Priority—input field for the priority of the session attribute. The lower the number set in priority, the more important this attribute is for WAF.

  4. Attribute type – select an attribute type from three options:

    • Session ID – a session attribute that uniquely identifies a session;

    • Sequence identifier - necessary in order to make the transition from an unauthorized session to an authorized one, in cases where the session attribute changes during authorization (for example, PHPSESSIONID);

    • User ID – retrieving the user name makes it possible to track user activity within a session.

  5. Retrieving an attribute from a request – selecting the location of the request from which the session attribute will be retrieved. In some options, it is necessary to specify the path in the parse tree of the request to the element that will be used as a session attribute.

  6. Extracting an attribute from a response – selecting the location in the response from which the session attribute will be extracted. In some options, it is necessary to specify the path in the response parse tree to the element that will be used as a session attribute.

  7. For an attribute to appear legally in requests, it must first be set by the web application in the response - if this checkbox is used, if a transaction uses a session attribute that was not previously set in the response, the transaction will be blocked.

  8. Invalidated by action – selecting an action from those set up on the application (available if the application was selected in step 2) as an invalidating session attribute.