Introduction

patterns & practices Developer Center

This guide shows you how to improve security for your WCF services. It also shows you how to effectively design your authentication, authorization, and communication strategies for Microsoft Windows Communication Foundation.

The information in this guide is based on practices learned from customer feedback and product support, as well as experience gained in the field and while implementing real solutions. The guidance is task-based and presented in the following parts:

  • **Part I: Security Fundamentals for Web Services **gives you a quick overview of fundamental security concepts as they relate to services, service-oriented design, and Service-Oriented Architecture (SOA).
  • **Part II: WCF Security Fundamentals **gives you a firm foundation in key WCF security concepts, with special attention to authentication, authorization, and secure communication, as well as WCF binding configurations.
  • **Part III: Intranet Application Scenarios **shows you a set of end-to-end intranet application scenarios that you can use to jump-start your application architecture designs, with a focus on authentication, authorization, and communication for your intranet from a WCF perspective.
  • **Part IV: Internet Application Scenarios **shows you a set of end-to-end Internet application scenarios that you can use to jump-start your application architecture design for the Internet from a WCF perspective.

WCF / Services Security

Many factors and decisions combine to improve security in WCF services and applications. This guide focuses on the following:

  • Authentication, authorization, and communication design for your services
  • Solution patterns for common distributed application scenarios using WCF
  • Principles, patterns, and practices for improving key security aspects in services

The following diagram illustrates a common solution pattern for WCF intranet scenarios:

Ff650195.Intro-Fig1(en-us,PandP.10).png

Figure 1
Example WCF Implementation Solution Pattern

Scope of This Guide

This guide is focused on key security aspects of WCF. The guide addresses security across the three primary physical tiers: the client, remote application server, and database server. Clients include Microsoft Windows Forms, ASP.NET, and WCF.

Out of Scope

The following are outside the scope for this guide:

  • Federation
  • Claims authorization

Why We Wrote This Guide

From our own experience with WCF, and through conversations with customers and Microsoft employees who work in the field, we determined that there was significant demand for a guide that would show how to use WCF in the real world. While there is information in the product documentation, in blog posts, and in forums, there has been no single place to find proven practices for the effective use of WCF in the context of line-of-business (LOB) applications under real-world constraints.

Who Should Read This Guide

This guide is targeted at individuals involved in building applications with WCF. The following are examples of roles that would benefit from this guidance:

  • A development team that wants to adopt WCF
  • A software architect or developer looking to get the most out of WCF, with regard to designing his or her application security
  • Interested parties investigating the use of WCF who don’t know how well it would work for their particular deployment scenarios and constraints
  • Individuals tasked with learning WCF security practices

How to Use This Guide

Use the first part of the guide to gain a firm foundation in key security concepts and WCF. Next, use the application scenarios to evaluate potential designs for your own scenario. The application scenarios are skeletal, end-to-end examples of how you might design your authentication, authorization, and communication from a security perspective. Use the appendix of “Guidelines,” “Practices,” “How To” articles, and “Questions and Answers” to dive into implementation details. This separation allows you to understand the topics first and then explore the details as you see fit.

Organization of This Guide

You can read this guide from end to end, or you can read only the chapters you need for your job.

Parts

This guide is divided into four parts:

Part I: Security Fundamentals for Web Services

Part II: WCF Security Fundamentals

Part III: Intranet Application Scenarios

Part IV: Internet Application Scenarios

Checklist

Guidelines

Practices

Questions and Answers

"How-to" Articles

Resources

WCF Security Resources

Feedback on the Guide

We have provided a short questionnaire on the Internet that should only take 5 to 10 minutes to fill out. Copy these questions into an e-mail message and send the answers to WCFSec@microsoft.com.

We are also particularly interested in feedback regarding the following:

  • Technical issues specific to recommendations
  • Usefulness and usability issues

Any input can be sent in e-mail to WCFSec@microsoft.com.

Technical Support

Technical support for the Microsoft products and technologies referenced in this guide is provided by Microsoft Product Support Services (PSS). For product support information, please visit the Microsoft Product Support Web site.

Community Support

Microsoft MSDN newsgroups:

Forum

Address

Windows Communication Foundation ("Indigo")

https://social.msdn.microsoft.com/forums/en-US/wcf/threads/

Architecture General

https://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=228&SiteID=1

The Team Who Brought You This Guide

This guide was created by the following team members:

  • J.D. Meier
  • Carlos Farre
  • Jason Taylor
  • Prashant Bansode
  • Steve Gregersen
  • Madhu Sundararajan
  • Rob Boucher

Contributors and Reviewers

  • External Contributors / Reviewers: Andy Eunson; Anil John; Anu Rajendra; Brandon Bohling; Chaitanya Bijwe; Daniel Root; David P. Romig, Sr.; Dennis Rea; Kevin Lam; Michele Leroux Bustamante; Parameswaran Vaideeswaran; Rockford Lhotka; Rudolph Araujo; Santosh Bejugam
  • Microsoft Contributors / Reviewers: Alik Levin; Brandon Blazer; Brent Schmaltz; Curt Smith; David Bradley; Dmitri Ossipov; Jan Alexander; Jason Hogg; Jason Pang; John Steer; Marc Goodner; Mark Fussell; Martin Gudgin; Martin Petersen-Frey; Mike de Libero; Mohammad Al-Sabt; Nobuyuki Akama; Ralph Squillace; Richard Lewis; Rick Saling; Rohit Sharma; Scott Mason; Sidd Shenoy; Sidney Higa; Stuart Kwan; Suwat Chitphakdibodin; T.R. Vishwanath; Todd Kutzke; Todd West; Vijay Gajjala; Vittorio Bertocci; Wenlong Dong; Yann Christensen; Yavor Georgiev

Tell Us About Your Success

If this guide helps you, we would like to know. Tell us by writing a short summary of the problems you faced and how this guide helped you out. Submit your summary to MyStory@Microsoft.com.