ADC

Session policies

After you create one or more session profiles, you create session policies and then bind the policies globally or to an authentication virtual server to put them into effect.

To create a session policy by using the command line interface

At the command prompt, type the following commands to create a session policy and verify the configuration:

- add tm sessionPolicy    - show tm sessionPolicy  

Example

> add tm sessionPolicy session-pol "URL == /*.gif" session-profile Done > show tm sessionPolicy session-pol 1) Name: session-pol Rule: URL == '/*.gif' Action: session-profile Done 

To modify a session policy by using the command line interface

At the command prompt, type the following commands to modify a session policy and verify the configuration:

- set tm sessionPolicy  [-rule ] [-action ] - show tm sessionPolicy  

Example

> set tm sessionPolicy session-pol "URL == /*.gif" session-profile Done > show tm sessionPolicy session-pol 1) Name: session-pol Rule: URL == '/*.gif' Action: session-profile Done 

To globally bind a session policy by using the command line interface

At the command prompt, type the following commands to globally bind a session policy and verify the configuration:

```bind tm global -policyName [-priority ]

Example

bind tm global -policyName session-pol Done

show tm sessionPolicy session-pol 1) Name: session-pol Rule: URL == ‘/*.gif’ Action: session-profile Policy is bound to following entities 1) TM GLOBAL PRIORITY : 0 Done

## To bind a session policy to an authentication virtual server by using the command line interface At the command prompt, type the following command to bind a session policy to an authentication virtual and verify the configuration: ```bind authentication vserver  -policy  [-priority ]

Example

> bind authentication vserver auth-vserver-1 -policyName Session-Pol-1 -priority 1000 Done 

To unbind a session policy from an authentication virtual server by using the command line interface

At the command prompt, type the following commands to unbind a session policy from an authentication virtual server and verify the configuration:

```unbind authentication vserver -policy

Example

unbind authentication vserver auth-vserver-1 -policyName Session-Pol-1 Done

## To unbind a globally bound session policy by using the command line interface At the command prompt, type the following commands to unbind a globally-bound session policy: ```unbind tm global -policyName 

Example

> unbind tm global -policyName Session-Pol-1 Done 

To remove a session policy by using the command line interface

First unbind the session policy from global, and then, at the command prompt, type the following commands to remove a session policy and verify the configuration:

```rm tm sessionPolicy

Example

rm tm sessionPolicy Session-Pol-1 Done

```

To configure and bind session policies by using the configuration utility

  1. Navigate toSecurity > AAA - Application Traffic > Session.
  2. Navigate toSecurity > AAA - Application Traffic > Policies > Session.
  3. In the details pane, on thePoliciestab, do one of the following:
    • To create a new session policy, clickAdd.
    • To modify an existing session policy, select the policy, and then clickEdit.
  4. In theCreate Session PolicyorConfigure Session Policydialog, type or select values for the parameters.
    • Name*—policyname (Cannot be changed for a previously configured session policy.)
    • Request Profile*—actionname
    • Expression*—rule (You enter expressions by first choosing the type of expression in the leftmost drop-down list beneath the Expression text area and then typing your expression directly into the expression text area, or by clickingAddto open the Add Expression dialog box and using the drop-down lists in it to construct your expression.)
  5. ClickCreateorOK. The policy that you created appears in the details pane of theSession PoliciesandProfilespage.
  6. To globally bind a session policy, in the details pane, selectGlobal Bindingsfrom theActiondrop-down list, and fill in the dialog.
    • Select the name of the session policy you want to globally bind.
    • ClickOK.
  7. To bind a session policy to an authentication virtual server, in the navigation pane, clickVirtual Servers, and add that policy to the policies list.
    • In the details pane, select the virtual server, and then clickEdit.
    • In theAdvanced Selectionsto the right of the detail area, clickPolicies.
    • Select a policy, or click theplusicon to add a policy.
    • In thePrioritycolumn to the left, modify the default priority as needed to ensure that the policy is evaluated in the proper order.
    • ClickOK. A message appears in the status bar, stating that the policy has been configured successfully.