Deploying and Testing the Fedlet on the SP

There are two options for deploying the Fedlet, see the following for details:

To Install and Configure the Fedlet as a Demo Application

To deploy the Fedlet on the SP, you require the following:

  1. Create a fedlet directory, in the home directory of the user that runs the AM web container:

    $ cd $HOME
    $ mkdir fedlet
  2. Copy the fedlet configuration files to the $HOME/fedlet directory. The result may resemble the following:

    $ cd /Users/tomcat-user/fedlet
    $ ls -A1
      FederationConfig.properties
      fedlet.cot
      idp-extended.xml
      idp.xml
      sp-extended.xml
      sp.xml
  3. Deploy the Fedlet WAR file into your web container:

    $ cp fedlet.war /path/to/tomcat/webapps

    Upon completion, you can proceed to "Testing Fedlet Single Sign-on and Single Logout".

To Embed the Java Fedlet in a Web Application

The Fedlet WAR file, fedlet.war, serves both as an example and also to provide the code needed to embed the Fedlet in your web application.

The basic steps for using the Fedlet in your application are as follows:

  1. Unpack the Fedlet ZIP file to a working directory, remove any files you do not want to keep, such as index.jsp or fedletEncode.jsp, and merge the Fedlet files with those of your web application.

  2. To integrate single sign-on into your application, modify the functionality in the fedletSampleApp.jsp page or add it to your application's logic.

    If you add it to your application's logic, then you must also edit your application's deployment descriptor file, web.xml, to set the assertion consumer URI, which by default is /fedletapplication in the basic SP XML for the Fedlet. Add servlet and servlet-mapping elements as shown in the following example.

    <servlet>
        <servlet-name>yourapplication</servlet-name>
        <jsp-file>/your-application.jsp</jsp-file>
    </servlet>
    <servlet-mapping>
        <servlet-name>yourapplication</servlet-name>
        <url-pattern>/fedletapplication</url-pattern>
    </servlet-mapping>
    
  3. Build a WAR file from your web application with embedded Fedlet files.

    This is the version of the application to deploy. When you deploy your WAR file, also provide the Fedlet configuration files. For information on where to put the configuration files and how to deploy the WAR file with embedded Fedlet, see "To Install and Configure the Fedlet as a Demo Application".

Testing Fedlet Single Sign-on and Single Logout

To test single sign-on and single logout from the Fedlet, go to the Fedlet URL. For example, https://sp.example.com:8443/fedlet.

Try one or more examples from the Fedlet home page:

Home page for demo Fedlet

You can log in to the identity provider with username demo and password Ch4ng31t.

Read a different version of :