简体   繁体   English

关于WCF为第三方集成商提供服务的问题

[英]Questions about wcf service for 3rd party integrators

There are some companies that are interested in integrating our software with their software. 有一些公司对将我们的软件与其软件集成感兴趣。 We are starting to look into providing a web service for them to consume over the internet. 我们开始研究为他们提供通过互联网使用的网络服务。 We will be building the web service using WCF. 我们将使用WCF构建Web服务。 We can't guarantee that every integrator will be using WCF or .NET, so interoperability is important. 我们不能保证每个集成商都将使用WCF或.NET,因此互操作性很重要。

We would like to authenticate each 3rd party integrator when they call our service operations with a username and password. 当每个第三方集成商使用用户名和密码致电我们的服务部门时,我们都希望对其进行身份验证。 Alternatively, I have read that client authentication can be achieved using certificates, but that seems complicated. 另外,我读到可以使用证书来实现客户端身份验证,但这似乎很复杂。

We plan to host the service in IIS. 我们计划将服务托管在IIS中。

The options available in WCF is overwhelming. WCF中可用的选项不胜枚举。 Based on the above, what configuration (bindings/security) would be recommended? 基于以上内容,将建议使用哪种配置(绑定/安全性)?

Is it possible to use IIS for hosting, basicHttpBinding, membership provider for authentication, and SSL for encryption? 是否可以将IIS用于托管,basicHttpBinding,成员资格提供程序用于身份验证以及SSL用于加密? Will these things work well in concert? 这些东西一起演奏会好吗?

Definitely go with BasicHttpBinding and HTTPS. 绝对可以使用BasicHttpBinding和HTTPS。 BasiHttpBinding provides the simplest SOAP interoperable services and HTTPS will ensure that transmission between client and your service will be secure. BasiHttpBinding提供了最简单的SOAP互操作性服务,HTTPS将确保客户端和服务之间的传输是安全的。

To authenticate users you can use TransportWithMessageCredential security mode of BasicHttpBinding . 要对用户进行身份验证,可以使用BasicHttpBinding TransportWithMessageCredential安全模式。 This security configuration expects standardized SOAP header (UserName Token Profile) in the message. 此安全配置期望消息中具有标准化的SOAP标头(UserName令牌配置文件)。 The header (in case of WCF) contains user name and password in the plain text. 标头(对于WCF)以纯文本形式包含用户名和密码。 Plain text is not a problem in this case because whole transport is secured by SSL (HTTPS). 在这种情况下,纯文本不是问题,因为整个传输受SSL(HTTPS)保护。 Even if your clients are not WCF and doesn't have any special SOAP stack adding this header should be quite easy. 即使您的客户端不是WCF且没有任何特殊的SOAP堆栈,添加此标头也应该很容易。 Also using this authentication type directly allows you validating user name with membership provider or writing custom password validator. 另外,直接使用此身份验证类型可以使您通过成员资格提供程序来验证用户名或编写自定义密码验证器。

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

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