ASP.NET Authentication using LTPA and Tivoli Federated Identity Manager (TFIM)

Using TFIM to translate LTPA tokens for authentication to an ASP.NET application.

In this article, we show you how to enable your ASP.NET applications for federated single sign-on utilizing the IBM® Tivoli® Federated Identity Manager (TFIM) 6.1.1.1 to translate LTPA cookies set by IBM WebSphere® Application Server. We show how to create an ASP.NET HTTP module that extracts the LTPA cookie then uses TFIM to translate the token into a username via WS-Trust.Background

Share:

Shane B. Weeden, Senior Software Engineer, IBM Tivoli

Shane WeedenShane Weeden is a senior software engineer with the IBM Tivoli Federated Identity Manager development team. He has worked in IT security since 1992, and since 2000 has been working with Tivoli Security products including Tivoli Access Manager for eBusiness and Tivoli Federated Identity Manager. Shane now divides his time between customer focused engagements and core product development activities. He holds a Bachelor of Information Technology from the University of Queensland in Australia.


developerWorks Professional author
        level

Craig Forster (cforster@au1.ibm.com), Software Engineer, IBM Tivoli

Craig ForsterCraig Forster is a software engineer on the IBM Common Authorization Component team. He joined IBM in 2005 after graduating from the University of Queensland holding a Bachelor of Engineering (Software) with Honours Class 1 and Bachelor of Science (Computer Science).



16 October 2007

Background

This article requires that you are familiar with Tivoli Federated Identity Manager (TFIM) 6.1.1.1 Enterprise, ASP.NET security and WS-Trust. You should be comfortable with configuring a trust chain using the TFIM management console.

Introduction

Lightweight Third-Party Authentication (LPTA) is an IBM-proprietary authentication technology used in WebSphere Application Server and IBM Lotus® Domino®. LTPA works by setting encrypted user authentication information into a string, and then transmitting this string between servers, which contain the keys required to decrypt it. In a Web-based environment the transmission is typically handled with a domain cookie, and in a Web services environment, the transmission is handled by wrapping the encrypted user information string in a WS-Security BinarySecurityToken and including it in a SOAP WS-Security header. The encrypted user information string (LTPA authentication credential) can then be read by other servers with the same authentication configuration. As LTPA uses symmetric key cryptography, part of the authentication configuration is configuring the same shared key. When configured, these servers can then automatically authenticate the user without prompting for login credentials.

ASP.NET applications cannot natively decrypt and use the information inside the LTPA cookies without help from an external service. In this article we show how to use IBM Tivoli Federated Identity Manager 6.1.1.1 to extract the authenticated user's identity in a Web environment using domain cookies, allowing SSO between IBM WebSphere Application Server and ASP.NET web applications. This technique can be easily adapted to also serve Web Services environments.

The protocol used to allow the ASP.NET application and the TFIM server to communicate is WS-Trust. WS-Trust uses the secure messaging mechanisms of WS-Security to allow the secure exchange of tokens between different trust domains. Microsoft provides an implementation of WS-Trust for .NET as part of the Web Services Enhancements (WSE) 3.0. We have wrapped this implementation into a ".NET FIM Trust Client" in order to simplify the interface, and we have used this implementation in the article.


Solution overview

We begin with a simple ASP.NET application using form-based authentication to display information about the logged-on user and the HTTP request. The article describes how to expand the authentication capabilities of this application to include accepting an LTPA cookie generated by IBM WebSphere Application Servers in the same DNS domain.

We modify the ASP.NET application to include a new mechanism for authentication. This mechanism will receive the LTPA cookie and validate it by calling out to Tivoli Federated Identity Manager. The identity asserted in the LTPA cookie will be used to authenticate to ASP.NET.

We use a .NET TFIM Trust Client to create a WS-Trust <BinarySecurityToken> which is exchanged by the TFIM server for a <UsernameToken>. We then use the username in this returned token to set the ASP.NET authentication cookie.

Figure 1. Overall solution architecture
Architecture Diagram
  1. The user accesses an application running on an IBM WebSphere Application Server (http://websphere.example.com).
  2. The WebSphere Application Server authenticates the user and sets a domain LTPA cookie for domain "example.com". The LTPA cookie contains encrypted user information.
  3. The user then accesses an ASP.NET application running on an IIS server in the same DNS domain (http://asp.example.com).
  4. The ASP.NET application uses the configured HTTP module to extract the LTPA cookie and send it to the TFIM server for validation.
  5. The TFIM server validates the LTPA token and returns a <UsernameToken> to the ASP.NET HTTP module.
  6. The ASP.NET HTTP module extracts the username from the <UsernameToken> and uses it for login

In the ASP.NET environment this authentication has the same effect as if the user had logged onto the application locally with a username and password. A session cookie is established for the user session, and the authenticated user can proceed to use the application.

This article will not cover use of the TFIM management console to configure the required trust chain. This is standard product behaviour that is a pre-requisite to this article.


Validating LTPA tokens using Tivoli Federated Identity Manager

In order to authenticate to the ASP.NET application, we need to transform the LTPA cookie into data that identifies the user. The LTPA cookie contains encrypted information, part of which is the authenticated username, therefore, we need to decrypt the cookie in order to extract this information. We use TFIM for this purpose, where the exchange is done as part of a WS-Trust token exchange operation.

Validating a token using WS-Trust involves sending the token, along with identifying information, to the TFIM Trust Service in a <RequestSecurityToken> message. The LTPA data is included as a <BinarySecurityToken>. The Trust Service is configured with the information necessary to decrypt the LTPA data, and issues a <UsernameToken> in a <RequestSecurityTokenResponse>.

Any token type can be issued from the TFIM Trust Service, not just the <UsernameToken> that we focus on in this article. For example, the Trust Service can be configured to issue SAML tokens. Tokens such as SAML allow the inclusion of user attribute information as well as authentication data, and the TFIM Trust Chain allows these attributes to be retrieved from external data sources. By using TFIM to exchange the LTPA token for a "local authentication token", user identity and attribute mapping can take place external to the application, and can be shared between multiple applications.

This article leverages a Trust Client based on WSE 3.0 that is written specifically to interoperate with TFIM. This trust client establishes a connection to the TFIM Trust Service, and handles all aspects of the WS-Trust token validation and exchange. During normal runtime operation, users of this trust client will call SendToken which takes a SecurityToken as a parameter and returns a Security Token. The TFIM Trust Client also provides an implementation of the .NET BinarySecurityToken class that we can use to create a SecurityToken containing our LTPA data.

Below is an example of the RequestSecurityToken and RequestSecurityTokenResponse, with the relevant security tokens highlighted.

Listing 1. WS-Trust message request
<wst:RequestSecurityToken xmlns:wst="http://schemas.xmlsoap.org/ws/2005/02/trust">
  <wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Validate</wst:RequestType>
  <wsp:AppliesTo xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
    <wsa:EndpointReference xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
      <wsa:Address>
        http://appliesto/ut
      </wsa:Address>
    </wsa:EndpointReference>
  </wsp:AppliesTo>
  <wst:Lifetime>
    <wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/ \
          oasis-200401-wss-wssecurity-utility-1.0.xsd">
      2007-05-25T10:16:32Z
    </wsu:Expires>
  </wst:Lifetime>
  <wst:Issuer>
    <wsa:Address xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
      http://issuer/ltpa
    </wsa:Address>
  </wst:Issuer>
  <wst:Base>
    ****** REQUEST SECURITY TOKEN ******
    <wsse:BinarySecurityToken 
      ValueType="wsst:LTPAv2" 
      EncodingType="http://docs.oasis-open.org/wss/2004/01/ \
          oasis-200401-wss-soap-message-security-1.0#Base64Binary" 
      xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/ \
          oasis-200401-wss-wssecurity-utility-1.0.xsd" 
      wsu:Id="SecurityToken-de6c4e13-1e5d-493e-99ab-11cd29786990" 
      xmlns:wsst="http://www.ibm.com/websphere/appserver/tokentype" 
      xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/ \
          oasis-200401-wss-wssecurity-secext-1.0.xsd">
PjlTMdkTM+wmXVEgWftVSxFwgI9VMJrX7E5NLb7uZ8eIJjJu8UbjUSyLjQkmy8Ty4ADxphL0uwpMixmV0g9z6H4M
/QljibP7G6HoGwGHzwhBb9kSw2haAu1jqDR464kNw6k6ltyMqa2TPTlRv3dSQtYLKA2icuOpVZbdtJ3
YStO8hmV/jSW9Srn9a/Shmtvsy2ioY9XLRHUeTrbTiC5vS7Tr7jVtt7cQ8bByYQWIpAicbUNbl7Szs8
KzGu3YLQeIIELBjMzAy8set2SMqvsGON2a+67vBOrK/fJWxhHwdvVNo/SHkGDxwLUMnbJFBuwI1sB9F
C2zdTCdV1m2qkNLSDrnoq16xR9DUMacwZfpQe5T/BQaI7T8fk6dGtLDtaLyScxIgDes09zqlsJ07Hk/
z25GSluI0c+xG4UiV8RBcYISsDim3ctmXl5mrFWYANTx9swxt9xecJg8XxzsI6GYtB+rl1cSWi69gqr
/bw7gohmOSMfgNSCH/TNYrgywbZr2ELolq9aRH4bqWF6Z9H7gNn3k8HFre7NGgHiK+pUSoJ6NKSEdqI
Dj+gH0EYe4iDKMZ/yInnp7CcA/YNDgYCO+gk9HeUG7E3kvVzkTEeeQ9pZap6TMTO/WICA6DWPo9ni0D
5fsQAt9cupjO0FNG9LDMw==
    </wsse:BinarySecurityToken>
    ****** END TOKEN ******
  </wst:Base>
</wst:RequestSecurityToken>
Listing 2. WS-Trust message response
<wst:RequestSecurityTokenResponse
  wsu:Id="uuidc1e33769-0112-1735-97e4-d4048103371d" 
  xmlns:wst="http://schemas.xmlsoap.org/ws/2005/02/trust" 
  xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/ \
      oasis-200401-wss-wssecurity-utility-1.0.xsd">
  <wst:RequestedSecurityToken>
    ****** RESPONSE SECURITY TOKEN ******
    <wss:UsernameToken
      wsu:Id="usernamec1e33768-0112-1622-94c7-d4048103371d" 
      xmlns:wss="http://docs.oasis-open.org/wss/2004/01/ \
          oasis-200401-wss-wssecurity-secext-1.0.xsd" 
      xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/ \
          oasis-200401-wss-wssecurity-utility-1.0.xsd">
      <wss:Username>cn=wasadmin,o=ibm,c=au</wss:Username>
      <wss:Nonce 
        EncodingType="http://docs.oasis-open.org/wss/2004/01/ \
            oasis-200401-wss-soap-message-security-1.0#Base64Binary">
          EYwGA+FKLJycIkprkdJr8A==
      </wss:Nonce>
      <wsu:Created>2007-05-25T06:18:52Z</wsu:Created>
    </wss:UsernameToken>
    ****** END TOKEN ******
  </wst:RequestedSecurityToken>
  <wst:RequestedAttachedReference xmlns:wss="http://docs.oasis-open.org/wss/2004/01/ \
        oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <wss:SecurityTokenReference>
      <wss:Reference 
        URI="#usernamec1e33768-0112-1622-94c7-d4048103371d" 
        ValueType="http://docs.oasis-open.org/wss/2004/01/ \
            oasis-200401-wss-username-token-profile-1.0#UsernameToken" 
        xmlns:wss="http://docs.oasis-open.org/wss/2004/01/ \
            oasis-200401-wss-wssecurity-secext-1.0.xsd" />
    </wss:SecurityTokenReference>
  </wst:RequestedAttachedReference>
  <wst:Status>
    <wst:Code>http://schemas.xmlsoap.org/ws/2005/02/trust/status/valid</wst:Code>
  </wst:Status>
</wst:RequestSecurityTokenResponse>

Contact the authors for more information on the availability of the LTPA token module for TFIM 6.1.1.

In the returned <wss:UsernameToken> the Username parameter is returned in the form of a fully-qualified DN, exactly as it is specified in the LTPA data. This is counter-intuitive in a .NET environment, where applications typically expect an unqualified user ID. To fix this issue, we have included a custom piece of XSL in TFIM mapping that extracts the user ID from the fully-qualified DN.

Listing 3. XSL mapping module
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  version="1.0" xmlns:stsuuser="urn:ibm:names:ITFIM:1.0:stsuuser"> 
  <xsl:strip-space elements="*" /> 
  <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes" /> 
  <!--  Initially we start with a copy of the document. --> 
  <xsl:template match="@* | node()">  
    <xsl:copy>
      <xsl:apply-templates select="@* | node()" />
    </xsl:copy>
  </xsl:template>
  <!--   This will prepare the principal name's type for UT issue. -->
  <xsl:template match="//stsuuser:Principal/stsuuser:Attribute[@name='name']">
    <xsl:variable name="username" 
      select="//stsuuser:Principal/stsuuser:Attribute[@name='name']/stsuuser:Value" />
    <stsuuser:Attribute name="name" type="http://docs.oasis-open.org/wss/2004/01/ \
      oasis-200401-wss-wssecurity-secext-1.0.xsd">
      <stsuuser:Value>
        <xsl:value-of select="substring-before(substring-after($username,'uid='),',')"/>
      </stsuuser:Value>           
    </stsuuser:Attribute>
  </xsl:template>
</xsl:stylesheet>

Once this mapping stylesheet is used, the returned UsernameToken no longer contains the fully-qualified user name.


The sample application

This article borrows the sample application from another developerWorks article on Tivoli Federated Identity Manager and .NET integration: http://www-128.ibm.com/developerworks/tivoli/library/t-tfimbg-asp/.

The sample application is a simple Web application that displays information about the current user's session. The standard ASP.NET authentication API is used to authenticate the user, and authentication is initially achieved using forms-based log in.


The LTPA authentication HTTP module

Now that we have our test application, we need to go about modifying it to accept the LTPA cookie set by an IBM WebSphere Application Server. As described above, we use the WS-Trust protocol to communicate with TFIM and exchange the encrypted LTPA string (contained in a domain cookie) for a username. We can then create a session in ASP.NET for this user. Listing 4 shows the psuedo-code representation of what we want to do in order to authenticate the user.

Listing 4. Authentication module pseudo-code
  if the request is not already authenticated
    if an LTPA cookie is set
      create a BinarySecurityToken containing the appropriate attributes and cookie data
      send the created token to the TFIM Trust Service
      extract the username from the returned token

      authenticate the user represented by "username" to ASP.NET
      specify that the ASP.NET authentication cookie for the user should be set
          in the response from IIS
      redirect the user to the currently requested location to set the authentication
          cookie in the browser
    end if
  end if

As a part of the ASP.NET architecture, HTTP modules allow third-party modules to be called at various points in the ASP.NET processing cycle (events). HTTP modules can register to be invoked at the AuthenticateRequest event. An HTTP module that registers for this event will be called when the ASP.NET environment is attempting to authenticate the user making the request. For those readers familiar with WebSphere® development, this model is very similar to the concept of WebSphere Trust Association Interceptors. We will develop an HTTP module called "FIMLTPAAuthenticationModule", which will exchange the LTPA cookie for a UsernameToken and use it to authenticate a user into ASP.NET.

Listing 5 shows the code of the finished IHttpModule implementation.

Listing 5. Authentication module implementation
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Collections;
using Microsoft.Web.Services3.Security.Tokens;
using System.Web.Security;
using IBM.Tivoli.FIM.TrustClient;
using IBM.Tivoli.FIM.TrustClient.Tokens;
using System.Diagnostics;
using Microsoft.Web.Services3.Security;
using System.Xml;
using System.Security.Principal;
using System.IO;
using System.Xml.Serialization;
using System.Configuration;

namespace IBM.Tivoli.SOA.Web
{
    /**
     * FIMLTPAAuthenticationModule is a class that implements the IHttpModule 
     * interface to provide LTPA authentication an ASP.NET application.  This 
     * module uses the FIM Trust Service to validate the LTPA token and 
     * exchange it for a username token.
     */ 
    public class FIMLTPAAuthenticationModule : IHttpModule
    {
        private static string MODULE_NAME = "LTPAAuthModule";
        private static string LTPA_V1_COOKIE_NAME = "LtpaToken";
        private static string LTPA_V2_COOKIE_NAME = "LtpaToken2";

        private static string LTPA_V1_TOKEN_VALUE = "wsst:LTPA";
        private static string LTPA_V2_TOKEN_VALUE = "wsst:LTPAv2";

        private static string NAMESPACE_ATTRIBUTE = "xmlns:wsst";
        private static string LTPA_V1_NAMESPACE = 
            "http://www.ibm.com/websphere/appserver/tokentype/5.0.1";
        private static string LTPA_V2_NAMESPACE = 
            "http://www.ibm.com/websphere/appserver/tokentype";

        private static string CONFIG_FIM_SERVER = "fimStsUrl";
        private static string CONFIG_FIM_ISSUER = "fimIssuer";
        private static string CONFIG_FIM_APPLIES_TO = "fimAppliesTo";

        FIMTrustClient trustClient;

        private XmlDocument xmlDoc = new XmlDocument();

        public FIMLTPAAuthenticationModule():base()
        {
            string uri = System.Configuration.ConfigurationManager.AppSettings.Get(
                CONFIG_FIM_SERVER);
            string issuer = System.Configuration.ConfigurationManager.AppSettings.Get(
                CONFIG_FIM_ISSUER);
            string appliesTo = System.Configuration.ConfigurationManager.AppSettings.Get(
                CONFIG_FIM_APPLIES_TO);

            trustClient = FIMTrustClientFactory.createTrustClient(
                new Uri(uri), issuer, appliesTo); 
        }

        #region IHttpModule Members

        public void Dispose() {  }

        public void Init(HttpApplication context)
        {
            context.AuthenticateRequest += new EventHandler(
                this.Application_OnAuthenticateRequest);
        }

        public string ModuleName
        {
            get
            {
                return MODULE_NAME;
            }
        }

        #endregion

        private void Application_OnAuthenticateRequest(object sender, System.EventArgs e)
        {
            HttpApplication app = (HttpApplication)sender;
            HttpContext ctx = app.Context;

            //If we aren't already authenticated
            if (!ctx.Request.IsAuthenticated)
            {
                SimpleBinarySecurityToken requestToken = null;

                //Extract the LTPA cookie
                HttpCookie ltpaCookie = ctx.Request.Cookies.Get(LTPA_V2_COOKIE_NAME);
                if (ltpaCookie != null)
                {
                    //Create a binary security token.
                    requestToken = new SimpleBinarySecurityToken(LTPA_V2_TOKEN_VALUE, 
                        WSSecurity.EncodingTypes.Base64Encoding,ltpaCookie.Value);
                    requestToken.setAttribute( NAMESPACE_ATTRIBUTE, LTPA_V2_NAMESPACE);
                }
                else
                {
                    ltpaCookie = ctx.Request.Cookies.Get(LTPA_V1_COOKIE_NAME);
                    if (ltpaCookie != null)
                    {
                        requestToken = new SimpleBinarySecurityToken(LTPA_V1_TOKEN_VALUE, 
                            WSSecurity.EncodingTypes.Base64Encoding, ltpaCookie.Value);
                        requestToken.setAttribute(NAMESPACE_ATTRIBUTE,LTPA_V1_NAMESPACE);
                    }
                }

                //If we have an LTPA token, then swap it for a usable token
                // using the TFIM STS
                if (ltpaCookie != null)
                {
                    //Call TFIM
                    try
                    {
                        SecurityToken response = trustClient.SendToken(requestToken);
                        if (response != null)
                        {
                            string username = null;

                            if (response is UsernameToken)
                            {
                                UsernameToken responseToken = (UsernameToken)response;

                                //Extract the user name from the Token
                                username = responseToken.Username;
                            }

                            if (username != null)
                            {
                                //Get a string serialization of our SecurityToken
                                XmlElement tokenElem = response.GetXml(xmlDoc);
                                string serializedToken = tokenElem.OuterXml;

                                //Set our UserData to be the serialized token
                                FormsAuthenticationTicket ticket = new 
                                    FormsAuthenticationTicket(1, username, 
                                    DateTime.Now, DateTime.Now.AddHours(3), false,
                                    serializedToken);

                                string encryptedTicket = 
                                    FormsAuthentication.Encrypt(ticket);

                                //Set the Forms authentication cookie
                                HttpCookie authCookie = new HttpCookie(
                                    FormsAuthentication.FormsCookieName, encryptedTicket);
                                ctx.Response.Cookies.Add(authCookie);

                                //Redirect
                                ctx.Response.Redirect(
                                    FormsAuthentication.GetRedirectUrl(username, false));
                            }
                        }
                    }
                    catch (FIMTrustClientException exception)
                    {
                        //Log an error, don't proceed with login
                        app.Context.Trace.Warn("FIMLTPAAuthenticationModule",
                            "An exception occurred while exchanging token. Details: "
                            + exception.Message);
                    }
                }
            }
        }
    }
}

Notice that as part of setting the authentication cookie, we serialize the received SecurityToken and place it in the authentication ticket. This allows the application to access the token when the user has logged in. While this is of limited usefulness when the received token is a UsernameToken, the same method can be utilized when a token containing more information (such as a SAML assertion) is returned from the Trust Service and used to authenticate to ASP.NET.

The following screenshot shows the test application after the user has logged in via an LTPA cookie. The "UserData" section contains the received SecurityToken.

Figure 2. Application post-login
Screenshot

Integrating the LTPA authentication HTTP module into the ASP.NET application

The next step is to integrate the LTPA HTTP module into the sample application. We recommend three steps for the enablement:

  1. Modify the application's Web.config file to use the LTPA authentication HTTP module.
  2. Configure the details for the TFIM Trust Client
  3. Bypass the default .NET user name authentication

Adding the HttpModule

The use of HTTP modules within the ASP.NET application is controlled by the httpModules configuration. This configuration section can be defined at the computer, site, or application level. The httpModules configuration defined at higher levels will be inherited by lower levels.

In our illustration, we only enable our sample application for federated single sign-on (not other applications hosted in the environment). We add the LTPA authentication module into the httpModules configuration section for the application's Web.Config only. Listing 6 shows both the httpModules configuration section and its position within the Web.Config file.

Configuring the TFIM Trust Service

In order to use the TFIM Trust Client, the HTTP module needs the following parameters:

Table 1. Configuration parameters required to pass to the TFIM Trust Client
Configuration parameterDescription
fimStsUrlThe full URL of the TFIM Trust Service, for example http://fim.example.com:9080/TrustServer/SecurityTokenService
fimIssuerThe <Issuer> value that the TFIM Trust Client will use for outgoing <RequestSecurityToken> messages.
fimAppliesToThe <AppliesTo> value that the TFIM Trust Client will use for outgoing <RequestSecurityToken> messages.

These values must be placed in the appSettings, with each parameter as a separate key.

Bypassing user name authentication

The default configuration of WSE 3.0 in .NET attempts to authenticate users received in UsernameToken values as part of a RequestSecurityTokenResponse. This behaviour is undesirable for our application for two reasons:

  1. We want to trust the user name returned from the TFIM Trust Service.
  2. It requires the password, or a password digest, to be present in the returned token.

In order to bypass this authentication mechanism, we provide an implementation of the UsernameTokenManager called TrustedUsernameTokenManager. This class is configured in the Web.config as per Listing 6.

Overall Web.Config

The following shows the overall layout of the Web.config file, with each of the sections outlined above.

Listing 6. Application Web.config file
<?xml version="1.0"?>
<configuration>
    ...
    <microsoft.web.services3>
        <security>
          <securityTokenManager>
            <add namespace="http://docs.oasis-open.org/wss/2004/01/ \
                oasis-200401-wss-wssecurity-secext-1.0.xsd" 
              localName="UsernameToken" 
              type="IBM.Tivoli.FIM.TrustClient.Tokens.TrustedUsernameTokenManager, \
                  FIMTrustClient" />
          </securityTokenManager>
        </security>
    </microsoft.web.services3>
    ...
    <appSettings>
        <add key="fimStsUrl" 
            value="http://[host]:[port]/TrustServer/SecurityTokenService" />
        <add key="fimAppliesTo" value="[AppliesTo]" />
        <add key="fimIssuer" value="[Issuer]" />
    </appSettings>
    ...
    <httpModules>
        <add type="IBM.Tivoli.SOA.Web.FIMLTPAAuthenticationModule, \
           FIMLTPAAuthenticationModule"
           name="LTPAAuthModule"/>
    </httpModules>
    ...
  </system.web>
<configuration>

The syntax for adding an HTTP module into the application's configuration is <add type="[Class],[Assembly]" name="[ModuleName]" />. In Listing 5, we specified that our class was called FIMLTPAAuthenticationModule and it was defined in the IBM.Tivoli.SOA.Web namespace, therefore the [Class] we specify is IBM.Tivoli.SOA.Web.FIMLTPAAuthenticationModule. The [Assembly] is the name of the CLR assembly that our class is defined in. This is the name of the Dynamic Link Library (DLL) file that the [Class] is found in. In the sample projects, we have compiled the FIMLTPAAuthenticationModule module into the FIMLTPAAuthenticationModule.dll file, so this is the value used for the [Assembly]. When defined as part of the application configuration, the ASP.NET environment attempts to locate the assembly in the Global Assembly Cache or in the bin subdirectory of the application. Our example uses the FIM LTPA authentication module in the application's bin subdirectory.


Downloads

DescriptionNameSize
The LTPA Authentication HTTP module for ASP.NEThttpmodule.zip10KB
The sample application used in this article.sampleapp.zip50KB
The TFIM Trust Client for .NETfimtrustclient.zip50KB

Resources

Learn

Get products and technologies

  • Download IBM product evaluation versions and get application development tools and middleware products from DB2®, Lotus®, Rational®, Tivoli®, and WebSphere®.

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Security on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Security, Tivoli
ArticleID=257794
ArticleTitle=ASP.NET Authentication using LTPA and Tivoli Federated Identity Manager (TFIM)
publish-date=10162007