Using two SSO management application objects for one application? Multiple activators per application?

Problem

We have one web application to protect. Is it possible to use two application objects for that one application, so that on the basis of the URL used to access that web application, a different authentication server is used? (E.g., one for internal users, one of external users)

For example

http://customerB.company.com and http://customerA.company.com

or

http://internal.company and http://customerfacingserviceaddress.com

Solution

Note

NOTE:  Virtual hosting is supported and documented using SAML SP for Java. Please refer to the document SAML SP for Java Installation. SAML SP for Java has replaced Web Agent for Java. New installations should always use SAML SP for Java. The steps below are for Web Agent for Java.

Yes, below is a sample server.xml file. It is possible to use different init parameters for each filter. With the example below, the same application can be accessed using different activators.

<?xml version="1.0" encoding="iso-8859-1"?>

<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4">

 

<filter>

  <filter-name>UbiloginFilter1</filter-name>

  <filter-class>com.ubisecure.ubilogin.uwa.UbiloginFilter</filter-class>

  <init-param>

      <param-name>com.ubisecure.ubilogin.uwa</param-name>

      <param-value>/WEB-INF/filter1.activator</param-value>

  </init-param>

  <init-param>

      <param-name>com.ubisecure.ubilogin.uwa.cancel</param-name>

      <param-value>/index.jsp</param-value>

  </init-param>

</filter>

 

<filter>

  <filter-name>UbiloginFilter2</filter-name>

  <filter-class>com.ubisecure.ubilogin.uwa.UbiloginFilter</filter-class>

  <init-param>

      <param-name>com.ubisecure.ubilogin.uwa</param-name>

      <param-value>/WEB-INF/filter2.activator</param-value>

  </init-param>

  <init-param>

      <param-name>com.ubisecure.ubilogin.uwa.cancel</param-name>

      <param-value>/index.jsp</param-value>

  </init-param>

</filter>

 

<filter-mapping>

  <filter-name>UbiloginFilter1</filter-name>

  <url-pattern>/protected.jsp</url-pattern>

</filter-mapping>

 

<filter-mapping>

  <filter-name>UbiloginFilter2</filter-name>

  <url-pattern>/protected2.jsp</url-pattern>

</filter-mapping>

 

<filter-mapping>

  <filter-name>UbiloginFilter1</filter-name>

  <url-pattern>/logout</url-pattern>

</filter-mapping>

 

<filter-mapping>

  <filter-name>UbiloginFilter2</filter-name>

  <url-pattern>/logout2</url-pattern>

</filter-mapping>

 

</web-app>