我可以在没有 SSL 证书的情况下使用 WCF 安全吗?

发布于 2024-11-30 16:13:12 字数 612 浏览 0 评论 0原文

好的,这就是我的情况。

我正在编写一个多站点软件,它允许我监视 Windows Server 上的进程、内存、服务等。

就 WCF 而言,每个“站点”都将是一个主机。可能有也可能没有中央分发节点,这也将是一个主机,但会有一个读取数据的接口 - 这将连接到每个“站点”或分发节点。

是的,所以我想保护此通信的安全,并进行加密。我不想使用任何 SSL 证书,因为并非每个站点/客户端都有 SSL 证书。

我可以这样做吗?也许使用消息安全?只是我还没有读过这样做的方法。不知道“Windows身份验证”是否适合这个?会吗?一个简单的用户名和/或密码解决方案就可以了。 WebsitePanel 团队使用 WSE 的方式大致相同。

感谢您的帮助。

编辑:

所以我需要更清楚地说明这一点。

无论如何,我不想使用 SSL/证书。我无法控制它。如果我真的必须的话,我可以在发送之前使用 AES 等手动加密每次发送的代码信息,就像电子邮件中的 PGP 一样,但我认为这就是 Message Security。

如此简单的任务令我惊讶的是微软和专业人士从未想过要实现它。所有数据均已预先加密发送,除非您拥有相应的加密密钥,否则您无法读取数据。是的,我意识到这本质上与 SSL 等相同。

Ok, so here goes my situtation.

I am writing a multi site software which allows me to monitor process, memory, services etc on a Windows Server.

Each "site" will be a host as far as WCF is concerned. There may or may not be a central distrubition node, this will also be a host, but there will be an interface which reads data - this would connect to each "site" or the distribution node.

Right, so I want to secure this communication, encrypted. I don't wish to use any SSL certs, considering not every site/client will have SSL certs.

Can I do this? Using Message Security maybe? Only I haven't read a way to do this. I don't know if "Windows authentication" will suit this? Would it? A simple username and/or password solution would do. Much the same in the way the WebsitePanel team have used WSE to do it.

Thanks for your help.

EDIT:

So I need to be more clear on this.

I do not wish to use SSL/certificates in anyway. Take it that I have no control over it. I could, if I really had to, encrypt each send of information in code manually, using AES etc, before it is sent, like PGP in emails, but I figured this is what Message Security is.

Such a simple task it is surprising to me that Microsoft and professional never thought to implement it. All data is sent pre-encypted and unless you have the coresponding encryption key you can;t read the data. Yes, I realise this is essentially the same as SSL etc.

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

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

发布评论

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

评论(1

深空失忆 2024-12-07 16:13:12

加密需要证书才能真正安全。 WSE 允许用户名和密码,但对于消息加密,它仍然需要证书 - WCF 以相同的方式执行此操作。

您可以在没有证书的情况下构建加密层,但

  • 您必须完全自己完成 - 您将必须实现将进行加密和解密的自定义通道。
  • 您必须将加密密钥安全地存储在某个地方 - 这就是证书通常所做的事情。一旦密钥被泄露,您的安全就会消失。这就是使用证书的原因。

Windows 身份验证再次需要安全传输(基本 http 身份验证)= HTTPS,或者客户端和服务器必须位于同一 Windows 域中(如果您通过 Internet 与客户端通信,则需要 VPN)。

Encryption needs certificate to be really secure. WSE allowed user name and password but for message encryption it still required certificate - WCF does it in the same way.

You can build encryption layer without certificate but

  • You will have to do it completely yourselves - you will have to implement custom channel which will do encryption and decryption.
  • You will have to store encryption keys somewhere securely - that what certificates do normally. Once the key is compromised your security is gone. That is why certificates are used.

Windows authentication either again requires secured transport (basic http authentication) = HTTPS or both client and server must be in the same windows domain (if you communicate with your clients over internet that would require VPN).

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