If you want to configure the SPS to recognize multiple user agent types, assign different session scheme mappings for those user agents based on virtual hosts, you must follow these steps:
The following excerpts from a server.conf file provide an example where a user agent type has been defined for Internet Explorer (IE) browser users. IE users will be mapped to use session schemes other than the default session scheme defined for a virtual host. The following example shows the session schemes defined in the server.conf file.
#Session Schemes <SessionScheme name="default"> class="com.netegrity.proxy.session.SessionCookieScheme" accepts_smsession_cookies="true" </SessionScheme> <SessionScheme name="ssl_id"> class="com.netegrity.proxy.session.SSLIdSessionScheme" accepts_smsession_cookies="false" </SessionScheme> <SessionScheme name="simple_url"> class="com.netegrity.proxy.session.SimpleURLSessionScheme" accepts_smsession_cookies="false" </SessionScheme> <SessionScheme name="minicookie"> class="com.netegrity.proxy.session.MiniCookieSessionScheme" accepts_smsession_cookies="false" cookie_name="MiniMe" </SessionScheme>
The following example shows the definition of the IE user agent type. This user agent type will be referenced when defining session scheme mappings later in the server.conf file.
# TO-DO: Define Any User Agents, if you want to # use a different session scheme based on # the type of client accessing the server. # # NOTE: UserAgent matching is done in the order # in which the user agents are defined in this file. <UserAgent name="IE"> User-Agent="MSIE" </UserAgent> # <UserAgent name="NS"> # User-Agent=some other regular expression # </UserAgent>
The preceding example shows that the default session scheme specified in the defaultsessionscheme directive is mini-cookie. This session scheme will be used for all transactions unless another session scheme is explicitly included in a session scheme mapping, or another scheme overrides the default session scheme in the definition of a virtual host.
The <VirtualHostDefaults> directive shows the session scheme mapping for the IE user agent type that was defined in <UserAgent name="IE">. This mapping indicates that for all virtual hosts using default session scheme mappings, IE browser users’ sessions will be maintained using the simple URL rewriting sessions scheme.
<VirtualHostDefaults> # Service Dispatcher <ServiceDispatcher> class="com.netegrity.proxy.service.SmProxyRules" rules_file="conf\proxyrules.xml" </ServiceDispatcher> # default session scheme defaultsessionscheme="minicookie" #TO-DO: Define any session scheme mappings <SessionSchemeMappings> # user_agent_name=session_scheme_name IE="simple_url" # NS=simple_url </SessionSchemeMappings>
The Virtual Host directives show the server name and IP address for the default virtual host configured for the SPS.
# Default Virtual Host <VirtualHost name="default"> hostnames="server1, server1.company.com" addresses="192.168.1.10" #The defaults can be overriden #not only for the Virtual Host #but for the WebAgent for that #virtual host as well #<WebAgent> #</WebAgent> </VirtualHost>
The Virtual Host directive for additional virtual host shows the specific default virtual host settings that will be overridden for the server2 virtual host. Notice that these overrides include new session scheme mappings. The default scheme for server2 is default. In Session Scheme directive the default is defined as the traditional SiteMinder cookies session scheme. Further, the session scheme mapping for IE users in Virtual Host directives is also mapped to the default scheme. Therefore, the SPS will use SiteMinder cookies session scheme to maintain sessions for all users who access server2.
# Additional Virtual Host <VirtualHost name="host2"> requestblocksize="4" responseblocksize="4" hostnames="server2, server2.company.com" #addresses="192.168.1.15" # default session scheme defaultsessionscheme="default" #TO-DO: Define any session scheme mappings <SessionSchemeMappings> #user_agent_name=session_scheme_name IE="default" </SessionSchemeMappings> #<WebAgent> #</WebAgent> </VirtualHost>
Copyright © 2011 CA. All rights reserved. | Email CA Technologies about this topic |