WSE 3.0 的网络服务安全 Security in WSE 3.0 Hongmei Ge Con321

Slides:



Advertisements
Similar presentations
Indigo Jonathan Turnbull Nick Cartwright Ivan Konontsev Chris Bright.
Advertisements

Intesar G Ali IT DepartmentPalestinian Land Authority Web services Prepared by: Intesar Ali IT Department PLA August 2010.
WCF Intro Scott Reed Owner - Brain Hz Software Instructor – DevelopMentor
 Introduction  WCF Definition  WCF Architecture  Implementation  WCF Demo Overview.
Latest techniques and Applications in Interprocess Communication and Coordination Xiaoou Zhang.
Windows Communication Foundation and Web Services.
© 2007 Charteris plc20 June Extending Web Service Security with WS-* Presented by Chris Seary MVP Charteris plc, Bartholomew Close, London.
Adam Dille CS526 – Spring  Advances in Microsoft’s service offerings  ASMX vs. WCF  Latest WCF Improvements (.NET 4.0)  No in-depth study of.
The Microsoft Technical Roadshow 2006 Windows Communication Foundation Mike Taulty Developer & Platform Group Microsoft Ltd
Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd
Jon Flanders INT303. About Me  Jon Flanders –  Independent consultant/trainer  BizTalk MVP.
Getting Started with Windows Communication Foundation 4.5 Ed Jones, MCT, MCPD, MCTS Consultant RBA Inc.
Getting Started with WCF Windows Communication Foundation 4.0 Development Chapter 1.
Nikola Dudar Program Manager Microsoft Corporation Session Code: DTL 311.
Web Service Standards, Security & Management Chris Peiris
XML Web Services in Visual Studio.NET Peter Ty Developer Evangelist.NET and Developer Group.
CON 307 Developing Manageable WCF Services Chris Peiris | Avanade Rory Primrose | Avanade
Agenda What Is the Windows Communication Foundation? How Does It Work? How Do I Use and Deploy It? Bindings Addresses Contracts How to host WCF services.
Module 14: WCF Send Adapters. Overview Lesson 1: Introduction to WCF Send Adapters Lesson 2: Consuming a Web Service Lesson 3: Consuming Services from.
Microsoft Visual Studio 2010 Muhammad Zubair MS (FAST-NU) Experience: 5+ Years Contact:- Cell#:
Microsoft Visual Studio 2010 Muhammad Zubair MS (FAST-NU) Experience: 5+ Years Contact:- Cell#:
Intro to WCF From the beginning and uses Steve AppRochester.
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
Dynamics AX TAP Knowledge Transfer Wave 2. Application Integration Framework (AIF) Config and Admin Dean Wierman Lead Program Manager Microsoft Corporation.
Random Logic l Forum.NET l Web Services Enhancements for Microsoft.NET (WSE) Forum.NET ● October 4th, 2006.
Developing Web Services Using ASP.NET and WSE That Interoperate with the Windows Communications Foundation ("Indigo") Mark Fussell COM432 Lead Program.
10 – 12 APRIL 2005 Riyadh, Saudi Arabia. Visual Studio 2005 : New Features for the Web Services Developer Malek Kemmou CEO Arrabeta Consulting Microsoft.
Virtual techdays INDIA │ august 2010 Deep Dive into WCF 4.0 Features Sarath S S V S │ Program Manager, BING, Microsoft India R&D.
Mahesh Krishnan, Senior Consultant, Readify Slide 1.
Telerik Software Academy Web Services & Cloud.
DEV333 Instrumenting Applications for Manageability with the Enterprise Instrumentation Framework David Keogh Program Manager Visual Studio Enterprise.
Web Services Error Handling and Debugging. Agenda Simple SOAP faults Advanced SOAP faults SOAP headers and faults Error handling From a Service Perspective.
Kemal Baykal Rasim Ismayilov
Windows Communication Foundation David Anderson Independent Software Developer DCOM Productions.
Dyalog’08. Conga, SSL and WebServices Morten Kromberg Dyalog’08 - Elsinore.
Presentation 24: Windows Communication Foundation Introduced Objektorienteret Netværkskommunikation.
Agenda What Is the Windows Communication Foundation? How Does It Work? How Do I Use and Deploy It? Bindings Addresses Contracts How to host WCF services.
Web Services Security Patterns Alex Mackman CM Group Ltd
Introduction to.NET FX 3.0 (+ sneak preview of.NET FX 3.5) Martin Parry Developer & Platform Group Microsoft Ltd
The SOAP Story Martin Parry Developer & Platform Group Microsoft Ltd
Windows Communication Foundation António Cruz Freelancer (SAPO/PT.COM)
1 WS-Security Yosi Taguri Microsoft Israel
Shani Raba Team Leader & Software Architect
Introduction to Web Services Srinath Vasireddy Support Professional Developer Support Microsoft Corporation.
ESRIN, 15 July 2009 Slide 1 Web Service Security support in the SSE Toolbox HMA-T Phase 2 FP 14 December 2009 S. Gianfranceschi, Intecs.
Windows Communication Foundation and Web Services
Jim Fawcett CSE681 – SW Modeling & Analysis Spring 2005
Module 6 Practical part: Creation of X-Road dataservice and client based on WSDL (.NET platform) Name Date.
4/12/2018 2:37 PM Windows Communication Foundation: Migration, interop, upgrade, and integration Risman Adnan ISV Lead, Microsoft Indonesia
Data Virtualization Tutorial… SSL with CIS Web Data Sources
Stress Free Deployments with Octopus Deploy
Integrating Enterprise Applications Into SharePoint® Portal Server
WCF.
Windows Communication Foundation (WCF)
Jon Galloway | Tech Evangelist Christopher Harrison | Head Geek
10: Remoting Securing System.Runtime.Remoting
Enterprise Library Overview
Windows Communication Foundation and Web Services
Windows Communication Foundation
Windows Communication Foundation (WCF)
Distributed Applications on Windows Vista
The SOAP Story Martin Parry Developer & Platform Group Microsoft Ltd
SOAP web services in Microsoft Azure
Web Services Enhancements 2.0
WCF Data Services and Silverlight
Security - Forms Authentication
MS Confidential : SharePoint 2010 Developer Workshop (Beta1)
Presentation transcript:

WSE 3.0 的网络服务安全 Security in WSE 3.0 Hongmei Ge Con321 Software Design Engineer Microsoft Corporation

内容提要 背景介绍 WSE 3.0 应用较为广泛的功能块 从 WSE 到 WCF ASPNET WSE ( Web Services Enhancements ) WCF ( Windows Communication Foundation ) WSE 3.0 应用较为广泛的功能块 Security Policy Diagnostics Tools 从 WSE 到 WCF 互操作性 Interoperability 转换 Migration Agenda Background: ASPNET->WSE ->WCF Important features in WSE 3.0: security, policy, diagnostics, Tools From WSE to WCF: Interop story, Migration story

背景介绍 - 攀登Web Services的阶梯 WCF WSE Background – how to go from ASPNET to WSE, and from WSE to WCF ASP.NET

Connected Applications ASP.NET网络服务 应用软件层 Connected Applications Business Process … Management Security Reliability Transactions Metadata 网络基础 ASPNET Web Services only supports to build connected applications. At the foundation level, it supports xml serialization, sending basic messages, as well as generating and consuming metadata. At the transport layer, it only supports http and https. Messaging XML … 传输层 HTTP TCP Custom

.NET v2.0 平台网络服务 与WS-I Basic Profile兼容 定义WebServiceBinding attribute [WebServiceBinding(ConformsTo=WsiProfiles.BasicProfile1_1, EmitConformanceClaims=true)] [WebService(Namespace="Microsoft.TechEdChina.WebServices")] public class BPConformance_asmx { [WebMethod] public string HelloWorldBP() string message = "'Hello World' from a Basic Profile compliant (BP-compliant) Web Service."; return message; }  } .Net Framework v2.0 Web Services is compliant with WS-I Basic profile. It uses WebServicesBinding attribute.

Web Services Enhancements (WSE) 应用软件层 Connected Applications Business Process … Management Security Reliability Transactions Metadata 网络基础 In addition to all the nice things supported by the .net framework, WSE added security at the foundation level. It also added TCP and Custom transport at the transport level. Messaging XML … 传输层 HTTP TCP Custom

WSE 3.0网络服务 建立在.NET平台上 定义Policy attribute [WebService(Namespace="Microsoft.TechEdChina.WebServices")] [Microsoft.Web.Services3.Policy(“MyServerPolicy”)] public class WSE_asmx { [WebMethod] public string HelloWorld () return “Hello World!”; }  } WSE 3.0 Web Services is built on top of .net framework. It uses policy attribute to define security on both the sending and receiving ends.

Connected Applications WCF网络服务 应用软件层 Connected Applications Business Process Management … Security Reliability Transactions Metadata 网络基础 WCF web services provides a foundation for writing secure, reliable, transacted service. Messaging XML … 传输层 HTTP TCP Custom

WCF Web Services 全新的 Web Service 界面 ServiceContract, OperationContract attributes [ServiceContract] Public interface IHelloService { [OperationContract] string Hello(); } public class HelloService : IHelloService public string Hello () return “Hello”; }  WCF defines a brand new programming model. It uses ServiceContract and OperationContract attributes for the actual web services calls.

为什么会有WSE? 基本的 ASPNET 无法满足工业界对网络安全越来越多的需求 WCF 又需要有较长的时间来完成, 至今仍未正式发行 Why do we have WSE? Basic web services features provided by ASPNET can’t satisfy the increasing demand for writing safe and sound web services from the industry. However, due to the magnitude of WCF product, it will take a while to release. In the meanwhile, WS-* specification needs to have a real MS product to support. That is how WSE project started. 2003年2月 2004年7月 2005年11月 时间

WSE 3.0 – 安全 (Security) WSE = Security 所支持的安全令牌 Username x. 509 Certificate Kerberos token SecurityContextToken DerivedKeyToken Issued Token ( SAML ) Custom Token WSE 3.0 – security WSE = Security Security Tokens supported by WSE: username, x509 certificate, Kerberos token, SecurityContextToken, DerivedKeyToken, IssuedToken, Custom tokens, etc.

WSE 3.0 -安全 (Security) WSE 所支持的最常见的网络安全实例: UsernameForCertificate AnonymousForCertificate UsernameOverTransport Kerberos (Windows) MutualCertificate10 and MutualCertificate11 WSE 3.0 supports six most common web services scenarios: UsernameForCertificate AnonymousForCertificate UsernameOverTransport Kerberos MutualCertificate10 and MutualCertificate11

生活实例-客户端的U/P+服务器的Cert Internet Intranet Username/Password 用于身份验证 用server certificate来保护由用户 提供的symmetric key,然后再用 这symmetric key来保护request Application Server Example – The client uses Username token, and the server uses x.509 Certificate 用先前的symmetric key 来保护response 验证 username/ Password

演示-客户端的U/P+服务器的Cert WSE 3.0 Policy Assertion: UsernameForCertificate Demo: UsernameForCertificate C:\TechEdChina\Wse3Demos\WSSecurityUsername\Policy\

… and an output Pipeline WSE 3.0 - Policy 每个Policy assertion 改变传输的信息 Policy 定义了一系列 Policy Assertions Input Soap Message Tracing Security Custom 运行用户 定义的程序 Output Soap Message Traci ng Security Custom WSE 3.0 – Policy The diagram shows how the policy describes both the input pipeline and output pipeline. Each policy assertions then transform the message in some way, after the message goes through all the filters inside the input pipeline, then it will go through the application processing to generate the response message. Finally the response will go through all the filters in the output pipeline. … and an output Pipeline

Policy文件是用于定义网络安全的 <anonymousForCertificateSecurity establishSecurityContext="false" … messageProtectionOrder="SignBeforeEncrypt" requireDerivedKeys="true" ttlInSeconds="300"> <serviceToken> <x509 …/> </serviceToken> <protection> <request signatureOptions=“…" encryptBody="true" /> <response signatureOptions=“…" encryptBody="true" /> <fault signatureOptions=“…" encryptBody="false" /> </protection> </anonymousForCertificateSecurity> Policy file is like a super configuration file for security. This shows an example of a policy file used in WSE 3.0

演示- Policy Wizard 如何用policy Wizard工具轻松地将网络安全加入到一个简单的ASMX Web Service中 Demo – Policy Wizard This shows how easy it is to use policy wizard to add security to a simple ASMX web service. C:\TechEdChina\Wse3Demos\Tools\WseConfigEditor3.exe

WSE 3.0 - Diagnostics 如何看到最终被传输的信息: <diagnostics> <trace enabled=“true” input=“in.xml” output=“out.xml” /> </diagnostics> 出错后如何看到 stack trace: WSE 3.0 – Diagnostics How to turn on message trace in WSE? One simple switch in the configuration file does the magic, see configuration above. How to turn on the stack trace in WSE when error happens? One simple switch in the configuration file does the magic, see configuration above. <diagnostics> <stackTrace enabled=“true” /> </diagnostics>

WSE 3.0 – 工具(Tools) 与 Visual Studio 2005 紧密结合 单独的工具(Standalone Tools) Add Web Reference/Update Web Reference WSE Settings button 单独的工具(Standalone Tools) WseWsdl3.exe WseConfigEditor3.exe X509Certificate3.exe WSE tools Seamlessly integrate with Visual Studio 2005: Add Web Reference/UpdateWebReference are modified so that a WSE-enabled proxywill be generated, a WSE Setting button was added to the context box when you right click on the VS project. Standalone tools: WseWsdl3.exe, WseConfigEditor3.exe, X509Certificate3.exe

从 WSE 3.0 到 WCF - Interop 怎样的WSE 3.0 App才容易和WCF相互操作呢? 用容易与WCF相互操作的ASMX Services: 简单的 schemas 与Basic Profile兼容的 SOAP 1.1 用WSE所支持的policy assertions Http比TCP容易 尽量不要用: rpc/encoded SOAP Extensions From WSE 3.0 to WCF – the interop story How to write a WSE 3.0 app which can easily interop with the upcoming WCF? Write ASMX Service which is easy to interop: easy schemas, compliant with Basic Profile, use soap 1.1 Use those six out of box policy assertions supported by WSE 3.0 Use HTTP instead of TCP Try to avoid rpc/encode or soap extension

与WSE 3.0 interop的WCF binding CustomBinding with WSS 1.0 可与 WSE 3.0 UsernameOverTransport, MutualCertificate10 Interop WSE 3.0 turnkey Policy Security Assertions WCF custom binding Security Configuration UsernameOverTransport <usernameOverTransportSecurity /> <security messageSecurityVersion=“WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10” authenticationMode=“UsernameOverTransport” </security> <textMessageEncoding messageVersion=“Soap12WSAddressingAugust2004” /> MutualCertificate10 <mutualCertificate10 /> <security messageSecurityVersion=“WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10” authenticationMode=“MutualCertificate” Those six out of box WSE turnkey policy assertions can be easily interop with WCF WCF’s custom binding with 2004/08 addressing version and wss 10 security version can interop with WSE 3.0’s UsernameOverTransport assertion, as well as MutualCertificate10 assertion

与WSE 3.0 interop的WCF binding CustomBinding with default security version 可与 WSE 3.0 其余的 Policy Security Assertions Interop WSE 3.0 Turnkey Policy Security Assertions WCF customBinding Security Configuration UsernameForCertificate <usernameForCertificate /> <security authenticationMode=“UsernameForCertificate”/> <textMessageEncoding messageVersion=“Soap12WSAddressingAugust2004” /> AnonymousForCertificate <anonymousForCertificate /> <security authenticationMode=“AnonymousForCertificate”/> Kerberos <kerberos /> <security authenticationMode=“Kerberos”/> MutualCertificate11 <mutualCertificate11 /> <security authenticationMode=“MutualCertificate”/> Those six out of box WSE turnkey policy assertions can be easily interop with WCF 2. CustomBinding can interop with the rest of WSE policy assertions Soap 12 can be replaced by Soap 11

演示- Interop 客户端: WSE 3.0 服务器: WCF AnonymousForCertificate Demo- Interop Client: WSE 3.0 Server: WCF Scenario: AnonymousForCertificate C:\dd\Indigo_WAP\ddsuites\src\indigo\Suites\Security\Interop\Client\WSE\WSE.sln Make sure .svc is registered C:\WINDOWS\Microsoft.NET\Framework\v2.0.x86chk\aspnet_isapi.dll GET,HEAD,POST,DEBUG

从 WSE 3.0 到 WCF - Migration 可将WSE policy assertions 对应到 WCF binding <policies> <policy name=“MyPolicy"> <usernameForCertificate protectionOrder="SignBeforeEncrypt" deriveKeys="true“/> </policy> </policies> <customBinding> <binding name=“MyBinding"> <security authenticationMode=“UsernameForCertificate" MessageProtectionOrder="SignBeforeEncrypt“ requireDerivedKeys="true”/> </binding> </customBinding> From WSE 3.0 to WCF – Migration It is easy to map WSE turn key policy assertion to WCF custom binding or basichttpbinding as described in the previous slides;

演示- Migration 客户端: WSE policy file WCF binding AnonymousForCertificate Demo- migration Client/Server: programmatically use existing policy file to generate WCF binding Scenario: AnonymousForCertificate C:\dd\Indigo_WAP\ndp\indigo\samples\sdk\Current\TechnologySamples\Basic\Client\Interop\WSE\WSEInteropBinding\CS\

从 WSE 3.0 到 WCF - MTOM MTOM ( Message Transmission Optimization Mechanism ) 是一种传输附件的方式. 它便捷, 高效,已为业界广泛地使用。 WSE: MTOM 只是一个Config switch <messaging> <mtom clientMode=“On“ serverMode=“optional“/> </messaging> WCF: MTOM是binding的一部分 From WSE 3.0 to WCF – MTOM Enable MTOM in WSE can be simply a switch in the messaging configuration section or a property on the proxy code MTOM in WCF is part of encoding binding element, can be done both in code or config <binding name=“MyBinding"> <mtomMessageEncoding> </mtomMessageEncoding> </binding>

从 WSE 3.0 到 WCF – Secure Conversation Secure Conversation是一种加快传输安全信息的手段. 它主要是采用了Symmetric Key技术,对传递多条信息极为有利。 WSE: SC是policy的一个attribute <policies> <policy name=“MyPolicy"> <usernameForCertificate establishSecurityContext=“true" /> </policy> </policies> From WSE 3.0 to WCF – Secure Conversation WSE: SC can be enabled by establishSecurityContext attribute in policy WCF: SC can be enabled by establishSecurityContext attribute in binding WCF: SC是binding的一个attribute <binding name=“MyBinding"> <security mode = “Message” > <message establishSecurityContext=“true” /> </security> </binding>

从 WSE 3.0 到 WCF – Custom Policy Assertion WSE:Custom Policy Assertion是Policy Extension <policies> <extensions> <extension name=“MyAssertion” type=“MyType, MyDLL” /> <extensions/> <policy name = “myServerPolicy”> <MyAssertion>…</MyAssertion> </policy> </policies> WCF: custom binding element From WSE to WCF – Custom policy assertion Custom policy assertion in WSE can be translated into custom binding element in WCF. <bindingElementExtension> <add name=“MyEncoder” type=“MyType, MyDLL” /> </bindingElementExtension> <binding name=“MyBinding"> <myMessageEncoding>…</myMessageEncoding> </binding>

从 WSE 3.0 到 WCF – Custom Security Token WSE: Security Token Manager <security> <securityTokenManagers> <add tokenType=“..” type=“MyToken, MyDLL” /> </securityTokenManagers> </security> WCF: ServiceCredential / ClientCredential From WSE 3.0 to WCF – Custom Security Token Custom security token in WSE can be translated into custom token as well. See the code snippet above for the OM. seviceCredentials credentials = new CustomCredetials(); … Host.Description.Behaviors.Remove(typeof(ServiceCredentials)); Host.Description.Behaviors.Add(credentials);

总结 ASPNET为您奠定了Xml Web Services的基础; WSE 3.0为您提供了Secure Web Services良好的开端; WCF将最终帮助您实现高效,便捷及可靠的全新的Web Services 在去年年底发行的WSE3.0, 有以下几个主要功能: Security Policy Diagnostics Tools 如果您已采用了WSE 3.0来帮助提高您的网络安全, 那么它将与即将发行的WCF兼容 ( interop ) 如果您想在WCF发行后, 由WSE 3.0上升至WCF, 那么您也将很轻松地完成这个任务 Summary: ASPNET lay out the basic things for writing a simple Xml Web Services; WSE 3.0 helps you to start writing a secure web services; and WCF will finally enables you to write fast, secure, reliable, and transacted web services; WSE 3.0 major features include security, policy, diagnosis and tools. If you have already adopted WSE 3.0, then it will interop with the upcoming WCF release Migrating from WSE 3.0 app to the WCF app should be relatively straight forward.

相关链接 在此次大会期间 您想更深入地了解WCF吗?您想零距离接触将要发行的WCF吗? 欢迎参加有关Windows Communication Foundation (“Indigo”)的讲座(CON210) 在此次大会之后 访问与WSE 3.0相关的网站: http://msdn.microsoft.com/webservices/webservices/building/wse/ 访问与WSE 3.0相关的博客: Mark Fussell: http://blogs.msdn.com/mfussell/ Hongmei Ge: http://blogs.msdn.com/hongmeig/default.aspx Resources During this conference, please go to another talk on WCF ( Con210 ) After this conference, please visit WSE 3.0 official web site, and also there are some useful blogs on WSE.

问与答?(Q&A) Q/A