The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under.

Slides:



Advertisements
Similar presentations
Michael S. Chan xLM Solutions, LLC
Advertisements

Web Service Architecture
Siebel Web Services Siebel Web Services March, From
GETTING STARTED WITH WINDOWS COMMUNICATION FOUNDATION 4.5 Ed Jones & Grey Guindon.
A Public Web Services Security Framework Based on Current and Future Usage Scenarios J.Thelin, Chief Architect PJ.Murray, Product Manager Cape Clear Software.
Building an Operational Enterprise Architecture and Service Oriented Architecture Best Practices Presented by: Ajay Budhraja Copyright 2006 Ajay Budhraja,
A Successful RHIO Implementation
1 Objectives Configure Network Access Services in Windows Server 2008 RADIUS 1.
Environmental Council of States Network Authentication and Authorization Services The Shared Security Component February 28, 2005.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
WS-Security TC Christopher Kaler Kelvin Lawrence.
VAR318: Developing Service Oriented Workflows Brian Noyes IDesign Inc (
Latest techniques and Applications in Interprocess Communication and Coordination Xiaoou Zhang.
Core Web Service Security Patterns
Windows Communication Foundation and Web Services.
Notes to the presenter. I would like to thank Jim Waldo, Jon Bostrom, and Dennis Govoni. They helped me put this presentation together for the field.
© 2007 Charteris plc20 June Extending Web Service Security with WS-* Presented by Chris Seary MVP Charteris plc, Bartholomew Close, London.
X.509 support in WCF Exploring support for X.509 Certificates in Microsoft’s Windows Communication Foundation Paul Cormier UCCS CS591 Fall 2009.
The Microsoft Technical Roadshow 2006 Windows Communication Foundation Mike Taulty Developer & Platform Group Microsoft Ltd
Introduction To Windows NT ® Server And Internet Information Server.
Jonas Thomsen, Ph.d. student Computer Science University of Aarhus Best Practices and Techniques for Building Secure Microsoft.
Prashanth Kumar Muthoju
Module 13: WCF Receive Adapters. Overview Lesson 1: Introduction to WCF Receive Adapters Lesson 2: Configuring a WCF Receive Adapter Lesson 3: Using the.
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.
Secure Systems Research Group - FAU Web Services Standards Presented by Keiko Hashizume.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Web Service Standards, Security & Management Chris Peiris
MCSE Guide to Microsoft Exchange Server 2003 Administration Chapter Four Configuring Outlook and Outlook Web Access.
Microsoft Visual Studio 2010 Muhammad Zubair MS (FAST-NU) Experience: 5+ Years Contact:- Cell#:
Lecture 23 Internet Authentication Applications modified from slides of Lawrie Brown.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Securing a Microsoft ASP.NET Web Application.
International Telecommunication Union Geneva, 9(pm)-10 February 2009 ITU-T Security Standardization on Mobile Web Services Lee, Jae Seung Special Fellow,
Microsoft Visual Studio 2010 Muhammad Zubair MS (FAST-NU) Experience: 5+ Years Contact:- Cell#:
Computer Security: Principles and Practice First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Chapter 22 – Internet Authentication.
Web Services based e-Commerce System Sandy Liu Jodrey School of Computer Science Acadia University July, 2002.
MCSE Guide to Microsoft Exchange Server 2003 Administration Chapter Two Installing and Configuring Exchange Server 2003.
MCTS Guide to Microsoft Windows Server 2008 Applications Infrastructure Configuration (Exam # ) Chapter Four Windows Server 2008 Remote Desktop Services,
Web Services Based on SOA: Concepts, Technology, Design by Thomas Erl MIS 181.9: Service Oriented Architecture 2 nd Semester,
XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer /11/05.
Harshavardhan Achrekar - Grad Student Umass Lowell presents 1 Scenarios Authentication Patterns Direct Authentication v/s Brokered Authentication Kerberos.
Web Services. ASP.NET Web Services  Goals of ASP.NET Web services:  To enable cross-platform, cross- business computing  Great for “service” based.
SECURITY ISSUES. Introduction The.NET Framework includes a comprehensive set of security tools –Low-level classes and an overall framework –Managing code.
The.NET Runtime and IIS Presented by Chris Dickey – cdickey.net consulting
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.
Module 3 Configuring File Access and Printers on Windows ® 7 Clients.
SOA-39: Securing Your SOA Francois Martel Principal Solution Engineer Mitigating Security Risks of a De-coupled Infrastructure.
Semantic Web Technologies Research Topics and Projects discussion Brief Readings Discussion Research Presentations.
.NET Enterprise Services COM+ 1.5 麥超俊 Bobby Mak 架構技術推廣經理開發工具暨平台推廣處台灣微軟股份有限公司.
Mahesh Krishnan, Senior Consultant, Readify Slide 1.
H OW TO BUILD A S IMPLE REST BASED SERVICE IN WCF Adnan Masood
MEMBERSHIP AND IDENTITY Active server pages (ASP.NET) 1 Chapter-4.
Kemal Baykal Rasim Ismayilov
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
Dhananjay Kumar MVP-Connected System 1. WCF  Agenda What is WCF ? Why WCF? Address, Binding, Contract End Points Hosting Message Patterns Programming.
Windows Communications Foundation ("Indigo"): Writing Secure Distributed Applications Martin Gudgin COM312 Program Manager Microsoft Corporation.
Active Directory Domain Services (AD DS). Identity and Access (IDA) – An IDA infrastructure should: Store information about users, groups, computers and.
SOA Concepts Service Oriented Architecture Johns-Hopkins University Montgomery County Center, Spring 2009 Session 1: January 28, 2009 Instructor:
VIRTUAL SERVERS Chapter 7. 2 OVERVIEW Exchange Server 2003 virtual servers Virtual servers in a clustering environment Creating additional virtual servers.
O VERVIEW OF SOA AND WCF Jinaldesai.net – My Thouths And Learnings.
Windows Communication Foundation and Web Services
Stop Those Prying Eyes Getting to Your Data
Windows Communication Foundation and Web Services
Security & .NET 12/1/2018.
Open Source Web Initial Sign-On Packages
Presentation transcript:

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. OWASP Los Angeles Culver City, CA Nov 2012 WCF Security Presented at OWASP Los Angeles Chapter Meeting – 11/28/2012 Adnan Masood Securing your Service Oriented Architecture

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. about the speaker Adnan Masood works as a system architect / technical lead for Green dot Corporation where he develops SOA based middle-tier architectures, distributed systems, and web-applications using Microsoft technologies. He is a Microsoft Certified Trainer holding several technical certifications, including MCPD (Enterprise Developer), MCSD.NET, and SCJP-II. Adnan is attributed and published in print media and on the Web; he also teaches Windows Communication Foundation (WCF) courses at the University of California at San Diego and regularly presents at local code camps and user groups. He is actively involved in the.NET community as cofounder and president of the of San Gabriel Valley.NET Developers group. Adnan holds a Master’s degree in Computer Science; he is currently a doctoral student working towards PhD in Machine Learning; specifically discovering interestingness measures in outliers using Bayesian Belief Networks. He also holds systems architecture certification from MIT and SOA Smarts certification from Carnegie Melon University.

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. Service Oriented Architecture A service-oriented architecture (SOA) is a set of principles and methodologies for designing and developing software in the form of interoperable services.

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License.

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. What is an SOA Service? A SOA service is composed of three parts: A service class that implements the service to be provided A host environment to host the service One or more endpoints to which clients will connect All communication with a service happens through the endpoints. Each endpoint specifies a contract (which we will discuss in greater detail later in this chapter) that defines which methods of the service class will be accessible to the client through that specific endpoint. Because the endpoints have their own contracts, they may expose different (and perhaps overlapping) sets of methods. Each endpoint also defines a binding that specifies how a client will communicate with the service and the address where the endpoint is hosted.

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. Tenants of SOA Boundaries are explicit. Services are autonomous. Schemas and contracts are shared, but not classes. Compatibility is based on policy.

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. Web Services Protocol Stack

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. SOA using WCF Interoperability across platforms Unification of existing technologies Enabling service-oriented development

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License.

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. What is WCF? Microsoft.Net framework API that unifies many existing standards: WS-Addressing, WS- ReliableMessaging, WS-Security etc. Supports a number of different protocols Compatible with non-Microsoft web services and clients Service Oriented Architecture A WCF Service is composed of Service class, hosting environment and one or more Endpoints

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. Endpoint = ABC Address (where is service) Binding (how do I talk to it) WSHttpBinding Contract (what can it do) [ServiceContract] [DataContract] [OperationContract] [FaultContract]

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. WCF Authentication (who) Who are you (client, server)? Authentication Types: None, Windows authentication, Username and Password, X.509 Certificate, Issued Token, Custom For Certificate, the local Cert Store is checked. IIdentity interface.

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. WCF Authorization (what) What does the client have access to do? Windows Groups (default) ASP.Net Membership provider (SQL Server) WCF provides IPrincipal interface and some implementing classes.

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. WCF Transfer Security (how) How are messages secured while in transit? Transfer Security types: None, Transport, Message, Mixed, Both Message: end to end, slower, more complicated Transport: fast, hop-to-hop

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. WCF provides three important security features Confidentiality Integrity Authentication Security is on by default in almost all bindings You configure transport vs. Message using the security mode You configure Authentication via the client credential type WCF Provides numerous authorization options Impersonation Role based access control Service authorization behavior

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The CIA of Security Is Security Important? Do you have resources that have value to an adversary? If yes, then you must expect to be attacked. WCF provides basic protections that you need: CIA. ConfidentialityIntegrityAuthentication Encrypting Messages Mitigates eavesdropping attacks. Signing messages mitigates tampering and replay attacks. Proof of identity mitigates spoofing and impersonation attacks.

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. Decisions Decisions! The protection level required by your services Should the data be signed, encrypted or both? Transport vs. message security on bindings Can also use a hybrid of the two Authentication, or “who are you?” You choose the type of credentials you want the client to use and WCF will pick an appropriate authentication protocol Authorization or “what are you allowed to do?” Impersonate the caller, letting someone else handle authz Provide your own authorization management

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. Declaring the required protection level The developer of a service doesn’t ultimately control how it’s exposed So what if the host application exposes unsecure endpoints Hence, developers can set the required protection level on contracts The host will fail if the required protection level isn’t met by an endpoint Setting Protection Level at Different Scopes On a particular message On individual operations and fault contracts On a service contract

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. Protection Level Simply use the protection level property on the appropriate attribute Possible Values: None, Sign, and EncryptAndSign

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. Configuring security in WCF Bindings Security ModeClient Credential Type Transport Message Mixed Username Certificate Windows IssuedToken These two choices determine how security protocols will be implemented.

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. Configuring Binding Security Settings BindingsConfiguration Windows Integrated Authentication Service Supplies X.509 cert; client supplies username + password Service runs SSL client supplies SAML token

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. Transport Security Each Transport typically has a built in security layer that you can use HTTP using SSL TCP/NP using Kerberos MSMQ using certificates Provides point to point security between nodes

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. Transport Security Trade-Offs Benefits Mature and well understood Security Model Better Performance Drawbacks Constrains the type of client credentials You get point to point authentication, not end to end authentication

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. Message Security Message Security pushes authentication down into SOAP headers Provides same security features as transport security But in transport-neutral way (pushes security into SOAP messages) Provides an end to end security solution across all nodes

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. Interesting Analogy security-or-why-you-shouldn-t-drive-your-motorcycle-naked.aspx

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. Message Security Tradeoffs Benefits Supports a wide variety of crednentials Largely independent of transport Supports end to end authentication Multiple WCF extensibility hooks Drawbacks Newer isn’t always better for security WS-* isn’t as broadly adopted as SSL Perf can be significantly worse

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. Mixed Mode TransportwithMessageCredential Speed and maturity of transport security Flexibility of client credentail types embdeed in message Transport security typically supplied by SSL Authenticates service to client via service’s certificate Sign and encrypt payload WS-Security header holds client credential Opens Up many options for credential format

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. Authentication in standard bindings Binding NameTransportMessageDefault Client Credential BasicHttpBindingSupported None WSHttpBindingSupportedDefaultWindows WSDualHttpBindingSupportedDefaultWindows NetTcpBindingDefaultSupportedWindows NetNamedPipesBindingDefaultSupported NetMsmqBindingDefaultSupported

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. Security Call Context Every secure WCF operation has a ServiceSecurityContext object ServiceSecurityContext.Current OperationContext.ServiceSecurityContext The context object provides you with information about the caller Use PrimaryIdentity or WindowsIdentity to access the IIdentity object IsAnonymous will tell you if it was an anonymous call

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. Authorization Options Role-based Access Control Windows groups a simple option (use Iprincipal) Use an ASP.NET role provider PrincipalPermission works reasonably well ServiceAuthorizationBehavior Decision based on SOAP action & client identity Fires earlier than PrincipalPermission Keeps Authz logic out of service implementation Impersonation Only an option with windows crednetials User WindowsIdentity.Impersonate or [OperationBehavior]

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. Impersonation Impersonation is a Windows Feature Must be using Windows authentication for this to work Easy to get this working for local resources Trickier for remote resources (requires delegation) Temporarily take on the client identity You’re passing the authorization problem to a system behind you Great when you’re accessing existing secure resources Can eliminate the need for you to implement authz in your app

Summary & Conclusion

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. WCF provides three important security features Confidentiality Integrity Authentication Security is on by default in almost all bindings You configure transport vs. message using the security mode You configure authentication via the client credential type WCF provides numerous authorization options Impersonation Role-based access control via groups, roles or claims Service authorization behavior

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. References Security in Windows Communication Foundation WCF Security Architecture Pluralsight course on WCF Security f-design-concepts&highlight=aaron-skonnard_security#security f-design-concepts&highlight=aaron-skonnard_security#security Fundamentals of WCF Security Steps to Implement DUAL Security on WCF using User name + SSL Security-on-WCF-using-Us Security-on-WCF-using-Us

The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. Thank You! Adnan Masood @adnanmasood Blog: Pasadena.NET User Group: