Secure and authenticated .NET development in a distributed world

135
Secure and authenticated .NET development in a distributed world Magnus Mårtensson [email protected] http://blog.noop.se/

Transcript of Secure and authenticated .NET development in a distributed world

Page 1: Secure and authenticated .NET development in a distributed world

Secure and authenticated.NET developmentin a distributed worldMagnus Må[email protected]://blog.noop.se/

Page 2: Secure and authenticated .NET development in a distributed world

Google Trends: mashup

mashup

Page 3: Secure and authenticated .NET development in a distributed world

mashing

Page 4: Secure and authenticated .NET development in a distributed world

Globalization + Localization

=

?

Page 5: Secure and authenticated .NET development in a distributed world

Globalization + Localization

=

Glocalization

Page 6: Secure and authenticated .NET development in a distributed world

Web 2.0 is about glocalization

Page 7: Secure and authenticated .NET development in a distributed world

Google Trends: Web 2.0 vs. dot com

web 2.0

dot com

Page 8: Secure and authenticated .NET development in a distributed world

Web 2.0:

A new breed of Web Services

Page 9: Secure and authenticated .NET development in a distributed world

new

Page 10: Secure and authenticated .NET development in a distributed world

newer

Page 11: Secure and authenticated .NET development in a distributed world

old stuff

Page 12: Secure and authenticated .NET development in a distributed world

Lots of Bandwidth

Page 13: Secure and authenticated .NET development in a distributed world

Lots of Storage

Page 14: Secure and authenticated .NET development in a distributed world

Lots of Users

Page 15: Secure and authenticated .NET development in a distributed world

How to get started...

Page 16: Secure and authenticated .NET development in a distributed world

Gentlemen: Let’s start our engine!

Service Host Client

Page 17: Secure and authenticated .NET development in a distributed world

Danger!Identity theft

Spoofing

Phishing

Phraud

Malware

Social Engineering

Password fatigue

Page 18: Secure and authenticated .NET development in a distributed world

Danger!Identity theft

Spoofing

Phishing

Phraud

Malware

Social Engineering

Password fatigue

Page 19: Secure and authenticated .NET development in a distributed world

Social Engineering

Social Engineering?

Page 20: Secure and authenticated .NET development in a distributed world

Password fateague

Password fatigue?

Page 21: Secure and authenticated .NET development in a distributed world

Trust

Page 22: Secure and authenticated .NET development in a distributed world

Pressclips

Page 23: Secure and authenticated .NET development in a distributed world

Trust

Page 24: Secure and authenticated .NET development in a distributed world

The Internetwas founded on

anonymity

Page 25: Secure and authenticated .NET development in a distributed world

Trust

Page 26: Secure and authenticated .NET development in a distributed world

Identity is inevitable

Page 27: Secure and authenticated .NET development in a distributed world

Is identity really inevitable?

Page 28: Secure and authenticated .NET development in a distributed world

Identity is inevitable proof!

Users want online experiences

Page 29: Secure and authenticated .NET development in a distributed world

Identity is inevitable proof!

Users need to be able to trust

Page 30: Secure and authenticated .NET development in a distributed world

Identity is inevitable proof!

We have to build trustful applications

Page 31: Secure and authenticated .NET development in a distributed world

Identity is inevitable proof!

Developers have to buildtrustful applications

Page 32: Secure and authenticated .NET development in a distributed world

Identity is inevitable proof!

We developers have know who it is we’re trusting

Page 33: Secure and authenticated .NET development in a distributed world

Identity is inevitable!

Page 34: Secure and authenticated .NET development in a distributed world

Trust

Page 35: Secure and authenticated .NET development in a distributed world

Identity is inevitable!

Page 36: Secure and authenticated .NET development in a distributed world

Trust

Page 37: Secure and authenticated .NET development in a distributed world

Identity is inevitable!

Page 38: Secure and authenticated .NET development in a distributed world

identity...

Page 39: Secure and authenticated .NET development in a distributed world

public class User: IPrincipal

{

[...];

}

Page 40: Secure and authenticated .NET development in a distributed world

public class User: IPrincipal

{

[...];

}

Page 41: Secure and authenticated .NET development in a distributed world

Identity Centric Architecture(ICA)

Page 42: Secure and authenticated .NET development in a distributed world

secure

Page 43: Secure and authenticated .NET development in a distributed world

distributed

Page 44: Secure and authenticated .NET development in a distributed world

open

Page 45: Secure and authenticated .NET development in a distributed world

owner controlled digital identity

Page 46: Secure and authenticated .NET development in a distributed world

Digital Identity

?

?

?

?

?

?

?

?

?

?

Your application

Page 47: Secure and authenticated .NET development in a distributed world

Identity Centric Architecture

Page 48: Secure and authenticated .NET development in a distributed world

ICA

Page 49: Secure and authenticated .NET development in a distributed world

Single sign-on(SSO)

Page 50: Secure and authenticated .NET development in a distributed world

Federated Identity

Page 51: Secure and authenticated .NET development in a distributed world

Alice

Application 1 Application 2 Application 3

ClientAlice’s ID

Page 52: Secure and authenticated .NET development in a distributed world

Application 1 Application 2

Alice wants to login!

Which security level does Alice have?

Alice is “level 2”!

Page 53: Secure and authenticated .NET development in a distributed world

Security Assertion Markup Language(SAML)

Page 54: Secure and authenticated .NET development in a distributed world

Trust

Page 55: Secure and authenticated .NET development in a distributed world

Kim Cameron

Architect of Identity AccessConnected Systems Division, Microsoft

http://identityblog.com/

Identity is inevitable!

briliant man!

Page 56: Secure and authenticated .NET development in a distributed world

The 7 laws of identity (done quick)

The 7 laws of identity(done quick)

Page 57: Secure and authenticated .NET development in a distributed world

#1 User Control and Consent

Page 58: Secure and authenticated .NET development in a distributed world

Trust

Page 59: Secure and authenticated .NET development in a distributed world

#2 Minimal Disclosure for a Constrained Use

#2 Minimal Disclosure for a Constrained Use

Page 60: Secure and authenticated .NET development in a distributed world

Yes I am really 18!

Yes I am really 18! No I am too young!

Page 61: Secure and authenticated .NET development in a distributed world

xxx

Page 62: Secure and authenticated .NET development in a distributed world

#3 Justifiable Parties

#3 Justifiable Parties

Page 63: Secure and authenticated .NET development in a distributed world
Page 64: Secure and authenticated .NET development in a distributed world

#4 Directed Identity

#4 Directed Identity

Page 65: Secure and authenticated .NET development in a distributed world

#5 Pluralism of Operators and Technologies

#5 Pluralism of Operators and Technologies

Page 66: Secure and authenticated .NET development in a distributed world

#6 Human Integration

#6 Human Integration

Page 67: Secure and authenticated .NET development in a distributed world

#7 Consistent Experience Across Contexts

#7 Consistent Experience Across Contexts

Page 68: Secure and authenticated .NET development in a distributed world

… the 7 laws of identity!

Page 69: Secure and authenticated .NET development in a distributed world

WS-*

Page 70: Secure and authenticated .NET development in a distributed world

WS-Security

Page 71: Secure and authenticated .NET development in a distributed world

WS-Trust

Page 72: Secure and authenticated .NET development in a distributed world

WS-MetadataExchange

Page 73: Secure and authenticated .NET development in a distributed world

September 12, 2006

Page 74: Secure and authenticated .NET development in a distributed world

Microsoft Open Specification Promise(OSP)

Page 75: Secure and authenticated .NET development in a distributed world

“Microsoft irrevocably promises not to assert any Microsoft Necessary Claims against you for making, using, selling,

offering for sale, importing or distributing any implementation to the

extent it conforms to a Covered Specification”

Page 76: Secure and authenticated .NET development in a distributed world

“This is a personal promise directly from Microsoft to you […]”

Page 77: Secure and authenticated .NET development in a distributed world

“There is no need for sublicensing.”

“This promise is directly applicable to you and everyone else who wants to

use it.”

Page 78: Secure and authenticated .NET development in a distributed world

Microsoft Open Specification PromiseRemote Shell Web Services Protocol

WS-I Basic Profile

SOAP

WS-Management

SOAP 1.1 Binding for MTOM 1.0

WS-Management Catalog

SOAP MTOM / XOP

WS-MetadataExchange

SOAP-over-UDP

WS-Policy

Web Single Sign-On Interoperability Profile

WS-PolicyAttachment

Web Single Sign-On Metadata Exchange Protocol

WS-ReliableMessaging

WS-Addressing

WS-RM Policy

WS-AtomicTransaction

WS-SecureConversation

WS-BusinessActivity

WS-Security: Kerberos Binding

WS-Coordination

WS-Security: Kerberos Token Profile

WS-Discovery

WS-Security: Rights Expression Language (REL) Token Profile

WSDL

WS-Security: SAML Token profile

WSDL 1.1 Binding Extension for SOAP 1.2

WS-Security: SOAP Message Security

WS-Enumeration

WS-Security: UsernameToken Profile

WS-Eventing

WS-Security: X.509 Certificate Token Profile

WS-Federation

WS-SecurityPolicy

WS-Federation Active Requestor Profile

WS-Transfer

WS-Federation Passive Requestor Profile

WS-Trust

Page 79: Secure and authenticated .NET development in a distributed world

Mark Webbink

“Red Hat believes that the text of the OSP gives sufficient flexibility to implement the listed

specifications in software licensed under free and open source licenses.

We commend Microsoft’s efforts […]”

Page 80: Secure and authenticated .NET development in a distributed world

“I see Microsoft’s introduction of the OSP as a good step by Microsoft to further enable

collaboration between software vendors and the open source community.”

Lawrence Rosen

Page 81: Secure and authenticated .NET development in a distributed world

Ann Cavoukian

Ph.D.Information and Privacy Commissioner Ontario CA

Page 82: Secure and authenticated .NET development in a distributed world

Your codeProxy

What is trust?

Service Instance

WWWSession

Page 83: Secure and authenticated .NET development in a distributed world

simple

Page 84: Secure and authenticated .NET development in a distributed world

consistent

Page 85: Secure and authenticated .NET development in a distributed world

secure way

Page 86: Secure and authenticated .NET development in a distributed world

represent identity

Page 87: Secure and authenticated .NET development in a distributed world

Put users in control of their identity(s)

Page 88: Secure and authenticated .NET development in a distributed world

Based on standards

Page 89: Secure and authenticated .NET development in a distributed world

Accepted and adopted by the industry

Page 90: Secure and authenticated .NET development in a distributed world

Windows CardSpace(WCS)

Page 91: Secure and authenticated .NET development in a distributed world

Old .NET Framework 3.0

WPF

WF

WCF

Page 92: Secure and authenticated .NET development in a distributed world

Why is WCS in .NET

3.0?

Final .NET Framework 3.0

Because it shipps with

Vista!

WCS

WPFWF

WCF

Page 93: Secure and authenticated .NET development in a distributed world

How does Trust work?

Page 94: Secure and authenticated .NET development in a distributed world

Protocol Drill Down

Identity Provider(IP)

Relying Party(RP)

ClientClient would like to access a resource

RP provides identityrequirements: format, claims & issuerof security token

1

2

User

3

Client shows whichof known IPs cansatisfy requirements

User selects an IP4

5

Request to chosen IPfor security token

6

IP generates security token based on RP’s requirements

7User approves/rejects the release of token

8

Token is released to RP RP reads claims and

allows access

Page 95: Secure and authenticated .NET development in a distributed world

WS-Trust

Page 96: Secure and authenticated .NET development in a distributed world

WS-Trust

Page 97: Secure and authenticated .NET development in a distributed world

self issued cards(s-i-c)

Page 98: Secure and authenticated .NET development in a distributed world

No more password fatigue!

Page 99: Secure and authenticated .NET development in a distributed world

The others

•Shibboleth

•BBAuth

•OpenID

•?

Page 100: Secure and authenticated .NET development in a distributed world

Windows Communication Foundation(WCF)

Page 101: Secure and authenticated .NET development in a distributed world

WCF is uninteresting

”WCF is uninteresting

“[…] because they have done such a good job of removing communication details from my problem space.”

Page 102: Secure and authenticated .NET development in a distributed world

WCF is uninteresting

”WCF is uninteresting

because they have done such a good job of removing communication details from

my problem space.”

Page 103: Secure and authenticated .NET development in a distributed world

WCF is uninteresting

“The plug-and-send architecture is easy, and doesn't require much thought.”

Ryan Dawson

Page 104: Secure and authenticated .NET development in a distributed world

WCF Security in a Nutshell

WCF security in a nutshell

Page 105: Secure and authenticated .NET development in a distributed world

WCF Security in a Nutshell

secures message exchange between entities

Page 106: Secure and authenticated .NET development in a distributed world

WCF Security in a Nutshell

secures access to resources by entities

Page 107: Secure and authenticated .NET development in a distributed world

WCF Security in a Nutshell

Entity

==

person, company, software, ...

Page 108: Secure and authenticated .NET development in a distributed world

WCF Security in a Nutshell

Resrouce

==

file, service, operation, ...

Page 109: Secure and authenticated .NET development in a distributed world

How? WCF, WS-* and CardSpace!•Describe policy…–WS-SecurityPolicy

•Retrieve policy… –WS-MetadataExchange

•Security Token Service… –WS-Trust

•Messages…–SOAP and WS-Security

•Security token format…–Anything RP wants and IP can provide

•End-to-end experience is driven by an identity selector on the client–CardSpace is an identity selector for Windows

Page 110: Secure and authenticated .NET development in a distributed world

How? WCF, WS-* and Card Space!

Page 111: Secure and authenticated .NET development in a distributed world

WCS

WS-*

WCF

WCS WS-* WCF

Page 112: Secure and authenticated .NET development in a distributed world

Playing the Roles:What it takes to be a(n)…

1) Identity Provider

2) Relying Party

3) Client

Page 113: Secure and authenticated .NET development in a distributed world

Role 1: Identity Providers

All Identity Providers need:

–SSL Certificate

•Provides identity to user and used to sign the security token

•High Assurance certificate with logotype preferred

–Security Token Service

•Processes token request, authenticates user, creates token

–One Information Card per user

•Contains security token metadata

Examples:

–Employer, school, bank, government, club

–The user!

Page 114: Secure and authenticated .NET development in a distributed world

Role 2: Relying Parties

SSL Certificate

–High Assurance certificate with logotype preferred

Policy describing token requirements

Security token processing code

–Decrypt token, verify issuer signature, verify proof of possession, examine claims, identify user, authorize

Examples of relying parties

–Any site or service

Page 115: Secure and authenticated .NET development in a distributed world

Relying Party == Web Service

•Install certificate

•use WCF

•Config

•System.IdentityModel

Page 116: Secure and authenticated .NET development in a distributed world

Relying Party == Web Site

•Do websites need to support WS-*? No!

•To add Information Card support:

–Modify the login and registration pages

•Add a button with Information Card object tags

•Add code to process posted security token

–Issue cookies as usual to authorized users

–Update the account database

•Add a field to store the “user identifier” claim

Page 117: Secure and authenticated .NET development in a distributed world

Role 3: Client Applications

•Rich clients

–Use WCF and System.IdentityModel

•Browsers

–IE7.0 ships with icardie.dll

•Reads HTML tag and calls CardSpace system

–Other browsers can do the same on Windows

•Mac, Linux clients need an identity selector and aWS-* stack!

[...]

Page 118: Secure and authenticated .NET development in a distributed world

WCF Architecture

Page 119: Secure and authenticated .NET development in a distributed world

A

Page 120: Secure and authenticated .NET development in a distributed world

B

Page 121: Secure and authenticated .NET development in a distributed world

C

Page 122: Secure and authenticated .NET development in a distributed world

Address

Page 123: Secure and authenticated .NET development in a distributed world

Binding

Page 124: Secure and authenticated .NET development in a distributed world

Contract

Page 125: Secure and authenticated .NET development in a distributed world

Address =the direction

Contract =the package

WCF Architecture

the journey

Bin

din

g

Page 126: Secure and authenticated .NET development in a distributed world

WCF Binding

”The magic is in the binding. You can configure it however you want...”

Clemens Vasters

Page 127: Secure and authenticated .NET development in a distributed world

Allright show us the code allready!

Page 128: Secure and authenticated .NET development in a distributed world

How to get started...

Page 129: Secure and authenticated .NET development in a distributed world

challenge:

Page 130: Secure and authenticated .NET development in a distributed world

Who are you?

Page 131: Secure and authenticated .NET development in a distributed world

Referenses & Links

Microsoft references:

.NET Framework 3.0:http://netfx3.com/The Laws of Identityhttp://msdn2.microsoft.com/en-us/library/ms996456.aspxMicrosoft Open Specification Promisehttp://www.microsoft.com/interop/osp/Microsoft's Vision for an Identity Metasystemhttp://msdn2.microsoft.com/en-us/library/ms996422.aspxIntroducing Windows CardSpacehttp://msdn2.microsoft.com/en-us/library/aa480189.aspxStep-by-Step Guide to InfoCardhttp://msdn.microsoft.com/msdnmag/issues/06/05/SecurityBriefs/The .NET Developer's Guide to Identityhttp://msdn2.microsoft.com/en-us/library/aa480245.aspxWCF Essentialshttp://msdn.microsoft.com/msdnmag/issues/06/10/WCFEssentials/default.aspxWCF Bindings and Channelshttp://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20060615WCFCV/manifest.xmlSecurity in WCFhttp://msdn.microsoft.com/msdnmag/issues/06/08/SecurityBriefs/default.aspx

Page 132: Secure and authenticated .NET development in a distributed world

Referenses & Links

Blogs:

Kim Cameron

http://identityblog.com/

Ralph Squillace

http://blogs.msdn.com/ralph.squillace/

Nicholas Allen

http://blogs.msdn.com/drnick/

Garret Serack

http://blogs.msdn.com/garretts/

Channel 9:

Vittorio Bertocci: WS-Trust - Under the Hood

http://channel9.msdn.com/showpost.aspx?postid=241455

Page 133: Secure and authenticated .NET development in a distributed world

Referenses & Links

Misc:

Firefox Identity Selector AND Java based Relying Party

http://xmldap.org/

Google Trends

http://google.com/trends

http://www.zephoria.org/thoughts/archives/2005/09/05/why_web20_matte.html

http://ricksegal.typepad.com/pmv/2005/10/web_20_a_check.html

http://www.windows-now.com/blogs/rdawson/archive/2005/05/05/14016.aspx

Page 134: Secure and authenticated .NET development in a distributed world

References & Links

WayGroup:

http://www.dotway.se/

http://www.jayway.se/

http://www.testway.se/

http://www.leadway.se/

http://www.realway.se/

Code Monkey:

http://www.jonathancoulton.com/

Page 135: Secure and authenticated .NET development in a distributed world

Techie.notepad

http://blog.noop.se