1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box...

27
1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation http://www.gotdotnet.com/ team/dbox

Transcript of 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box...

Page 1: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

1

Programming "Indigo" Part 2:Secure, Reliable, Transacted Services

Session Code: WSV 302

Don BoxArchitectMicrosoft Corporationhttp://www.gotdotnet.com/team/dbox

Page 2: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

2

Base Operating System Services CLR

Transactions Storage

Protocols

Network Services

Kernel M

ode

Base Class LibrariesBase Class Libraries

Memory ManagerMemory Manager

Hosting LayerHosting Layer

Code ExecutionCode Execution LoaderLoader SecuritySecurity SerializationSerialization

LightweightTransactionsLightweightTransactions

TransactionCoordinatorTransactionCoordinator

KernelTransactionManager

KernelTransactionManager

LoggingServiceLoggingService

KernelKernel

Hardware Abstraction LayerHardware Abstraction Layer

ProcessManagerProcessManager

SecurityReference Monitor

SecurityReference Monitor

LPCFacilityLPCFacility

MemoryManagerMemoryManager

PowerManagerPowerManager

ConfigManagerConfigManager

Plug andPlayPlug andPlay

TransactedNTFSTransactedNTFS

Cache ManagerCache

ManagerUniversalData Format

UniversalData Format

FilterEngineFilterEngine

TPC, UDPIPV4, IPV6TPC, UDPIPV4, IPV6 IPSECIPSEC QOSQOS HTTP

ListenerHTTPListener

Internet Connection FirewallInternet Connection Firewall

Demand Activation and Protocol HealthDemand Activation and Protocol Health

PNRPPNRP NativeWiFiNativeWiFi SIPSIP TCP

ListenerTCP Listener

UDP ListenerUDP Listener

IPC ListenerIPC Listener

Network Class LibraryNetwork Class Library

GDI/GDI+GDI/GDI+ WindowManagerWindowManager

GlobalAudio Engine

GlobalAudio Engine

DirectXGraphicsDirectXGraphics

Graphics driversGraphics drivers

DDIDDI InputManagerInputManager

AudioDriversAudioDrivers

DirectX GraphicsMini port

DirectX GraphicsMini port

RedirectorsRedirectors

SCSI/FCSCSI/FC 802.3802.3 802.11802.11 ....

Device Drivers

ManagementManagement

Presentation Data Communication

WinFS Indigo

Make the connection

Windows FormsAvalon ASP.NET

ObjectSpacesObjectSpaces

DataSetDataSet

SQL XMLSQL XML

ProvidersProviders

Fram

ework

Services Schemas

Data Model

ADO.NET

Connectivity

Synchronization(WinFS, Win32..)Synchronization(WinFS, Win32..)

InfoAgent(PreferenceRules..)InfoAgent(PreferenceRules..)

FileSystem Services(MetaDataHandlers..)FileSystem Services(MetaDataHandlers..)

CalendarCalendar MediaMedia

DocumentDocument ……

ItemsItems

RelationshipsRelationships

ExtensionsExtensionsCommunications Manager (Port)Communications Manager (Port)

Messaging Services

Transport Channels(IPC, HTTP, TCP…)Transport Channels(IPC, HTTP, TCP…)

IO ManagerIO Manager

Channels (Datagram, Reliable, Peer, …)

Channels (Datagram, Reliable, Peer, …)

Policy EnginePolicy Engine

MessageEncoderMessageEncoder

ChannelSecurityChannelSecurity

QueuingQueuing

EventingEventing

RoutingRouting

TransactionTransaction

Desktop ServicesDesktop Services

Desktop WindowManagerDesktop WindowManager

Presentation Object ManagerPresentation Object Manager

Desktop Composition EngineDesktop Composition Engine

Animation andCompositionAnimation andComposition

Media Services

Hardware RenderingHardware Rendering

MediaProcessingMediaProcessing

Capture and SourcingCapture and Sourcing

Software Renderingand SinksSoftware Renderingand Sinks

Adaptive UIEngineAdaptive UIEngine

Page/SiteCompositionPage/SiteComposition

Personalization andProfiling ServicesPersonalization andProfiling Services

Membership and Security ServicesMembership and Security Services

Designer ServicesDesigner Services

Controls Interop EngineControls Interop Engine

ControlsControls

Windows Forms

ApplicationServicesApplicationServices

Application DeploymentEngine (Click-Once)

Application DeploymentEngine (Click-Once)

PeoplePeople GroupGroup

Identity &SecuritySystem

Identity &SecuritySystem

Collaboration

People andGroupsPeople andGroups

CollaborationHistoryCollaborationHistory

Real-TimeActivitiesReal-TimeActivities

SignalingSignalingFederationFederation

System Services

FAT 16/32FAT 16/32

FilterManagerFilterManager

DistributedFile SystemDistributedFile System

Backup /RestoreBackup /Restore

File ReplicationServiceFile ReplicationService

Virtual DiskServiceVirtual DiskService

Models

ServiceServiceObjectObject T/SQLT/SQL XMLXMLDocumentDocument UIUI MediaMedia

Page 3: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

3

Connector

Communications Manager (Port)Communications Manager (Port)

Transport Channels(IPC, HTTP, TCP…)Transport Channels(IPC, HTTP, TCP…)

Channels (Datagram, Reliable, Peer, …)Channels (Datagram, Reliable, Peer, …)

Policy EnginePolicy Engine

MessageEncoderMessageEncoder

ChannelSecurityChannelSecurity

Service Model

Hosting Environments

Instance ManagerInstance Manager

Context ManagerContext Manager

TypeIntegrationTypeIntegration

ServiceMethodsServiceMethods

DeclarativeBehaviorsDeclarativeBehaviors

TransactedMethodsTransactedMethods

ASP.NETASP.NET .container.container .exe.exe NT ServiceNT Service DllHostDllHost

Messaging Services

System Services

QueuingQueuing

RoutingRouting

EventingEventing

……

Transaction Transaction

Federation Federation

……

“Indigo” Architecture“Indigo” Architecture

Page 4: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

4

What Is Indigo?What Is Indigo?

“Indigo” is a set of .NET technologies for building and managing service-oriented systems“Indigo” is scale-invariant“Indigo” is broadly interoperable“Indigo” provides a unified programming model and runtime

“Indigo” is a set of .NET technologies for building and managing service-oriented systems“Indigo” is scale-invariant“Indigo” is broadly interoperable“Indigo” provides a unified programming model and runtime

Page 5: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

5

The Role Of TransactionsThe Role Of Transactions

Intra-service correctnessAvailability versus latencyCompensation and trustDeclarative and ubiquitous

Intra-service correctnessAvailability versus latencyCompensation and trustDeclarative and ubiquitous

Page 6: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

6

System.TransactionsSystem.Transactions

Manual Transactions(ITransaction, ITransactionManager, IEnlistment)

Implicit Transactions(Transaction.Current, TransactionScope)

Declarative Transactions (Indigo)([Transaction])

Resource Manager Utilities

(Log, Isolation)

Page 7: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

7

System.Transactions

Page 8: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

8

“Indigo” And TransactionsTransacted Methods“Indigo” And TransactionsTransacted Methods

Transaction scopes can be automated through attribute

Tx.Current established by Service ModelOutcome determined based on normal/abnormal termination

Origin of transaction orthogonal to scope

Transaction scopes can be automated through attribute

Tx.Current established by Service ModelOutcome determined based on normal/abnormal termination

Origin of transaction orthogonal to scope

Page 9: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

9

“Indigo” And TransactionsTransacted I/O“Indigo” And TransactionsTransacted I/O

“Indigo” channels can support transaction protection on message deliveryTransacted send defers transmission until successful TX outcomeTransacted receive returns message to queue upon failed TXEstablished during channel creation

Per-method attribute sets defaults

“Indigo” channels can support transaction protection on message deliveryTransacted send defers transmission until successful TX outcomeTransacted receive returns message to queue upon failed TXEstablished during channel creation

Per-method attribute sets defaults

Page 10: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

10

“Indigo” And TransactionsTransacted Services“Indigo” And TransactionsTransacted Services

Common logging facility makes compensation efficient and tractable

Unified log between TM, RM, and applicationBased on ARIES log protocol

Isolation support via service-specific optimistic concurrency or via TX-aware locks

Common logging facility makes compensation efficient and tractable

Unified log between TM, RM, and applicationBased on ARIES log protocol

Isolation support via service-specific optimistic concurrency or via TX-aware locks

Page 11: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

11

“Indigo” And TransactionsTransaction Propagation“Indigo” And TransactionsTransaction Propagation

“Indigo” supports propagation of arbitrary execution context

DCOM causality.NET Remoting LCIDILogicalThreadAffinitive

Transactions are but another piece of context that can flowPropagation is opt-in for services, opt-out for objects

“Indigo” supports propagation of arbitrary execution context

DCOM causality.NET Remoting LCIDILogicalThreadAffinitive

Transactions are but another piece of context that can flowPropagation is opt-in for services, opt-out for objects

Page 12: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

12

“Indigo” And Transactions

Page 13: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

13

The Role Of Reliable MessagingThe Role Of Reliable Messaging

The impact of intermediariesThe impact on contractsImmediate versus deferred message transfer

The impact of intermediariesThe impact on contractsImmediate versus deferred message transfer

Page 14: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

14

Reliable Messaging In IndigoReliable Messaging In Indigo

“Indigo” provides reliable message sequences

Uni- or bi-directional

Sender/receiver lifetimes may overlap or notMessage store is configurable

Volatile versus durableTransacted resource manager

Parameterized delivery assurances

“Indigo” provides reliable message sequences

Uni- or bi-directional

Sender/receiver lifetimes may overlap or notMessage store is configurable

Volatile versus durableTransacted resource manager

Parameterized delivery assurances

Page 15: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

15

Reliable Messaging In IndigoReliable Messaging In Indigo

RM characteristics specified as channel capabilities/requirementsServices specify characteristics via per class/interface attribute

Contract carries essential details

Characteristics of proxy subject to contract + imperative calls

RM characteristics specified as channel capabilities/requirementsServices specify characteristics via per class/interface attribute

Contract carries essential details

Characteristics of proxy subject to contract + imperative calls

Page 16: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

16

Reliable Messaging

Page 17: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

17

The Role Of SecurityThe Role Of Security

Services have a variety of security needsMessages need to be protected or both integrity and confidentialityServices and clients need authenticationServices often wish to grant authorization selectively based on client credentialsAll of this needs to work across organization and platform boundaries

Services have a variety of security needsMessages need to be protected or both integrity and confidentialityServices and clients need authenticationServices often wish to grant authorization selectively based on client credentialsAll of this needs to work across organization and platform boundaries

Page 18: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

18

“Turn-Key” “Indigo” Security“Turn-Key” “Indigo” Security

Development (code attributes)Annotate services with code attributes Define authentication, confidentiality, integrity, and access control requirements

Deployment (configuration)Define and select security profile settings

Administration (security data)Specify authorization mappings (user to role)Specify username-password credentialsSpecify presentation credentials

Development (code attributes)Annotate services with code attributes Define authentication, confidentiality, integrity, and access control requirements

Deployment (configuration)Define and select security profile settings

Administration (security data)Specify authorization mappings (user to role)Specify username-password credentialsSpecify presentation credentials

Page 19: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

19

Turn-Key DevelopmentDeclarative AttributesTurn-Key DevelopmentDeclarative Attributes

Annotate Service classes and methodsSecurity Requirement Attributes

IntegrityConfidentialityClientAuthenticationAccessControlSecurity Settings Profile

Each requirement is scoped to the messages corresponding to the annotated class or method

Annotate Service classes and methodsSecurity Requirement Attributes

IntegrityConfidentialityClientAuthenticationAccessControlSecurity Settings Profile

Each requirement is scoped to the messages corresponding to the annotated class or method

Page 20: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

20

Turn-Key DeploymentConfiguration and ProfilesTurn-Key DeploymentConfiguration and Profiles

Define security profiles which indicate how security requirements are to be satisfiedDeveloper or deployer may define their own security profilesCommon security profiles are predefined in machine.configA scope of messages are bound to a security profile

Define security profiles which indicate how security requirements are to be satisfiedDeveloper or deployer may define their own security profilesCommon security profiles are predefined in machine.configA scope of messages are bound to a security profile

Page 21: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

21

Turn-Key DeploymentConfiguration and ProfilesTurn-Key DeploymentConfiguration and Profiles

A security profile is composed of the following security settings

Authentication mechanismIntranet (Windows Kerberos)Internet (Username-password)B2B (X.509)Federated (XrML or SAML)

Replay Detection mechanismEncryption mechanismAuthorization provider

A security profile is composed of the following security settings

Authentication mechanismIntranet (Windows Kerberos)Internet (Username-password)B2B (X.509)Federated (XrML or SAML)

Replay Detection mechanismEncryption mechanismAuthorization provider

Page 22: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

22

Turn-Key AdministrationSecurity Administration DataTurn-Key AdministrationSecurity Administration Data

Security Administration Data includes three kinds of information

Presentation Credentials – for presenting to other servicesTrust Credentials – for authorizing trusted users, partners, or issuersAuthorization Data – for mapping input claims to authorization data (e.g., user to role)

Security Administration Data includes three kinds of information

Presentation Credentials – for presenting to other servicesTrust Credentials – for authorizing trusted users, partners, or issuersAuthorization Data – for mapping input claims to authorization data (e.g., user to role)

Page 23: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

23

“Indigo” Security

Page 24: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

24

Where Are We?Where Are We?

“Indigo” uses transactions to increase the reliability and correctness of services“Indigo” provides reliable and durable message transmission between services“Indigo” supports a broad range of security protocols using a simple declarative programming model

“Indigo” uses transactions to increase the reliability and correctness of services“Indigo” provides reliable and durable message transmission between services“Indigo” supports a broad range of security protocols using a simple declarative programming model

Page 25: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

25

For More InformationFor More Information

Come see usImmediately after this sessionWeb/Services Lounge: 309 Foyer

MSDN “Longhorn” DevCenter http://msdn.microsoft.com/longhornNewsgroup

microsoft.public.windows.developer.winfx.indigo

At PDCHands on labs: On-site or download from CommNetAsk The Experts: Tuesday 7 P.M. – 9 P.M. Hall G, HPDC Weblogs: http://pdcbloggers.net

Come see usImmediately after this sessionWeb/Services Lounge: 309 Foyer

MSDN “Longhorn” DevCenter http://msdn.microsoft.com/longhornNewsgroup

microsoft.public.windows.developer.winfx.indigo

At PDCHands on labs: On-site or download from CommNetAsk The Experts: Tuesday 7 P.M. – 9 P.M. Hall G, HPDC Weblogs: http://pdcbloggers.net

Page 26: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .

26© 2003-2004 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Page 27: 1 Programming "Indigo" Part 2: Secure, Reliable, Transacted Services Session Code: WSV 302 Don Box Architect Microsoft Corporation .