WCF 客户端证书身份验证

发布于 2024-09-18 09:46:53 字数 471 浏览 3 评论 0原文

我们有一个典型的客户端-服务器 WCF 服务,我想要以下内容:

  • 客户端通过 ClientCredentials 属性将证书传递给服务器 服务器
  • 查看证书并发现它是由我们信任的证书颁发机构颁发的
  • 如果客户端被拒绝,则客户端将被拒绝使用不是由我们的 CA 颁发的证书。

客户端安装了 clientAuthentication 证书以及我们可信的 CA。 服务器安装了我们信任的 CA 证书。我不想安装任何其他证书。

我对绑定很灵活,但它确实需要在网络场景中工作。

我考虑过将 BasicHttpBinding 与 TransportCredentialOnly 一起使用,但它不支持证书:(。

我尝试过在消息模式下使用 wsHttpBinding,但这需要 ServerCertificate 来执行服务器身份验证和消息加密...我不想要!

有没有内置的实现这个目标的方法?

We have a typical client-server WCF service and I would like the following:

  • Client passes a certificate to the Server through the ClientCredentials property
  • Server looks at the certificate and see's that it has been issued by our trusted certificate authority
  • The client is rejected if they use a certificate that is not issued by our CA.

The client has a clientAuthentication certificate installed, along with our trusted CA.
The server has our trusted CA certificate installed. I dont want to install any other certificates.

I am flexible on the binding, however it does need to work in a web scenerio.

I thought about using BasicHttpBinding with TransportCredentialOnly, however it doesnt support certificates :(.

Ive tried using wsHttpBinding in Message mode, however that requires a ServerCertificate to perform server authentication and message encryption... which I dont want!

Is there any built-in way to achieve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

假面具 2024-09-25 09:46:53

所有内置绑定仅在使用服务器证书时才允许使用客户端证书 - 相互证书身份验证和安全性。为了支持你的场景,你必须完全自己处理它。如果要将身份验证机制注入 WCF,则必须执行 自定义令牌自定义凭据

All build in bindings allow using client certificates only when server certificate is used - mutal certificate authentication and security. To support your scenario you will have to handle it completely yourselves. If you want to inject your authentication mechanism to WCF you will have to do custom token and custom credentials.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文