nServiceBus 和安全性:最佳实践是什么?
人们在使用 nServiceBus/msmq 时如何处理安全问题?考虑例如消息加密、消息签名(验证?)等,
您如何知道该消息不是从其他人发送到队列的。或者有人篡改了消息。
What do people do with security issues when using nServiceBus/msmq? Thinking about for example message encryption, message signing (validation?) etc
How do you know that the message is not sent to the queue from someone else. or that someone has tampered a message.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以控制 MSMQ 队列的权限,包括谁(Windows 用户/组)可以向队列发送消息。如果您想至少使用 MassTransit 以及可能的 NServiceBus 来加密消息,您可以注入自定义序列化程序。
在我熟悉的大多数情况下,这些消息都来自可信来源。如果您接受来自外部源的消息,它们将在到达排队系统之前经过某种入口点,例如 Web 服务。组织内实施的控制通常就足够了。
最后,“发送者”在 MSMQ 标头中公开。我不知道这是否可以在 NServiceBus 中访问,但只要您可以从 MSMQ .NET 包装器访问它,我怀疑这是不可能的。
You can control the permissions of a MSMQ queue, including who (windows user/group) can send to a queue. If you wanted to encrypt the message, with MassTransit at least and likely NServiceBus, you can inject a custom serializer.
In most cases I'm familiar with, the messages are from trusted sources. If you are accepting messages from external sources they would go through some sort of entry point, such as a web service before hitting the queuing system. The controls that are in place within the organization are often enough.
Lastly, the "sender" is exposed in the MSMQ header. I do not know if this is accessible within NServiceBus but as long as you can access it from the MSMQ .NET wrapper I doubt it is out of the question to ask for.