incubator-stonehenge-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bende...@apache.org
Subject svn commit: r888424 - in /incubator/stonehenge/trunk/stocktrader/dotnet: business_service/BusinessServiceConsole/ business_service/BusinessServiceImplementation/ common/BasicClient/ common/StockTraderUtility/ identity_provider/ActiveStsConsole/ identit...
Date Tue, 08 Dec 2009 15:06:05 GMT
Author: bendewey
Date: Tue Dec  8 15:06:03 2009
New Revision: 888424

URL: http://svn.apache.org/viewvc?rev=888424&view=rev
Log:
JIRA: STONEHENGE-109
Updated StockTrader dotnet for use with WIF-RC, Thanks
Submitted by: Pablo Cibraro

Added:
    incubator/stonehenge/trunk/stocktrader/dotnet/common/StockTraderUtility/SimpleIssuerNameRegistry.cs
    incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsImplementation/CustomUsernameTokenHandler.cs
Modified:
    incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceConsole/App.config
    incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceConsole/BusinessServiceConsole.csproj
    incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceConsole/Program.cs
    incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceImplementation/BusinessServiceImplementation.csproj
    incubator/stonehenge/trunk/stocktrader/dotnet/common/BasicClient/BasicClient.cs
    incubator/stonehenge/trunk/stocktrader/dotnet/common/BasicClient/BasicClient.csproj
    incubator/stonehenge/trunk/stocktrader/dotnet/common/StockTraderUtility/Utility.csproj
    incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsConsole/ActiveStsConsole.csproj
    incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsConsole/App.config
    incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsConsole/Program.cs
    incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsImplementation/ActiveStsImplementation.csproj
    incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsImplementation/CustomSecurityTokenService.cs
    incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/App_Code/CustomSecurityTokenService.cs
    incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/App_Code/CustomSecurityTokenServiceConfiguration.cs
    incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/Default.aspx
    incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/Default.aspx.cs
    incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/web.config
    incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorConsoleServiceHost/App.config
    incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BSLClient.cs
    incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BusinessServiceClient.cs
    incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BusinessServiceClient.csproj
    incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Site.master
    incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Web.config

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceConsole/App.config
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceConsole/App.config?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceConsole/App.config (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceConsole/App.config Tue Dec  8 15:06:03 2009
@@ -47,21 +47,20 @@
     <add key="LOGIN_ITERATIONSTO_DISPLAY" value="5" />
     <!--Can't be ZERO-->
     <add key="DISPLAYNUMBERORDERITERATIONS" value="3" />
-    <!--Can't be ZERO-->
-    <add key="CS_DOTNET_ENDPOINT_CONFIG_HTTP" value="ConfigClient_DotNet_BasicHttpBinding"/>
-    <add key="DOTNET_OPS" value="OpsClient_DotNet_BasicHttpBinding" />
-    <add key="DOTNET_OPSSEC" value="OpsClient_DotNet_WsHttpBinding_MSec" />
-    <add key="METRO_OPS" value="OpsClient_Metro_BasicHttpBinding" />
-    <add key="METRO_OPSSEC" value="OpsClient_Metro_WsHttpBinding_MSec" />
-    <add key="PHP_OPS" value="OpsClient_PHP_BasicHttpBinding" />
-    <add key="PHP_OPSSEC" value="OpsClient_PHP_WsHttpBinding_MSec" />
-    <add key="JAVA_OPS" value="OpsClient_WSAS_BasicHttpBinding" />
-    <add key="JAVA_OPSSEC" value="OpsClient_WSAS_WsHttpBinding_MSec" />
+    <!--Endpoint mappings-->
+    <add key="CS_DOTNET_ENDPOINT_CONFIG_HTTP" value="ConfigClient_BasicHttpBinding"/>
+    <add key="DOTNET_OPS" value="OpsClient_BasicHttpBinding" />
+    <add key="DOTNET_OPSSEC" value="OpsClient_WsHttpBinding_MSec" />
+    <add key="METRO_OPS" value="OpsClient_BasicHttpBinding" />
+    <add key="METRO_OPSSEC" value="OpsClient_WsHttpBinding_MSec" />
+    <add key="PHP_OPS" value="OpsClient_BasicHttpBinding" />
+    <add key="PHP_OPSSEC" value="OpsClient_WsHttpBinding_MSec" />
+    <add key="JAVA_OPS" value="OpsClient_BasicHttpBinding" />
+    <add key="JAVA_OPSSEC" value="OpsClient_WsHttpBinding_MSec" />
+    
     <add key="ClientSettingsProvider.ServiceUri" value="" />
     <add key="BS_LABEL" value="DOTNET_BS"/>
 
-    <add key="FederationMetadataLocation" value="http://localhost/StonehengeSTS/FederationMetadata/2007-06/FederationMetadata.xml"/>
-
   </appSettings>
   <runtime>
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
@@ -95,6 +94,9 @@
     Config Service BS Service
     
     *********************************************************-->
+    <diagnostics>
+      <messageLogging logMalformedMessages="true" logMessagesAtTransportLevel="true" logEntireMessage="true"  logMessagesAtServiceLevel="true"/>
+    </diagnostics>
     <services>
       <service name="Trade.BusinessServiceImplementation.TradeServiceWcf"
                behaviorConfiguration="BsHost_ServiceBehavior">
@@ -119,45 +121,24 @@
       <endpoint address="http://localhost:7000/tradeconfigservice"
                 contract="Trade.ConfigServiceContract.IConfigService"
                 binding="basicHttpBinding"
-                name="ConfigClient_DotNet_BasicHttpBinding" />
-
-      <!--<endpoint address="http://apps.stonehenge.com:1316/config_service/ConfigService"
-                contract="Trade.ConfigServiceContract.IConfigService"
-                binding="basicHttpBinding"
-                name="ConfigClient_DotNet_BasicHttpBinding" />-->
+                name="ConfigClient_BasicHttpBinding" />
 
       <!-- DotNet OPS Endpoints -->
       <endpoint address="http://localhost:8000/tradeorderprocessor"
                 contract="Trade.OrderProcessorContract.IOrderProcessor"
                 binding="basicHttpBinding" bindingConfiguration="OpsClient_BasicHttpBinding"
-                name="OpsClient_DotNet_BasicHttpBinding" />
+                name="OpsClient_BasicHttpBinding" />
 
       <endpoint address="http://localhost:8000/tradeorderprocessor/msec"
                 contract="Trade.OrderProcessorContract.IOrderProcessor"
                 binding="wsHttpBinding" bindingConfiguration="OpsClient_WsHttpBinding_MSec"
-                behaviorConfiguration="OpsClient_DotNet_CertificateBehavior"
-                name="OpsClient_DotNet_WsHttpBinding_MSec">
+                behaviorConfiguration="OpsClient_CertificateBehavior"
+                name="OpsClient_WsHttpBinding_MSec">
         <identity>
           <dns value="OPS.Com"/>
         </identity>
       </endpoint>
 
-      <!-- Metro OPS Endpoints -->
-      <endpoint address="http://apps.stonehenge.com:1316/order_processor/OrderProcessor"
-                contract="Trade.OrderProcessorContract.IOrderProcessor"
-                binding="basicHttpBinding" bindingConfiguration="OpsClient_BasicHttpBinding"
-                name="OpsClient_Metro_BasicHttpBinding" />
-
-      <endpoint address="http://apps.stonehenge.com:1316/order_processor/OrderProcessorSec"
-               contract="Trade.OrderProcessorContract.IOrderProcessor"
-               binding="wsHttpBinding" bindingConfiguration="OpsClient_WsHttpBinding_MSec"
-               behaviorConfiguration="OpsClient_DotNet_CertificateBehavior"
-               name="OpsClient_Metro_WsHttpBinding_MSec">
-        <identity>
-          <dns value="OPS.Com"/>
-        </identity>
-      </endpoint>
-      
     </client>
 
     
@@ -221,7 +202,6 @@
           <serviceThrottling maxConcurrentInstances="400" maxConcurrentCalls="400" maxConcurrentSessions="100" />
           
           <serviceCredentials>
-            <!--<serviceCertificate findValue="CN=BSL.Com" x509FindType="FindBySubjectDistinguishedName" storeLocation="LocalMachine" storeName="TrustedPeople" />-->
             <serviceCertificate findValue="CN=OPS.Com" x509FindType="FindBySubjectDistinguishedName" storeLocation="LocalMachine" storeName="TrustedPeople" />
           </serviceCredentials>
         </behavior>
@@ -229,7 +209,7 @@
 
       <!-- Begin the OPS Client Service Behaviors -->
       <endpointBehaviors>
-        <behavior name="OpsClient_DotNet_CertificateBehavior">
+        <behavior name="OpsClient_CertificateBehavior">
           <clientCredentials>
             <clientCertificate findValue="BSL.Com" x509FindType="FindBySubjectName" storeLocation="LocalMachine" storeName="TrustedPeople" />
             <serviceCertificate>
@@ -244,4 +224,31 @@
     
   </system.serviceModel>
 
+  <!--<system.diagnostics>
+    <sources>
+      <source name="System.ServiceModel.MessageLogging" switchValue="All, ActivityTracing">
+        <listeners>
+          <add name="messaging"></add>
+        </listeners>
+      </source>
+      <source name="System.ServiceModel" switchValue="Warning, ActivityTracing"
+        propagateActivity="true">
+        <listeners>
+          <add name="serviceModel"></add>
+        </listeners>
+      </source>
+    </sources>
+    <sharedListeners>
+      <add initializeData="app_messages.svclog"
+        type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
+        name="serviceModel" traceOutputOptions="Timestamp">
+      </add>
+      <add initializeData="app_tracelog.svclog"
+        type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
+        name="messaging" traceOutputOptions="Timestamp">
+      </add>
+    </sharedListeners>
+    <trace autoflush="true"></trace>
+  </system.diagnostics>-->
+
 </configuration>

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceConsole/BusinessServiceConsole.csproj
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceConsole/BusinessServiceConsole.csproj?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceConsole/BusinessServiceConsole.csproj (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceConsole/BusinessServiceConsole.csproj Tue Dec  8 15:06:03 2009
@@ -60,13 +60,19 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Microsoft.IdentityModel, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
+    <Reference Include="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5\Microsoft.IdentityModel.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Configuration" />
     <Reference Include="System.Core">
       <RequiredTargetFramework>3.5</RequiredTargetFramework>
     </Reference>
     <Reference Include="System.Data" />
+    <Reference Include="System.IdentityModel">
+      <RequiredTargetFramework>3.0</RequiredTargetFramework>
+    </Reference>
     <Reference Include="System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\..\..\..\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\System.Runtime.Serialization.dll</HintPath>

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceConsole/Program.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceConsole/Program.cs?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceConsole/Program.cs (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceConsole/Program.cs Tue Dec  8 15:06:03 2009
@@ -98,6 +98,7 @@
 
                 // Configure the service host to use the Geneva Framework
                 ServiceConfiguration configuration = new ServiceConfiguration();
+                configuration.AudienceRestriction.AudienceMode = System.IdentityModel.Selectors.AudienceUriMode.BearerKeyOnly;
                 configuration.IssuerNameRegistry = new SimpleIssuerNameRegistry();
 
                 FederatedServiceCredentials.ConfigureServiceHost(serviceHost, configuration);

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceImplementation/BusinessServiceImplementation.csproj
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceImplementation/BusinessServiceImplementation.csproj?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceImplementation/BusinessServiceImplementation.csproj (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/business_service/BusinessServiceImplementation/BusinessServiceImplementation.csproj Tue Dec  8 15:06:03 2009
@@ -44,7 +44,10 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Microsoft.IdentityModel, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
+    <Reference Include="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5\Microsoft.IdentityModel.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.configuration" />
     <Reference Include="System.Core">

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/common/BasicClient/BasicClient.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/common/BasicClient/BasicClient.cs?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/common/BasicClient/BasicClient.cs (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/common/BasicClient/BasicClient.cs Tue Dec  8 15:06:03 2009
@@ -103,10 +103,6 @@
             if (useClaims)
             {
                 channelFactory.ConfigureChannelFactory();
-
-                
-
-
             }
 
             return channelFactory;
@@ -160,18 +156,19 @@
             T returnChannel = default(T);
             try
             {
-                ReadOnlyCollection<SecurityToken> bootstrapTokens = null;
                 SecurityToken callerToken = null;
 
                 IClaimsPrincipal claimsPrincipal = Thread.CurrentPrincipal as IClaimsPrincipal;
                 if (claimsPrincipal != null)
                 {
-                    bootstrapTokens = claimsPrincipal.GetBootstrapTokens();
-                }
-                // We expect only one token to be specified during Bootstrap.
-                if ((bootstrapTokens != null) && (bootstrapTokens.Count == 1))
-                {
-                    callerToken = bootstrapTokens[0];
+                    foreach (IClaimsIdentity claimsIdentity in claimsPrincipal.Identities)
+                    {
+                        if (claimsIdentity.BootstrapToken is SamlSecurityToken)
+                        {
+                            callerToken = claimsIdentity.BootstrapToken;
+                            break;
+                        }
+                    }
                 }
 
                 returnChannel = channelFactory.CreateChannelActingAs(callerToken);
@@ -296,7 +293,7 @@
         {
         }
 
-        protected Client(string clientConfig, string url, string userName, string password, bool useClaims)
+        public Client(string clientConfig, string url, string userName, string password, bool useClaims)
         {
             if (!connectionDictionary.TryGetValue(typeof(T).FullName, out _connection))
             {

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/common/BasicClient/BasicClient.csproj
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/common/BasicClient/BasicClient.csproj?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/common/BasicClient/BasicClient.csproj (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/common/BasicClient/BasicClient.csproj Tue Dec  8 15:06:03 2009
@@ -41,7 +41,10 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Microsoft.IdentityModel, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
+    <Reference Include="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5\Microsoft.IdentityModel.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.configuration" />
     <Reference Include="System.Core">

Added: incubator/stonehenge/trunk/stocktrader/dotnet/common/StockTraderUtility/SimpleIssuerNameRegistry.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/common/StockTraderUtility/SimpleIssuerNameRegistry.cs?rev=888424&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/common/StockTraderUtility/SimpleIssuerNameRegistry.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/common/StockTraderUtility/SimpleIssuerNameRegistry.cs Tue Dec  8 15:06:03 2009
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.IdentityModel.Tokens;
+using System.IdentityModel.Tokens;
+
+namespace Trade.Utility
+{
+    public class SimpleIssuerNameRegistry : IssuerNameRegistry
+    {
+        public override string GetIssuerName(SecurityToken securityToken)
+        {
+            if (securityToken is X509SecurityToken)
+            {
+                return ((X509SecurityToken)securityToken).Certificate.Subject;
+            }
+
+            throw new ApplicationException("The issue name can not be resolved");
+        }
+    }
+}

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/common/StockTraderUtility/Utility.csproj
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/common/StockTraderUtility/Utility.csproj?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/common/StockTraderUtility/Utility.csproj (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/common/StockTraderUtility/Utility.csproj Tue Dec  8 15:06:03 2009
@@ -45,6 +45,10 @@
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="Accessibility" />
+    <Reference Include="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5\Microsoft.IdentityModel.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.configuration" />
     <Reference Include="System.Core">
@@ -71,6 +75,7 @@
     <Compile Include="Loggers\EventViewerLogger.cs" />
     <Compile Include="Loggers\ILogger.cs" />
     <Compile Include="Loggers\NullLogger.cs" />
+    <Compile Include="SimpleIssuerNameRegistry.cs" />
     <Compile Include="SQLHelper.cs" />
     <Compile Include="Utility.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsConsole/ActiveStsConsole.csproj
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsConsole/ActiveStsConsole.csproj?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsConsole/ActiveStsConsole.csproj (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsConsole/ActiveStsConsole.csproj Tue Dec  8 15:06:03 2009
@@ -31,7 +31,10 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Microsoft.IdentityModel, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
+    <Reference Include="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5\Microsoft.IdentityModel.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.configuration" />
     <Reference Include="System.Core">

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsConsole/App.config
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsConsole/App.config?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsConsole/App.config (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsConsole/App.config Tue Dec  8 15:06:03 2009
@@ -2,7 +2,7 @@
 <configuration>
   <configSections>
     <!-- Registers the microsoft.IdentityModel configuration section -->
-    <section name="microsoft.identityModel" type="Microsoft.IdentityModel.Configuration.MicrosoftIdentityModelSection, Microsoft.IdentityModel, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
+    <section name="microsoft.identityModel" type="Microsoft.IdentityModel.Configuration.MicrosoftIdentityModelSection, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
   </configSections>
 
   <appSettings>
@@ -11,8 +11,8 @@
     <add key="LOGGING_ENABLED" value="ON"/>
 
     <add key="IssuerName" value="ActiveSTS" />
-    <add key="SigningCertificateName" value="CN=BSL.Com" />
-    <add key="EncryptingCertificateName" value="CN=BSL.Com" />
+    <add key="SigningCertificateName" value="CN=OPS.Com" />
+    <add key="EncryptingCertificateName" value="CN=OPS.Com" />
     <add key="PassiveIssuerName" value="PassiveSTS"/>
   </appSettings>
 
@@ -21,21 +21,25 @@
       <!--An ActAs handlers will be required to support delegation -->
       <securityTokenHandlers name="ActAs">
         <clear/>
-        <add type="Microsoft.IdentityModel.Tokens.Saml11.Saml11SecurityTokenHandler, Microsoft.IdentityModel, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
+        <add type="Microsoft.IdentityModel.Tokens.Saml11.Saml11SecurityTokenHandler, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
       </securityTokenHandlers>
-      <issuerNameRegistry type="Microsoft.IdentityModel.Tokens.SimpleIssuerNameRegistry, Microsoft.IdentityModel, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
+      <issuerNameRegistry type="Microsoft.IdentityModel.Tokens.ConfigurationBasedIssuerNameRegistry, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
+        <trustedIssuers>
+          <add thumbprint="FA0F58BB605FA43369E279E8F9088872FDE09943" name="CN=OPS.Com" />
+        </trustedIssuers>
+      </issuerNameRegistry>
     </service>
   </microsoft.identityModel>
   
   <system.serviceModel>
     <bindings>
-      <ws2007HttpBinding>
+      <customBinding>
         <binding name="ActiveSTS">
-          <security mode="Message">
-            <message clientCredentialType="Certificate" negotiateServiceCredential="false" establishSecurityContext="false"/>
-          </security>
+          <security authenticationMode="UserNameForCertificate" requireDerivedKeys="false" defaultAlgorithmSuite="Basic128" messageSecurityVersion="WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10"/>
+          <textMessageEncoding messageVersion="Soap12WSAddressing10"/>
+          <httpTransport/>
         </binding>
-      </ws2007HttpBinding>
+      </customBinding>
     </bindings>
     <behaviors>
       <serviceBehaviors>
@@ -44,22 +48,53 @@
             <clientCertificate>
               <authentication revocationMode="NoCheck" certificateValidationMode="None"/>
             </clientCertificate>
-            <serviceCertificate findValue="CN=BSL.Com" storeLocation="LocalMachine" storeName="TrustedPeople" x509FindType="FindBySubjectDistinguishedName" />
+            <serviceCertificate findValue="CN=OPS.Com" storeLocation="LocalMachine" storeName="TrustedPeople" x509FindType="FindBySubjectDistinguishedName" />
           </serviceCredentials>
+          
         </behavior>
       </serviceBehaviors>
     </behaviors>
     
     <services>
       <service name="Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract" behaviorConfiguration="ActiveSTS">
-        <endpoint bindingConfiguration="ActiveSTS" 
-                  binding="ws2007HttpBinding"
-                  contract="Microsoft.IdentityModel.Protocols.WSTrust.IWSTrust13SyncContract">
+        <endpoint bindingConfiguration="ActiveSTS"
+                  binding="customBinding"
+                  contract="Microsoft.IdentityModel.Protocols.WSTrust.IWSTrust13SyncContract"
+                  name="ISecurityTokenService_Port">
         </endpoint>
       </service>
     </services>
+
+    <diagnostics>
+      <messageLogging logMalformedMessages="true" logMessagesAtTransportLevel="true" logEntireMessage="true"  logMessagesAtServiceLevel="true"/>
+    </diagnostics>
   </system.serviceModel>
 
-  
+  <!--<system.diagnostics>
+    <sources>
+      <source name="System.ServiceModel.MessageLogging" switchValue="All, ActivityTracing">
+        <listeners>
+          <add name="messaging"></add>
+        </listeners>
+      </source>
+      <source name="System.ServiceModel" switchValue="Warning, ActivityTracing"
+        propagateActivity="true">
+        <listeners>
+          <add name="serviceModel"></add>
+        </listeners>
+      </source>
+    </sources>
+    <sharedListeners>
+      <add initializeData="app_messages.svclog"
+        type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
+        name="serviceModel" traceOutputOptions="Timestamp">
+      </add>
+      <add initializeData="app_tracelog.svclog"
+        type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
+        name="messaging" traceOutputOptions="Timestamp">
+      </add>
+    </sharedListeners>
+    <trace autoflush="true"></trace>
+  </system.diagnostics>-->
 
 </configuration>

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsConsole/Program.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsConsole/Program.cs?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsConsole/Program.cs (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsConsole/Program.cs Tue Dec  8 15:06:03 2009
@@ -33,11 +33,10 @@
                 //string passiveIssuerName = ConfigurationManager.AppSettings["PassiveIssuerName"];
 
                 SecurityTokenServiceConfiguration config = new SecurityTokenServiceConfiguration(issuerName);
-
+                config.SecurityTokenHandlers.AddOrReplace(new CustomUsernameTokenHandler());
                 config.SecurityTokenService = typeof(CustomSecurityTokenService);
                 SecurityTokenHandlerCollection actAsHandlerCollection = config.SecurityTokenHandlerCollectionManager[SecurityTokenHandlerCollectionManager.Usage.ActAs];
 
-                //actAsHandlerCollection.Configuration.IssuerNameRegistry = new CustomIssuerNameRegistry(passiveIssuerName);
                 actAsHandlerCollection.Configuration.AudienceRestriction.AudienceMode = AudienceUriMode.Never;
 
                 string shortHostName = System.Net.Dns.GetHostName();

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsImplementation/ActiveStsImplementation.csproj
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsImplementation/ActiveStsImplementation.csproj?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsImplementation/ActiveStsImplementation.csproj (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsImplementation/ActiveStsImplementation.csproj Tue Dec  8 15:06:03 2009
@@ -31,7 +31,10 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Microsoft.IdentityModel, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
+    <Reference Include="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5\Microsoft.IdentityModel.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.configuration" />
     <Reference Include="System.Core">
@@ -54,6 +57,7 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="CustomSecurityTokenService.cs" />
+    <Compile Include="CustomUsernameTokenHandler.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
   <ItemGroup>

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsImplementation/CustomSecurityTokenService.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsImplementation/CustomSecurityTokenService.cs?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsImplementation/CustomSecurityTokenService.cs (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsImplementation/CustomSecurityTokenService.cs Tue Dec  8 15:06:03 2009
@@ -87,17 +87,17 @@
             if (request.ActAs != null)
             {
                 IClaimsIdentity actAsIdentity = new ClaimsIdentity();
-                CopyClaims(request.ActAs.Subject[0], actAsIdentity);
+                CopyClaims(request.ActAs.GetSubject().First(), actAsIdentity);
 
                 // Find the last delegate in the actAs identity
                 IClaimsIdentity lastActingVia = actAsIdentity;
-                while (lastActingVia.Delegate != null)
+                while (lastActingVia.Actor != null)
                 {
-                    lastActingVia = lastActingVia.Delegate;
+                    lastActingVia = lastActingVia.Actor;
                 }
 
                 // Put the caller's identity as the last delegate to the ActAs identity
-                lastActingVia.Delegate = outputIdentity;
+                lastActingVia.Actor = outputIdentity;
 
                 // Return the actAsIdentity instead of the caller's identity in this case
                 outputIdentity = actAsIdentity;

Added: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsImplementation/CustomUsernameTokenHandler.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsImplementation/CustomUsernameTokenHandler.cs?rev=888424&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsImplementation/CustomUsernameTokenHandler.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/ActiveStsImplementation/CustomUsernameTokenHandler.cs Tue Dec  8 15:06:03 2009
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.IdentityModel.Tokens;
+using Microsoft.IdentityModel.Claims;
+using System.IdentityModel.Tokens;
+using System.Xml;
+
+namespace Trade.ActiveStsImplementation
+{
+    public class CustomUsernameTokenHandler : WindowsUserNameSecurityTokenHandler 
+    {
+        public override Microsoft.IdentityModel.Claims.ClaimsIdentityCollection ValidateToken(System.IdentityModel.Tokens.SecurityToken token)
+        {
+            UserNameSecurityToken untoken = token as UserNameSecurityToken;  
+            if(untoken == null){  
+              throw new SecurityTokenException("Invalid token");  
+            }  
+
+            Claim nameClaim = new Claim(System.IdentityModel.Claims.ClaimTypes.Name, untoken.UserName);  
+            IClaimsIdentity ident = new ClaimsIdentity(new List<Claim> { nameClaim });  
+            ident.Claims.Add(  
+	                    new Claim("http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationinstant",   
+ 	                        XmlConvert.ToString(DateTime.UtcNow, "yyyy-MM-ddTHH:mm:ss.fffZ"), "http://www.w3.org/2001/XMLSchema#dateTime")  
+ 	                );  
+            ident.Claims.Add(  
+	                    new Claim("http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod",   
+ 	                        "http://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/password")  
+	                );  
+
+            return new ClaimsIdentityCollection(new IClaimsIdentity[] { ident });
+        }
+    }
+}

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/App_Code/CustomSecurityTokenService.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/App_Code/CustomSecurityTokenService.cs?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/App_Code/CustomSecurityTokenService.cs (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/App_Code/CustomSecurityTokenService.cs Tue Dec  8 15:06:03 2009
@@ -41,6 +41,7 @@
 using Microsoft.IdentityModel.Protocols.WSTrust;
 using Microsoft.IdentityModel.SecurityTokenService;
 using Trade.PassiveStsModelClasses;
+using System.Xml;
 
 /// <summary>
 /// A custom SecurityTokenService implementation.
@@ -102,10 +103,15 @@
         Scope scope = new Scope( request.AppliesTo.Uri.AbsoluteUri, SecurityTokenServiceConfiguration.SigningCredentials );
 
         string encryptingCertificateName = WebConfigurationManager.AppSettings[ "EncryptingCertificateName" ];
-        if ( !string.IsNullOrEmpty( encryptingCertificateName ) )
+        if (!string.IsNullOrEmpty(encryptingCertificateName))
         {
             scope.EncryptingCredentials = new X509EncryptingCredentials(
-                CertificateUtil.GetCertificate( StoreName.TrustedPeople, StoreLocation.LocalMachine, encryptingCertificateName ) );
+                CertificateUtil.GetCertificate(StoreName.TrustedPeople, StoreLocation.LocalMachine, encryptingCertificateName));
+        }
+        else
+        {
+            scope.TokenEncryptionRequired = false;
+            scope.SymmetricKeyEncryptionRequired = false;
         }
 
         // Set the ReplyTo address for the WS-Federation passive protocol (wreply). This is the address to which responses will be directed. 
@@ -122,29 +128,33 @@
     /// <param name="principal">The caller's principal</param>
     /// <param name="request">The incoming RST, we don't use this in our implementation</param>
     /// <returns>The outgoing claimsIdentity to be included in the issued token.</returns>
-    protected override IClaimsIdentity GetOutputClaimsIdentity( IClaimsPrincipal principal, RequestSecurityToken request, Scope scope )
+    /// <summary>
+    /// This method returns the claims to be issued in the token.
+    /// </summary>
+    /// <param name="scope">The scope information corresponding to this request.</param>
+    /// <param name="principal">The caller's principal</param>
+    /// <param name="request">The incoming RST, we don't use this in our implementation</param>
+    /// <returns>The outgoing claimsIdentity to be included in the issued token.</returns>
+    protected override IClaimsIdentity GetOutputClaimsIdentity(IClaimsPrincipal principal, RequestSecurityToken request, Scope scope)
     {
-        ClaimsIdentity outputIdentity = new ClaimsIdentity();
-
-        if ( null == principal )
+        if (null == principal)
         {
-            throw new InvalidRequestException( "The caller's principal is null." );
+            throw new InvalidRequestException("The caller's principal is null.");
         }
 
         AccountDataModel account = (AccountDataModel)HttpContext.Current.Session["UserInfo"];
 
-        if (account != null)
-        {
-            outputIdentity.Claims.Add(new Claim(System.IdentityModel.Claims.ClaimTypes.PPID, account.profileID.ToString()));
-        }
-       
+        ClaimsIdentity outputIdentity = new ClaimsIdentity("passive", System.IdentityModel.Claims.ClaimTypes.NameIdentifier, "http://microsoft/role");
+
+        Claim nameIdentifier = new Claim(System.IdentityModel.Claims.ClaimTypes.NameIdentifier, account.profileID.ToString() + "@stonehenge.com");
+        nameIdentifier.Properties["http://schemas.xmlsoap.org/ws/2005/05/identity/claimproperties/format"] = "http://schemas.xmlsoap.org/claims/UPN";
+
+        outputIdentity.Claims.Add(nameIdentifier);
+        outputIdentity.Claims.Add(new Claim("http://microsoft/role", "staff"));
+        outputIdentity.Claims.Add(new Claim(ClaimTypes.AuthenticationMethod, "http://microsoft/geneva"));
+        outputIdentity.Claims.Add(new Claim(ClaimTypes.AuthenticationInstant, XmlConvert.ToString(DateTime.Now, XmlDateTimeSerializationMode.Utc)));
         return outputIdentity;
     }
 
-    public override RequestSecurityTokenResponse Cancel(IClaimsPrincipal principal, RequestSecurityToken request)
-    {
-        //return new RequestSecurityTokenResponse();
-        
-        return base.Cancel(principal, request);
-    }
+    
 }

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/App_Code/CustomSecurityTokenServiceConfiguration.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/App_Code/CustomSecurityTokenServiceConfiguration.cs?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/App_Code/CustomSecurityTokenServiceConfiguration.cs (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/App_Code/CustomSecurityTokenServiceConfiguration.cs Tue Dec  8 15:06:03 2009
@@ -34,21 +34,55 @@
 
 using Microsoft.IdentityModel.Configuration;
 using Microsoft.IdentityModel.SecurityTokenService;
+using System.Web;
 
 /// <summary>
 /// A custom SecurityTokenServiceConfiguration implementation.
 /// </summary>
 public class CustomSecurityTokenServiceConfiguration : SecurityTokenServiceConfiguration
 {
+    private static readonly object syncRoot = new object();
+    private const string CustomSecurityTokenServiceConfigurationKey = "CustomSecurityTokenServiceConfigurationKey";
+
     /// <summary>
     /// CustomSecurityTokenServiceConfiguration constructor.
     /// </summary>
     public CustomSecurityTokenServiceConfiguration()
-        : base( WebConfigurationManager.AppSettings[Common.IssuerName],
-                new X509SigningCredentials( CertificateUtil.GetCertificate(
-                    StoreName.TrustedPeople, StoreLocation.LocalMachine,
-                    WebConfigurationManager.AppSettings[Common.SigningCertificateName] ) ) )
+        : base(
+            WebConfigurationManager.AppSettings[Common.IssuerName],
+            new X509SigningCredentials(CertificateUtil.GetCertificate(StoreName.TrustedPeople, StoreLocation.LocalMachine, WebConfigurationManager.AppSettings[Common.SigningCertificateName])))
+    {
+        this.SecurityTokenService = typeof(CustomSecurityTokenService);
+    }
+
+    /// <summary>
+    /// Provides a model for creating a single Configuration object for the application. The first call creates a new CustomSecruityTokenServiceConfiguration and 
+    /// places it into the current HttpApplicationState using the key "CustomSecurityTokenServiceConfigurationKey". Subsequent calls will return the same
+    /// Configuration object.  This maintains any state that is set between calls and improves performance.
+    /// </summary>
+    public static CustomSecurityTokenServiceConfiguration Current
     {
-        this.SecurityTokenService = typeof( CustomSecurityTokenService );
+        get
+        {
+            HttpApplicationState httpAppState = HttpContext.Current.Application;
+
+            CustomSecurityTokenServiceConfiguration customConfiguration = httpAppState.Get(CustomSecurityTokenServiceConfigurationKey) as CustomSecurityTokenServiceConfiguration;
+
+            if (customConfiguration == null)
+            {
+                lock (syncRoot)
+                {
+                    customConfiguration = httpAppState.Get(CustomSecurityTokenServiceConfigurationKey) as CustomSecurityTokenServiceConfiguration;
+
+                    if (customConfiguration == null)
+                    {
+                        customConfiguration = new CustomSecurityTokenServiceConfiguration();
+                        httpAppState.Add(CustomSecurityTokenServiceConfigurationKey, customConfiguration);
+                    }
+                }
+            }
+
+            return customConfiguration;
+        }
     }
 }

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/Default.aspx
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/Default.aspx?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/Default.aspx (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/Default.aspx Tue Dec  8 15:06:03 2009
@@ -1,6 +1,5 @@
 <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="Trade.PassiveStsWeb._Default" ValidateRequest="true" %>
 <%@ OutputCache Location="None" %>
-<%@ Register assembly="Microsoft.IdentityModel,  Version=0.6.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="Microsoft.IdentityModel.Web.Controls" tagprefix="idfx" %>
 <% /* 
 Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
@@ -40,19 +39,6 @@
         Text="Login to the STS"></asp:Label>
 &nbsp;<br />    
 <p>
-
-    <idfx:FederatedPassiveTokenService ID="FederatedPassiveTokenService1" 
-            runat="server" ServiceConfiguration="CustomSecurityTokenServiceConfiguration" Visible="false">
-        </idfx:FederatedPassiveTokenService>
-        
-    You are logged with this user: <asp:Label ID="lblUser" runat="server"></asp:Label>
-   </p>
-   <p> 
-    <asp:Button runat="server" Text="Click here to got a new token" 
-          ID="Renew" onclick="Renew_Click"/>&nbsp; <asp:Button runat="server" 
-           Text="Click here to log in with another user" ID="Logout" 
-           onclick="Logout_Click" />
-    </p>
 </form>
 </body>
 </html>

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/Default.aspx.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/Default.aspx.cs?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/Default.aspx.cs (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/Default.aspx.cs Tue Dec  8 15:06:03 2009
@@ -18,6 +18,10 @@
 using System.Web.UI;
 using System.Web.Security;
 using System;
+using Microsoft.IdentityModel.Protocols.WSFederation;
+using Microsoft.IdentityModel.SecurityTokenService;
+using Microsoft.IdentityModel.Web;
+using System.Globalization;
 
 namespace Trade.PassiveStsWeb
 {
@@ -26,27 +30,52 @@
     /// </summary>
     public partial class _Default : Page
     {
-        protected void Page_Load(object sender, EventArgs e)
+
+        /// <summary>
+        /// Performs WS-Federation Passive Protocol processing. 
+        /// </summary>
+        protected void Page_PreRender(object sender, EventArgs e)
         {
+            string action = Request.QueryString[WSFederationConstants.Parameters.Action];
 
-            if (!Page.IsPostBack)
+            try
             {
-                if (Page.User.Identity.IsAuthenticated)
+                if (action == WSFederationConstants.Actions.SignIn)
+                {
+                    // Process signin request.
+                    SignInRequestMessage requestMessage = (SignInRequestMessage)WSFederationMessage.CreateFromUri(Request.Url);
+                    if (User != null && User.Identity != null && User.Identity.IsAuthenticated)
+                    {
+                        SecurityTokenService sts = new CustomSecurityTokenService(CustomSecurityTokenServiceConfiguration.Current);
+                        SignInResponseMessage responseMessage = FederatedPassiveSecurityTokenServiceOperations.ProcessSignInRequest(requestMessage, User, sts);
+                        FederatedPassiveSecurityTokenServiceOperations.ProcessSignInResponse(responseMessage, Response);
+                    }
+                    else
+                    {
+                        throw new UnauthorizedAccessException();
+                    }
+                }
+                else if (action == WSFederationConstants.Actions.SignOut)
                 {
-                    lblUser.Text = Page.User.Identity.Name;
+                    // Process signout request.
+                    SignOutRequestMessage requestMessage = (SignOutRequestMessage)WSFederationMessage.CreateFromUri(Request.Url);
+                    FederatedPassiveSecurityTokenServiceOperations.ProcessSignOutRequest(requestMessage, User, requestMessage.Reply, Response);
+                }
+                else
+                {
+                    throw new InvalidOperationException(
+                        String.Format(CultureInfo.InvariantCulture,
+                                       "The action '{0}' (Request.QueryString['{1}']) is unexpected. Expected actions are: '{2}' or '{3}'.",
+                                       String.IsNullOrEmpty(action) ? "<EMPTY>" : action,
+                                       WSFederationConstants.Parameters.Action,
+                                       WSFederationConstants.Actions.SignIn,
+                                       WSFederationConstants.Actions.SignOut));
                 }
             }
+            catch (Exception exception)
+            {
+                throw new Exception("An unexpected error occurred when processing the request. See inner exception for details.", exception);
+            }
         }
-
-        protected void Renew_Click(object sender, System.EventArgs e)
-        {
-            FederatedPassiveTokenService1.Visible = true;
-        }
-        protected void Logout_Click(object sender, System.EventArgs e)
-        {
-            FormsAuthentication.SignOut();
-
-            Response.Redirect(Request.Url.ToString());
-        }
-}
+    }
 }

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/web.config
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/web.config?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/web.config (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveSts/web.config Tue Dec  8 15:06:03 2009
@@ -40,8 +40,8 @@
 	</configSections>
 	<appSettings>
   <add key="IssuerName" value="PassiveSTS" />
-  <add key="SigningCertificateName" value="CN=Trade.Com" />
-  <add key="EncryptingCertificateName" value="CN=Trade.Com" />
+  <add key="SigningCertificateName" value="CN=BSL.Com" />
+  <add key="EncryptingCertificateName" value="" />
   <add key="DAL" value="Trade.PassiveStsDalSqlServer" />
   <add key="SqlConnection" value="server=localhost;initial catalog=StockTraderDB;User=trade;Password=yyy" />
   <add key="LOGGER_MODE" value="CONSOLE"/>
@@ -64,13 +64,11 @@
         during development.
     -->
 		<compilation debug="true">
-			<assemblies>
-				<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
-				<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
-				<add assembly="Microsoft.IdentityModel, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
-				<add assembly="Microsoft.IdentityModel.Tools.VS, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
-				<add assembly="Microsoft.IdentityModel.WindowsTokenService, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
-				<add assembly="Microsoft.IdentityModel.Tools.FedUtil, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies>
+      <assemblies>
+        <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
+        <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
+        <add assembly="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
+      </assemblies>
 		</compilation>
 		<!--
         The <authentication> section enables configuration 

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorConsoleServiceHost/App.config
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorConsoleServiceHost/App.config?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorConsoleServiceHost/App.config (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorConsoleServiceHost/App.config Tue Dec  8 15:06:03 2009
@@ -33,7 +33,7 @@
     <add key="ENABLE_GLOBAL_SYSTEM_DOT_TRANSACTIONS_CONFIGSTRING" value="true" />
     <add key="SYSTEMDOTTRANSACTION_TIMEOUT" value="30" />
     <add key="DISPLAYNUMBERORDERITERATIONS" value="3" />
-    <add key="CS_DOTNET_ENDPOINT_CONFIG_HTTP" value="ConfigClient_DotNet_BasicHttpBinding"/>
+    <add key="CS_DOTNET_ENDPOINT_CONFIG_HTTP" value="ConfigClient_BasicHttpBinding"/>
     <add key="OPS_LABEL" value="DOTNET_OPS"/>
 
     <!--Possible values for logger mode: CONSOLE, EVENT_VIEWER-->
@@ -85,13 +85,10 @@
       <endpoint address="http://localhost:7000/tradeconfigservice"
           contract="Trade.ConfigServiceContract.IConfigService"
           binding="basicHttpBinding"
-          name="ConfigClient_DotNet_BasicHttpBinding" />
+          name="ConfigClient_BasicHttpBinding" />
     </client>
-    
     <bindings>
-     
       <basicHttpBinding>
-        
         <binding name="OpsHost_BasicHttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:30:00" sendTimeout="00:1:00" allowCookies="true" bypassProxyOnLocal="true" hostNameComparisonMode="StrongWildcard" maxBufferSize="1048576" maxBufferPoolSize="10485768" maxReceivedMessageSize="1048576" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
           <readerQuotas maxDepth="512" maxStringContentLength="262144" maxArrayLength="262144" maxBytesPerRead="65536" maxNameTableCharCount="262144" />
           <security mode="None">
@@ -99,11 +96,8 @@
             <message clientCredentialType="Certificate" algorithmSuite="Default" />
           </security>
         </binding>
-      
       </basicHttpBinding>
-      
       <wsHttpBinding>
-       
         <binding name="OpsHost_WsHttpBinding_MSec">
           <security mode="Message">
             <message clientCredentialType="Certificate" negotiateServiceCredential="false" establishSecurityContext="false"/>
@@ -124,12 +118,7 @@
             </clientCertificate>
           </serviceCredentials>
         </behavior>
-        
       </serviceBehaviors>
     </behaviors>
-   
   </system.serviceModel>
-  
-  
-  
 </configuration>

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BSLClient.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BSLClient.cs?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BSLClient.cs (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BSLClient.cs Tue Dec  8 15:06:03 2009
@@ -43,6 +43,8 @@
 
         private readonly ITradeServices BSL;
 
+        
+
         /// <summary>
         /// Creating an Instance of BSLClient initializes the WCF Business Service from Config
         /// </summary>

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BusinessServiceClient.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BusinessServiceClient.cs?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BusinessServiceClient.cs (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BusinessServiceClient.cs Tue Dec  8 15:06:03 2009
@@ -82,16 +82,10 @@
             //service based on the info in the CLIENTTOBS table i.e. the row with DOTNET_CLIENT
             try
             {
-                //if (clientConfig.BSName.Equals(Settings.BS_LABEL))
-                //{
-                //    bslclient = new Client.Client<ITradeServices>(ConfigurationManager.AppSettings.Get(clientConfig.BSName), clientConfig.BS);
-                //}
-                //else
-                //{
-                //    bslclient = new Client.Client<ITradeServices>(ConfigurationManager.AppSettings.Get(clientConfig.BSName), clientConfig.BS, Settings.BSL_USERID, Settings.BSL_PASSWORD);
-                //}
+                if (ConfigurationManager.AppSettings.Get(clientConfig.BSName) == null)
+                    throw new Exception(string.Format("The WCF endpoint for {0} was not defined in the configuration", clientConfig.BSName));
 
-                bslclient = new Client.Client<ITradeServices>(ConfigurationManager.AppSettings.Get(clientConfig.BSName), clientConfig.BS, true);
+                bslclient = new Client.Client<ITradeServices>(ConfigurationManager.AppSettings.Get(clientConfig.BSName), clientConfig.BS, Settings.BSL_USERID, Settings.BSL_PASSWORD, true);
             }
             catch
             {
@@ -134,6 +128,9 @@
         {
             try
             {
+                if (userID == null)
+                    userID = GetDefaultUserId();
+
                 return this.Channel.login(userID, password);
             }
             catch 
@@ -151,6 +148,9 @@
         {
             try
             {
+                if (userID == null)
+                    userID = GetDefaultUserId();
+                
                 return this.Channel.getOrders(userID);
             }
             catch 
@@ -168,6 +168,10 @@
         {
             try
             {
+                if (userID == null)
+                    userID = GetDefaultUserId();
+
+
                 return this.Channel.getAccountData(userID);
             }
             catch 
@@ -185,7 +189,9 @@
         {
             try
             {
-                
+                if (userID == null)
+                    userID = GetDefaultUserId();
+
                 return this.Channel.getAccountProfileData(userID);
             }
             catch
@@ -221,7 +227,9 @@
         {
             try
             {
-                
+                if (userID == null)
+                    userID = GetDefaultUserId();
+
                 this.Channel.logout(userID);
             }
             catch
@@ -242,7 +250,9 @@
         {
             try
             {
-                
+                if (userID == null)
+                    userID = GetDefaultUserId();
+
                 return this.Channel.buy(userID, symbol, quantity, orderProcessingMode);
             }
             catch
@@ -262,7 +272,9 @@
         {
             try
             {
-                
+                if (userID == null)
+                    userID = GetDefaultUserId();
+
                 return this.Channel.sell(userID, holdingID, orderProcessingMode);
             }
             catch
@@ -280,7 +292,9 @@
         {
             try
             {
-                
+                if (userID == null)
+                    userID = GetDefaultUserId();
+
                 return this.Channel.getHoldings(userID);
             }
             catch
@@ -322,7 +336,9 @@
         {
             try
             {
-                
+                if (userID == null)
+                    userID = GetDefaultUserId();
+
                 return this.Channel.getClosedOrders(userID);
             }
             catch
@@ -376,7 +392,9 @@
         {
             try
             {
-                
+                if (userID == null)
+                    userID = GetDefaultUserId();
+
                 return this.Channel.getHolding(userID, holdingID);
             }
             catch
@@ -394,7 +412,9 @@
         {
             try
             {
-                
+                if (userID == null)
+                    userID = GetDefaultUserId();
+
                 return this.Channel.getTopOrders(userID);
             }
             catch
@@ -414,6 +434,8 @@
         {
             try
             {
+                if (userID == null)
+                    userID = GetDefaultUserId();
                 
                 return this.Channel.sellEnhanced(userID, holdingID, quantity);
             }
@@ -450,5 +472,14 @@
             Client.Client<ITradeServices>.ClearCache();
         }
 
+        /// <summary>
+        /// TODO: Hack for metro
+        /// </summary>
+        /// <returns></returns>
+        private string GetDefaultUserId()
+        {
+            return Settings.BSL_USERID;
+        }
+
     }
 }
\ No newline at end of file

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BusinessServiceClient.csproj
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BusinessServiceClient.csproj?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BusinessServiceClient.csproj (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BusinessServiceClient.csproj Tue Dec  8 15:06:03 2009
@@ -68,7 +68,10 @@
     <Content Include="stocktrader.snk" />
   </ItemGroup>
   <ItemGroup>
-    <Reference Include="Microsoft.IdentityModel, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
+    <Reference Include="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5\Microsoft.IdentityModel.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.configuration" />
     <Reference Include="System.Core">

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Site.master
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Site.master?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Site.master (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Site.master Tue Dec  8 15:06:03 2009
@@ -1,5 +1,5 @@
 <%@ Master Language="C#" AutoEventWireup="true" CodeFile="Site.master.cs" Inherits="Site" %>
-<%@ Register assembly="Microsoft.IdentityModel, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="Microsoft.IdentityModel.Web.Controls" tagprefix="idfx" %>
+<%@ Register assembly="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="Microsoft.IdentityModel.Web.Controls" tagprefix="idfx" %>
 <%@ Register TagPrefix="controls" TagName="ConfigurationDisplay" Src="~/Controls/ConfigurationDisplay.ascx" %>
 <% /* 
  

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Web.config
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Web.config?rev=888424&r1=888423&r2=888424&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Web.config (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Web.config Tue Dec  8 15:06:03 2009
@@ -25,7 +25,7 @@
 -->
 <configuration>
   <configSections>
-    <section name="microsoft.identityModel" type="Microsoft.IdentityModel.Configuration.MicrosoftIdentityModelSection, Microsoft.IdentityModel, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
+    <section name="microsoft.identityModel" type="Microsoft.IdentityModel.Configuration.MicrosoftIdentityModelSection, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
   </configSections>
   <appSettings>
     <!--Possible values for logger mode: CONSOLE, EVENT_VIEWER-->
@@ -37,16 +37,16 @@
     <add key="DISPLAY_DUPLICATE_KEY_EXCEPTIONS" value="true"/>
     <add key="CHECK_ORDER_ALERT_EVERY_REQUEST" value="true"/>
     <add key="ORDER_ALERT_CHECK_FREQUENCY" value="30"/>
-    <add key="CS_DOTNET_ENDPOINT_CONFIG_HTTP" value="ConfigClient_DotNet_BasicHttpBinding"/>
-    <add key="DOTNET_BS" value="BsClient_DotNet_FederatedBinding"/>
-    <add key="DOTNET_BSSEC" value="BsClient_DotNet_FederatedBinding"/>
-    <add key="PHP_BS" value="BsClient_PHP_BasicHttpBinding"/>
-    <add key="JAVA_BS" value="BsClient_WSAS_BasicHttpBinding"/>
-    <add key="BSL_USERID" value="bsloperationuser"/>
-    <add key="BSL_PASSWORD" value="yyy"/>
+    <add key="CS_DOTNET_ENDPOINT_CONFIG_HTTP" value="ConfigClient_BasicHttpBinding"/>
+    <add key="BSL_USERID" value="uid:0"/>
+    <add key="BSL_PASSWORD" value="xxx"/>
     <add key="CLIENT_LABEL" value="DOTNET_CLIENT"/>
     <add key="BS_LABEL" value="DOTNET_BS"/>
     <add key="OPS_LABEL" value="DOTNET_OPS"/>
+
+    <!--Endpoint mappings-->
+    <add key="DOTNET_BS" value="BsClient_FederatedBinding"/>
+    <add key="METRO_BS" value="BsClient_FederatedBinding"/>
     
   </appSettings>
   <runtime>
@@ -63,7 +63,9 @@
    -->
   <system.serviceModel>
     <!--This enables the WCF ServiceModel performance counters for this application.-->
-    <diagnostics performanceCounters="All"></diagnostics>
+    <diagnostics>
+      <messageLogging logMalformedMessages="true" logMessagesAtTransportLevel="true" logEntireMessage="true"  logMessagesAtServiceLevel="true"/>
+    </diagnostics>
     <!--********************************************************
         
     Config Service BS Clients
@@ -71,22 +73,21 @@
     *********************************************************-->
     <client>
       <!-- DotNet Config Endpoints -->
-      <endpoint address="http://localhost:7000/tradeconfigservice" contract="Trade.ConfigServiceContract.IConfigService" binding="basicHttpBinding" name="ConfigClient_DotNet_BasicHttpBinding"/>
-      
+      <endpoint address="http://localhost:7000/tradeconfigservice" contract="Trade.ConfigServiceContract.IConfigService" binding="basicHttpBinding" name="ConfigClient_BasicHttpBinding"/>
+
       <!-- DotNet Clients  -->
       <endpoint address="http://localhost:9000/tradebusinessservice"
                 contract="Trade.BusinessServiceContract.ITradeServices"
                 binding="customBinding"
-                bindingConfiguration="BsClient_DotNet_FederatedBinding"
-                behaviorConfiguration="BsClient_DotNet_FederatedBehavior"
-                name="BsClient_DotNet_FederatedBinding">
+                bindingConfiguration="BsClient_FederatedBinding"
+                behaviorConfiguration="BsClient_FederatedBehavior"
+                name="BsClient_FederatedBinding">
         <identity>
-          <dns value="BSL.Com"/>
+          <dns value="OPS.Com"/>
         </identity>
       </endpoint>
-
     </client>
-    
+
     <!--********************************************************
         
     Config Service BINDINGS
@@ -94,40 +95,37 @@
     *********************************************************-->
     <bindings>
       <customBinding>
-        <binding name="BsClient_DotNet_FederatedBinding">
-          <security authenticationMode="IssuedTokenForCertificate" 
+        <binding name="BsClient_FederatedBinding">
+          <security authenticationMode="IssuedTokenForCertificate"
                     messageSecurityVersion="WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10">
             <issuedTokenParameters keyType="SymmetricKey" tokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1">
-              <issuer address="http://localhost:9001/tradeactivests" binding="ws2007HttpBinding" bindingConfiguration="stsBinding">
+              <issuer address="http://localhost:9001/tradeactivests" binding="customBinding" bindingConfiguration="stsBinding">
                 <identity>
-                  <dns value="BSL.Com"/>
+
+                  <dns value="OPS.Com"/>
                 </identity>
               </issuer>
               <issuerMetadata address="http://localhost:9001/tradeactivests/mex"/>
             </issuedTokenParameters>
           </security>
+          <textMessageEncoding messageVersion="Soap11WSAddressing10"/>
           <httpTransport/>
         </binding>
-      </customBinding>
-
-      <ws2007HttpBinding>
         <binding name="stsBinding">
-          <security mode="Message">
-            <message clientCredentialType="Certificate" negotiateServiceCredential="false" establishSecurityContext="false" algorithmSuite="Default"/>
-          </security>
+          <security authenticationMode="UserNameForCertificate" requireDerivedKeys="false" defaultAlgorithmSuite="Basic128" messageSecurityVersion="WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10"/>
+          <textMessageEncoding messageVersion="Soap12WSAddressing10"/>
+          <httpTransport/>
         </binding>
-      </ws2007HttpBinding>
-
+      </customBinding>
     </bindings>
     <!--Service Behaviors are applied (at the service level) to services that specify them, hence apply to ALL ENDPOINTS FOR A SERVICE HOST/VHOST -->
     <behaviors>
       <!--Endpint Behaviors are applied at the individual endpoint level.-->
       <endpointBehaviors>
-        <behavior name="BsClient_DotNet_FederatedBehavior">
+        <behavior name="BsClient_FederatedBehavior">
           <clientCredentials>
-            <clientCertificate findValue="CN=Trade.Com" storeLocation="LocalMachine" storeName="TrustedPeople" x509FindType="FindBySubjectDistinguishedName"/>
             <serviceCertificate>
-              <defaultCertificate findValue="CN=BSL.Com" storeLocation="LocalMachine" storeName="TrustedPeople" x509FindType="FindBySubjectDistinguishedName"/>
+              <defaultCertificate findValue="CN=OPS.Com" storeLocation="LocalMachine" storeName="TrustedPeople" x509FindType="FindBySubjectDistinguishedName"/>
               <authentication revocationMode="NoCheck" certificateValidationMode="None"></authentication>
             </serviceCertificate>
           </clientCredentials>
@@ -136,7 +134,7 @@
     </behaviors>
     <!--END CONFIG SERVICE TEMPLATE BEHAVIORS-->
   </system.serviceModel>
-  
+
   <!-- Set identity impersonate to false to make sure ASP.NET runs as its 
        preferred ASP.NET Machine Account. Note this is also required for the 
        application by default to run in a Windows Vista/ASP.NET worker process 
@@ -171,28 +169,14 @@
         <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
         <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
         <add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
-        <add assembly="Microsoft.IdentityModel, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+        <add assembly="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
       </assemblies>
     </compilation>
     <authentication mode="None"/>
-    
-    <!--
-            The <customErrors> section enables configuration 
-            of what to do if/when an unhandled error occurs 
-            during the execution of a request. Specifically, 
-            it enables developers to configure html error pages 
-            to be displayed in place of a error stack trace.
-
-        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
-            <error statusCode="403" redirect="NoAccess.htm"/>
-            <error statusCode="404" redirect="FileNotFound.htm"/>
-        </customErrors>
-        -->
     <sessionState mode="InProc" cookieless="false" stateConnectionString="" timeout="15"/>
     <httpModules>
-      <!--      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> -->
-      <add name="WSFederationAuthenticationModule" type="Microsoft.IdentityModel.Web.WSFederationAuthenticationModule, Microsoft.IdentityModel, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
-      <add name="SessionAuthenticationModule" type="Microsoft.IdentityModel.Web.SessionAuthenticationModule, Microsoft.IdentityModel, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
+      <add name="WSFederationAuthenticationModule" type="Microsoft.IdentityModel.Web.WSFederationAuthenticationModule, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
+      <add name="SessionAuthenticationModule" type="Microsoft.IdentityModel.Web.SessionAuthenticationModule, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
     </httpModules>
   </system.web>
   <system.codedom>
@@ -250,47 +234,51 @@
   <system.webServer>
     <validation validateIntegratedModeConfiguration="false"/>
     <modules>
-      <!--			<remove name="ScriptModule"/>
-			<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
--->
-      <add name="WSFederationAuthenticationModule" type="Microsoft.IdentityModel.Web.WSFederationAuthenticationModule, Microsoft.IdentityModel, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler"/>
-      <add name="SessionAuthenticationModule" type="Microsoft.IdentityModel.Web.SessionAuthenticationModule, Microsoft.IdentityModel, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler"/>
+      <add name="WSFederationAuthenticationModule" type="Microsoft.IdentityModel.Web.WSFederationAuthenticationModule, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler"/>
+      <add name="SessionAuthenticationModule" type="Microsoft.IdentityModel.Web.SessionAuthenticationModule, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler"/>
     </modules>
-    <!--  Note:  Uncomment this section to move .ascx output caching of MarketSummaryto kernel mode
-       <caching>
-            <profiles>
-                <add extension=".ascx" policy="DontCache" kernelCachePolicy="CacheForTimePeriod" duration="00:01:00" />
-            </profiles>
-        </caching>
-    -->
   </system.webServer>
   <microsoft.identityModel>
     <service>
-      <audienceUris>
+      <audienceUris mode="Never">
         <add value="http://localhost/trade/"/>
       </audienceUris>
       <federatedAuthentication>
-        <wsFederation passiveRedirectEnabled="true" issuer="http://localhost/trade_identity/" realm="http://localhost/trade/" requireHttps="false"/>
+        <wsFederation passiveRedirectEnabled="true" issuer="http://idp.stonehenge.com/trade_identity/" realm="http://localhost/trade/" requireHttps="false"/>
         <cookieHandler requireSsl="false"/>
       </federatedAuthentication>
-      <serviceCertificate>
-        <certificateReference x509FindType="FindBySubjectDistinguishedName" 
-                              findValue="CN=Trade.Com" 
-                              storeLocation="LocalMachine"
-                              storeName="TrustedPeople"/>
-      </serviceCertificate>
-      <applicationService>
-        <claimTypeRequired>
-          <!--Following are the claims offered by STS 'http://localhost/StonehengeSTS/', and added at 6/4/2009 3:59:30 PM. Add or uncomment claims that you require by your application and then update the federation metadata of this application.-->
-          <!--<claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" optional="true"/>
-          <claimType type="http://schemas.microsoft.com/ws/2008/06/identity/claims/role" optional="true"/>-->
-        </claimTypeRequired>
-      </applicationService>
-      <issuerNameRegistry type="Microsoft.IdentityModel.Tokens.ConfigurationBasedIssuerNameRegistry, Microsoft.IdentityModel, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
+      <issuerNameRegistry type="Microsoft.IdentityModel.Tokens.ConfigurationBasedIssuerNameRegistry, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
         <trustedIssuers>
-          <add thumbprint="AF5520A014847A1D2A342F800923B917DF3A74FD" name="CN=Trade.Com"/>
+          <add thumbprint="59D185EAE27B5D89DF9A90927353206CC89B8A1B" name="CN=BSL.Com" />
         </trustedIssuers>
       </issuerNameRegistry>
     </service>
   </microsoft.identityModel>
+
+  <!--<system.diagnostics>
+    <sources>
+      <source name="System.ServiceModel.MessageLogging" switchValue="All, ActivityTracing">
+        <listeners>
+          <add name="messaging"></add>
+        </listeners>
+      </source>
+      <source name="System.ServiceModel" switchValue="Warning, ActivityTracing"
+        propagateActivity="true">
+        <listeners>
+          <add name="serviceModel"></add>
+        </listeners>
+      </source>
+    </sources>
+    <sharedListeners>
+      <add initializeData="app_messages.svclog"
+        type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
+        name="serviceModel" traceOutputOptions="Timestamp">
+      </add>
+      <add initializeData="app_tracelog.svclog"
+        type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
+        name="messaging" traceOutputOptions="Timestamp">
+      </add>
+    </sharedListeners>
+    <trace autoflush="true"></trace>
+  </system.diagnostics>-->
 </configuration>



Mime
View raw message