简体   繁体   English

在这种情况下如何实现WCF安全性?

[英]How to implement WCF security for this scenario?

Ok, so I'm a little new to WCF in terms of exposing services for public consumption. 好的,所以从公开服务的角度而言,我对WCF有点陌生。 I need to expose an API for public consumption that will do two things: 我需要公开一个供公众使用的API,该API可做两件事:

1) Allow both .NET and non-.NET consumers to utilize the service. 1)允许.NET和非.NET使用者使用该服务。 2) Restrict access only to clients we have authorized. 2)仅对我们授权的客户进行访问。

There's a lot of info on WCF/Security out there and I have a feeling I'm overcomplicating it so I'm hoping the SO folks can boil it down to the basics for me. 关于WCF /安全性的信息很多,我觉得我过于复杂了,所以我希望SO员工可以将其归结为基本知识。 I'm looking for basically the easiest implementation that satisfies the above two requirements. 我正在寻找满足以上两个要求的最简单的实现。

If you are hosting in IIS, take a look at the Custom Basic Authentication by leastprivilege. 如果您在IIS中托管,请查看“最低特权的自定义基本身份验证” This blog post describes how to integrate it with WCF. 这篇博客文章描述了如何将其与WCF集成。

If you are happy to use Windows accounts for your authentication, simply use Basic Authentication. 如果您愿意使用Windows帐户进行身份验证,则只需使用基本身份验证。 You will need to host the service using SSL to ensure passwords are not transmitted in the clear. 您将需要使用SSL托管服务,以确保不会明文传输密码。 More details and example are available here: http://msdn.microsoft.com/en-us/library/ms733775.aspx . 可在此处找到更多详细信息和示例: http : //msdn.microsoft.com/zh-cn/library/ms733775.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM