Deployment Example 1: Access Manager 7.1 Load Balancing, Distributed Authentication UI, and Session Failover

10.1 Configuring the Web Policy Agents Load Balancer

Load Balancer 5 handles traffic for the web policy agents, and is configured for simple persistence so that browser requests from the same IP address will always be directed to the same policy agent. From a performance perspective, each policy agent validates the user session and evaluates applicable policies. The results are subsequently cached by the individual policy agent to improve performance. If load balancer persistence is not set, each agent must build up its own cache, effectively doubling the workload on the Access Manager servers, and cutting overall system capacity in half. The problem becomes even more acute as the number of policy agents increases. Simple persistence guarantees that the requests from the same user session will always be sent to the same policy agent.


Tip –

In situations where each web policy agent instance is protecting identical resources, some form of load balancer persistence is highly recommended for the performance reasons. The actual type of persistence may vary when a different load balancer is used, as long as it achieves the goal of sending the requests from the same user session to the same policy agent.


The following illustration shows the architecture of the policy agents and load balancers.

Figure 10–1 Policy Agents and Load Balancers

Load Balancer 5 handles traffic to web policy
agents. Load Balancer 6 handles traffic to J2EE policy agents.


Note –

When firewalls are configured, Load Balancer 5 can be located in a less secure zone.


Use the following list of procedures as a checklist for configuring the web policy agents' load balancer:

  1. To Configure the Web Policy Agents Load Balancer

  2. To Point the Web Policy Agents to Load Balancer 5

  3. To Configure Policy for the Web Policy Agents Using Access Manager

  4. To Verify the Web Policy Agents Load Balancer Configuration is Working Properly

ProcedureTo Configure the Web Policy Agents Load Balancer

Before You Begin

The load balancer hardware and software used for this deployment is BIG-IP® manufactured by F5 Networks. If you are using different load balancer software, see the documentation that comes with that product for detailed settings information.

  1. Access https://is-f5.example.com, the Big IP load balancer login page, from a web browser.

  2. Log in using the following credentials:

    User name:

    username

    Password:

    password

  3. Click Configure your BIG-IP (R) using the Configuration Utility.

  4. Create a Pool.

    A pool contains all the backend server instances.

    1. In the left pane, click Pools.

    2. On the Pools tab, click Add.

    3. In the Add Pool dialog, provide the following information:

      Pool Name

      WebAgent-Pool

      Load Balancing Method

      Round Robin

      Resources

      Add the IP address and port number of both Protected Resource host machines: ProtectedResource-1:1080 and ProtectedResource-2:1080.

    4. Click Done.

  5. Add a Virtual Server.

    This step defines instances of the load balancer.


    Tip –

    If you encounter JavaScriptTM errors or otherwise cannot proceed to create a virtual server, try using Internet Explorer.


    1. In the left frame, click Virtual Servers.

    2. On the Virtual Servers tab, click Add.

    3. In the Add a Virtual Server dialog box, provide the following information:

      Address

      Enter the IP address for LoadBalancer-5.example.com

      Service

      90

      Pool

      WebAgent-Pool

    4. Continue to click Next until you reach the Pool Selection dialog box.

    5. In the Pool Selection dialog box, assign the WebAgent-Pool Pool.

    6. Click Done.

  6. Add Monitors.

    Monitors are required for the load balancer to detect the backend server failures.

    1. In the left frame, click Monitors.

    2. Click Add.

      In the Add Monitor dialog provide the following information:

      Name:

      WebAgent-http

      Inherits From:

      Choose http.

    3. Click Next.

    4. On the resulting Configure Basic Properties page, click Next.

    5. In the Send String field under Configure ECV HTTP Monitor, enter GET /monitor.html and click Next.

    6. On the Destination Address and Service (Alias) page, click Done.

      The monitor just added is in the list of monitors under the Monitors tab.

    7. Click the Basic Associations tab.

    8. Mark the Add checkbox next to the IP addresses for ProtectedResource-1 and ProtectedResource-2.

    9. At the top of the Node column, choose the monitor that you just added, WebAgent-http.

    10. Click Apply.

  7. Configure the load balancer for simple persistence.

    The web policy agents load balancer is configured with simple persistence. With simple persistence, all requests sent within a specified interval from the same user are routed to the same agent. This significantly reduces the number of agent requests to sent to Access Manager for validation thus reducing the overall load on the Access Manager servers.


    Note –

    Simple persistence tracks connections based on the client IP address only, returning a client to the same node to which it connected previously.


    1. In the left frame, click Pools.

    2. Click the WebAgent-Pool link.

    3. Click the Persistence tab.

    4. Under Persistence Type, select the Simple.

    5. Set the timeout interval.

      In the Timeout field, enter 300 seconds.

    6. Click Apply.

  8. Log out of the console.

ProcedureTo Point the Web Policy Agents to Load Balancer 5

Modify AMAgent.properties to point Protected Resource 1 and Protected Resource 2 to Load Balancer 5.

  1. As a root user, log in to the ProtectedResource–1 host machine.

  2. Change to the config directory.


    # cd /export/WebPA1/web_agents/sjsws_agent/Agent_001/config
    

    Tip –

    Backup AMAgent.properties before you modify it.


  3. Make the following changes to AMAgent.properties.

    1. Add the following entry:


      com.sun.am.policy.agents.config.fqdn.map =
       valid|LoadBalancer-5.example.com
    2. Append the following to the end of the value string for the com.sun.am.policy.agents.config.notenforced_list property:

      http://ProtectedResource-1.example.com:1080/monitor.html http://LoadBalancer-5.example.com:90/monitor.html

  4. Save the file and close it.

  5. Create a monitor.html file to be used by the load balancer.


    # cd /opt/SUNWwbsvr/https-ProtectedResource-1.example.com/docs
    # cat > monitor.html
    <HTML>
    </HTML>
    
    Hit Control D to terminate the command
    
    ^D
    
  6. Restart Web Server 1 on the Protected Resource 1 host machine.


    # cd /opt/SUNWwbsvr/https-ProtectedResource-1.example.com/bin
    # ./stopserv; ./startserv
    
  7. Log out of the ProtectedResource–1 host machine.

  8. As a root user, log in to the ProtectedResource–2 host machine.

  9. Change to the config directory.


    # cd /export/WebPA2/web_agents/sjsws_agent/Agent_001/config
    
  10. Make the following changes to the AMAgent.properties file.


    Tip –

    Backup AMAgent.properties before you modify it.


    1. Add the following entry:


      com.sun.am.policy.agents.config.fqdn.map =
       valid|LoadBalancer-5.example.com
    2. Append the following to the end of the value string for the com.sun.am.policy.agents.config.notenforced_list property:

      http://ProtectedResource-2.example.com:1080/monitor.html http://LoadBalancer-5.example.com:90/monitor.html

  11. Save the file and close it.

  12. Create a monitor.html file to be used by the load balancer.


    # cd /opt/SUNWwbsvr/https-ProtectedResource-2.example.com/docs
    # cat > monitor.html
    <HTML>
    </HTML>
    
    Hit Control D to terminate the command
    
    ^D
    
  13. Restart Web Server 2 on the Protected Resource 2 host machine.


    # cd /opt/SUNWwbsvr/https-ProtectedResource-2.example.com/bin
    # ./stopserv; ./startserv
    
  14. Log out of the ProtectedResource–2 host machine.

ProcedureTo Configure Policy for the Web Policy Agents Using Access Manager

Use the Access Manager console to configure policy for the Web Policy Agents.

  1. Access the Access Manager server, http://AccessManager-1.example.com:1080/amserver/UI/Login, from a web browser.

  2. Log in to the Access Manager console as the administrator.

    Username

    amadmin

    Password

    4m4dmin1

  3. Modify the referral policy for access to Load Balancer 5.

    1. On the Access Control tab, click the top-level realm example.

    2. Click the Policies tab.

    3. Click the Referral URL Policy for users realm link.

    4. On the Edit Policy page, under Rules, click New.

    5. On the resulting page, select URL Policy Agent (with resource name) and click Next.

      This selection is used to define policies that protect HTTP and HTTPS URLs.

    6. On the resulting page, provide the following information:

      Name:

      URL Rule for LoadBalancer-5

      Resource Name:

      http://LoadBalancer-5.example.com:90/*

    7. Click Finish.

    8. On the resulting page, click Save.

      The new rule is in the Rules list.

  4. Create a policy in the users sub-realm.

    1. On the Access Control tab, click the users link.

    2. Click the Policies tab, and then New Policy.

    3. In the Name field, enter URL Policy for LoadBalancer-5.

    4. Under Rules, click New.

    5. On the resulting page, accept the default URL Policy Agent (with resource name) and click Next.

    6. On the resulting page, provide the following information:

      Name:

      LoadBalancer-5.

      Parent Resource Name:

      In the list, select http://LoadBalancer-5.example.com:90/*.

      Resource Name:

      http://LoadBalancer-5.example.com:90/* is automatically entered when you select the Parent Resource Name.

      GET

      Mark this checkbox and select Allow.

      POST

      Mark this checkbox and select Allow.

    7. Click Finish.

    8. On the New Policy page again, under Subjects, click New.

    9. On the resulting page, verify that Access Manager Identity Subject is selected, and click Next.

    10. On the resulting page, provide the following information:

      Name:

      LoadBalancer-5_Groups

      Filter:

      In the drop-down list, select Group and click Search.

      The search returns a list of available groups.

    11. Select Employee-Group and Manager-Group and click Add.

      The Employee-Group and Manager-Group groups are in the Selected List.

    12. Click Finish.

    13. On the resulting page, click OK.

    The policy you just created is now included in the list of Policies.

  5. Log out of the Access Manager console and close the browser.

ProcedureTo Verify the Web Policy Agents Load Balancer Configuration is Working Properly

  1. Access http://loadbalancer-5.example.com:90/index.html, the Access Manager load balancer, from a web browser.

  2. Log in to the Access Manager console as testuser1.

    Username

    testuser1

    Password

    password

    If the default Web Server index.html page is displayed, the load balancer is configured properly.

  3. Verify that Load Balancer 5 monitors are monitoring the Web Server instances properly.

    1. Log in as a root user to the ProtectedResource–1 host machine.

    2. Run the tail command.


      # cd /opt/SUNWwbsvr/https-ProtectedResource-1.example.com/logs
      # tail -f access
      

      If you see frequent entries similar to the one below, the custom monitor is configured properly.


      IP_address - - [21/Sep/2007:13:59:48 -0700] 
      "GET /monitor.html" 200 15

      If you do not see "GET /monitor.html", you must troubleshoot the load balancer configuration.

    3. Log in as a root user to the ProtectedResource–2 host machine.

    4. Run the tail command.


      # cd /opt/SUNWwbsvr/https-ProtectedResource-2.example.com/logs
      # tail -f access
      

      If you see frequent entries similar to the one below, the custom monitor is configured properly.


      IP_address - - [21/Sep/2007:13:59:48 -0700] 
      "GET /monitor.html" 200 15

      If you do not see "GET /monitor.html", you must troubleshoot the load balancer configuration.

    5. Log out of both Protected Resource host machines after you have verified that the monitors are working properly.