Introduction to Windows Identity Foundation

23
Introduction to Windows Identity Foundation Jax ArcSig 3/22/2011 Keith Tingle

description

Introduction to Windows Identity Foundation. Jax ArcSig 3 /22/2011 Keith Tingle. About Me. Keith Tingle http://keith-tingle.com/blog [email protected] Lender Processing Services http://www.lpsvcs.com. What is WIF?. Simplifies the programming model of: WS-Trust - PowerPoint PPT Presentation

Transcript of Introduction to Windows Identity Foundation

Page 1: Introduction to Windows Identity Foundation

Introduction to Windows Identity Foundation

Jax ArcSig3/22/2011

Keith Tingle

Page 2: Introduction to Windows Identity Foundation

About MeKeith Tingle

http://keith-tingle.com/[email protected]

Lender Processing Serviceshttp://www.lpsvcs.com

Page 3: Introduction to Windows Identity Foundation

What is WIF?Simplifies the programming model of:

WS-Trust Smart Clients a.k.a Active Clients

WS-Federation Browsers a.k.a. Passive Clients

SAMLMakes it relatively easy to implement

Federated AuthenticationDelegationSingle Sign On

Page 4: Introduction to Windows Identity Foundation

What is WIF? (cont’d)Extends the .NET model of identity to claimsTooling in Visual Studio

Project templates for claims-aware apps & STS‘Add STS Reference’FedUtil.exe

ASP.NET controlsLogin Status Control

Handles Single Sign Out

Page 5: Introduction to Windows Identity Foundation

Federated AuthenticationWhat does it mean?

Offload responsibility for authentication to the STS Delete your login.aspx! Reduces the amount of security code App is agnostic to authentication method

Based on the concept of Relying Party & Trust Public Key Infrastructure is the glue that holds

everything together! Relying Party installs the STS certificate and ‘trusts’ it Metadata is standardized (FederatedMetaData.xml)

Page 6: Introduction to Windows Identity Foundation

Active Directory is AnalogousBUT

Only works in the boundaries of a DomainMachines must be joined to a domain

What about machines in the DMZ? What about the Cloud?

Clients must be on the domainMachines typically run Windows

What about OS X, Linux? What about iOS, Android?

Page 7: Introduction to Windows Identity Foundation

What is an STS?Identity STS (‘IdP’)

Authenticates usersSupports * authentication methods

Windows Authentication User / Name Password X509 Client Certificates

Issues SAML tokens that contain claims Signed & possibly encrypted

OptionsRoll your ownADFS 2.0

Page 8: Introduction to Windows Identity Foundation

SecurityTokenService

RelyingParty

12

SAMLToken

3

Federated Authentication

Trust

Page 9: Introduction to Windows Identity Foundation

Review of Claims Jargon‘Passive’ client versus ‘Active’ client

Passive clients are browsers.Active clients = Stand alone applications w/ access to

a SOAP stack, e.g. a .NET console application.‘Relying Party’ or ‘RP’

An application that trusts the tokens issued by an STSA ‘Trust’

A key exchange between an RP and an STS‘Identity Provider’ or ‘IdP’

STS that authenticates a users identity ADFS 2.0 can serve as an IdP for AD User Stores

Page 10: Introduction to Windows Identity Foundation

Identity in .NETRepresentation of identity

public interface IIdentity{ string AuthenticationType { get; } bool IsAuthenticated { get; } string Name { get; }}

FormsIdentity : IIdentity ‘ktingle’WindowsIdentity : IIdentity ‘NTLM\ktingle’x509Identity : IIdentity ‘CN=KeithTingle, 54ED5443D…’

Page 11: Introduction to Windows Identity Foundation

Identity in .NET w/ ClaimsExtended to claims

public interface IClaimsIdentity : IIdentity{ ClaimCollection Claims {get;}}

public class Claim {

// Properties public virtual string ClaimType { get; } public virtual string Issuer { get; } public virtual IClaimsIdentity Subject { get; } public virtual string Value { get; }

}

Page 12: Introduction to Windows Identity Foundation

Federated Authentication Demo w/ WIF

Page 13: Introduction to Windows Identity Foundation

WIF PackagingTwo packages

WIF Runtime Minimum of .NET FX 3.5 Install the runtime on your servers Clients do not need WIF Runtime unless you develop a smart client that

utilizes the WIF extensions for client apps. Passive clients Vanilla WCF 3.5 supports

Most scenarios will have these features used in delegation scenarios Separate .NET 3.5 & .NET 4.0 downloads

WIF SDK Visual Studio 2010 Project Templates FedUtil.exe utility User Controls

SignIn Status Do *not* underestimate the value of these controls!

Page 14: Introduction to Windows Identity Foundation

Active Directory Federation Services 2.0Requires Windows Server 2008Supports HA configurations

Federation farms & proxyADFS 1.0 (not 2.0) comes on the Windows Server

2008 installation media.ADFS 2.0 is complete rewrite of ADFS 1.0

Built on WIF Available as a download only (http://bit.ly/ePLV4s)

ADFS 1.0 will serve as IdP for Active Directory Lightweight Directory Services (a.k.a. ADAM)

ADFS 2.0 will only serve as an IdP for Active Directory

Page 15: Introduction to Windows Identity Foundation

SharePoint 2010Rewritten security model on top of WIF

All intra-farm security is claims basedSupports

Federated Authentication Trusted Identity Provider

Must use Powershell to create a providerIClaimsIdentity available to custom

Page 16: Introduction to Windows Identity Foundation

Quick SharePoint 2010 Demo

Page 17: Introduction to Windows Identity Foundation

When to consider Claims?When do we consider using claims?

Single Sign On ScenariosHeterogeneous user stores

Corporate AD AD Lightweight Directory Services External Systems SQL, XML

Heterogeneous authentication methods Username / Password Kerberos / NTLM X509 Certificates

Delegation

Page 18: Introduction to Windows Identity Foundation

Claims-based Identity GotchasDistinguish between application claims and

enterprise claimsName, E-Mail, AgeUploader, Editor

Page 19: Introduction to Windows Identity Foundation

Getting StartedStarterSTS & Starter RP

http://startersts.codeplex.comDeployed as an ASP.NET web siteUses ‘standard’ ASP.NET membership & role

providersWIF templates for a custom STS are very

basicCreating an STS from scratch is a major

undertaking, consider out the box alternatives

Page 20: Introduction to Windows Identity Foundation

Additional ResourcesA Guide to Claims-based Identity and Access

Controlhttp://tinyurl.com/claimsguide

Exploring Claims-based Identityhttp://msdn.microsoft.com/en-us/magazine/cc1

63366.aspx

Page 21: Introduction to Windows Identity Foundation

The End

Page 22: Introduction to Windows Identity Foundation

User Store

STSRSTRequest for

Security Token

RSTRRequest for Security

Token Response

Security Token Service

SAML Token

Relying Party Endpoi

nt

WS-Trust Enabled Web Service Client

Trust

Page 23: Introduction to Windows Identity Foundation

The Public Key InfrastructureThe PKI is the foundation for trust and establishing identity on the

InternetBuilt on top of asymmetrical encryption algorithms

Symmetric Encryption Algorithms – Both the sender and recipient of the message share a secret key.

Asymmetric Encryption Algorithms – The sender and the receiver create asymmetrical key pairs, and exchange the public keys with one another.

A key pair – the two keys are related mathematically but it essentially impossible to derive one key from the other.

Public Key – Distributed anywherePrivate Key – A compromised private key should result in a

‘revocation’ of the corresponding certificate. Revocation is formal concept There are protocols (CRLs, OCSP)