Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Azure

SOA Security with .NET and Windows Azure : Windows Identity Foundation (part 3)

3/21/2011 10:16:34 PM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

WIF Programming Model

Claims-based identity simplifies authentication, authorization and customization of applications and services. WIF provides a claims-based programming model that includes the following:

  • integration with the .NET identity API

  • unified API for ASP.NET and WCF

  • unified programming model for on-premises and cloud

  • configuration-driven (allowing changes to be made at runtime without development effort or recompilation)

  • UI tooling for automatic application configuration (including WS-Trust and WS-Federation)

  • classes that allow for custom STS development (not recommended when already using ADFS)

  • Visual Studio 2010 integration (including tools for establishing and maintaining trust, templates for claims-aware Web sites and services, and ASP.NET controls)

WCF Integration

WIF introduces several new built-in bindings that are designed to leverage ADFS 2.0. The following bindings simplify the process for obtaining and using tokens when ADFS is the identity provider:

  • UserNameWSTrustBinding

  • CertificateWSTrustBinding

  • WindowsWSTrustBinding

  • KerberosWSTrustBinding

  • IssuedTokenWSTrustBinding

Programming Windows Cardspace

To further enhance security, Windows Cardspace does not include an API to enumerate, edit, delete, or create InfoCards. It also does not support the importing or exporting of InfoCards. The primary programming model for Windows Cardspace is WCF, which requires that services be constructed using System.ServiceModel. The service is then enabled to use Windows Cardspace by changing security settings in the application configuration file. This also makes it simple to switch between security bindings, such as X509 certificates, UserName, Kerberos, and InfoCard.

WCF supports all the WS-* standards used by Windows Cardspace, including WS-MetadataExchange, WS-Security, WS-SecurityPolicy, WS-Trust, as well as the Identity Metasystem itself.

WCF supports developing an identity provider and relying party by conforming to requirements listed in the following sections. WCF includes a special binding to indicate that a service uses Cardspace for authentication. If the service consumer specifies this binding, Windows Cardspace will be automatically invoked when a security token is required, and the card selection screen will appear allowing the user to select a digital identity. Behind the scenes, Windows Cardspace will contact the identity provider, acquire a security token, and send the acquired security token to the relying party.

Developing a Relying Party

Provided in this section is a three-step process for building a relying party service with WCF:

1.
Set Up a Certificate

The public key from the certificate made available is used to encrypt the security token. The certificate is also used by the Windows Cardspace container on the subject’s machine.

2.
Ensure that the Relying Party Accepts Security Tokens from Identity Providers

Specify the security token the relying party accepts using WS-SecurityPolicy—in WCF this is done by modifying the configuration file. The following example shows the various attributes used to enable Windows Cardspace to use wsFederationBinding:

Example 1.
<wsFederationBinding>
<binding configurationName="FedBinding">
<security mode="Message">
<message issuedTokenType=
"urn:oasis:names:tc:SAML:1.0:assertion">
<requiredClaimTypes>
<add claimType=
"http://schemas.example.org/.../EmailAddress"/>
<add claimType=
"http://schemas.example.org/.../FirstName"/>
</requiredClaimTypes>
<tokenRequestParameters>
<xmlElement>
...
</xmlElement>
</tokenRequestParameters>
<issuer address=
"http://schemas.example.org/.../issuer#self"/>
</message>
</security>
</binding>
</wsFederationBinding>


The example shows that the security token type is defined as SAML. The requiredClaimTypes attribute is used to specify the claim types or statements required by the relying party. In such a case we specify that the security token must include EmailAddress and ZipCode. The issuer attribute is used to establish valid issuers of the security token. If the attribute is omitted, it indicates that all identity providers are valid. In this example, only self-issued cards are permitted.

3.
Implement Authorization Logic

When a security token arrives, the relying party should have the ability to process the claims and make authorization decisions.

Developing an Identity Provider

With WCF you can also build an identity provider. Provided here are two primary steps:

1.
Create InfoCards

The identity provider must be able to create InfoCards in the .crd file format and the card must be signed and delivered to the user. The .crd file includes the issuer name, policy, image, security tokens supported, and the STS server location.

2.
Implement STS Specification

The identity provider must implement the STS, as defined by the WS-Trust standard. The core functions a reliable STS must be capable of performing include:

  • accepting a request for a security token from the card issued by the user or subject

  • authenticating the request

  • creating security tokens

  • sending security tokens to users

Windows Cardspace includes a local implementation of STS. If the relying party specified the identity provider as self, then Windows Cardspace will use the local implementation of STS.

Other -----------------
- SOA Security with .NET and Windows Azure : Windows Identity Foundation (part 2) - Windows Cardspace & Active Directory Federation Services
- SQL Azure and relational data : Common SQL Azure scenarios
- SQL Azure and relational data : Limitations of SQL Azure
- SQL Azure and relational data : Migrating an application to SQL Azure
- SQL Azure and relational data : Managing your database
- Authentication and Authorization with WCF (part 3) - Claims-Based Authorization
- Authentication and Authorization with WCF (part 2) - Role-Based Authorization
- Authentication and Authorization with WCF (part 1) - Direct and Brokered Authentication
- Connecting in the cloud with AppFabric : Listening for messages on the bus
- Connecting in the cloud with AppFabric : Connecting with the Service Bus
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server