The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Today and tomorrow: Will Indigo heal...? Secure (not only Web) Services

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Christian Weyer

Posts: 616
Nickname: cweyer
Registered: Sep, 2003

Christian Weyer is an independent Microsoft MSDN Regional Director and expert for Web services.
Today and tomorrow: Will Indigo heal...? Secure (not only Web) Services Posted: Mar 16, 2005 6:30 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Christian Weyer.
Original Post: Today and tomorrow: Will Indigo heal...? Secure (not only Web) Services
Feed Title: Christian Weyer: Web Services & .NET
Feed URL: http://www.asp.net/err404.htm?aspxerrorpath=/cweyer/Rss.aspx
Feed Description: Philosophizing about and criticizing the brave new world ...
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Christian Weyer
Latest Posts From Christian Weyer: Web Services & .NET

Advertisement

Indigo is not always just about 'Web' Services. Sometimes you really want to have a powerful but still modern means to e.g. secure your service app. In the former times you just had to use DCOM for securing your program's communication based on Windows security (without having to revert to ASMX/IIS).

So let's take a look at some sample scenario. We like to be able to configure Windows-based authorization in Indigo for a self-hosted service. We simply want to restrict access to a certain list of users/groups in our domain.

Indigo supports PrincipalPermission and PrincipalPermissionAttribute. So with this, we can decorate our operation like this:

  [PrincipalPermission(SecurityAction.Demand, Name="THINKTECTURE\cweyer")]
  public string DoItBabe(string action)

Adding to this, we can obviously also handle groups through a roles parameter:

  [PrincipalPermission(SecurityAction.Demand, Role="PowerUser")]
  public string DoItBabe(string action)

And yes, we can combine multiple attributes and settings:

  [PrincipalPermission(SecurityAction.Demand, Name=@"THINKTECTURE\cweyer")]
  [PrincipalPermission(SecurityAction.Demand, Role="PowerUser")]
  public string DoItBabe(string action)

Please note that the above code says that either “PowerUsers” or “THINKTECTURE\cweyer” can access the method.

Update: Just saw that Adi also has a similar post J


Read: Today and tomorrow: Will Indigo heal...? Secure (not only Web) Services

Topic: Deeper in .NET 2005 Previous Topic   Next Topic Topic: Review of Visual Studio .NET Tips and Tricks by Minh Nguyen

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use