将安全信息从一台服务器传递到另一台服务器
情况是这样的: 向一台服务器进行付款,完成后必须安全地通知另一台服务器。我想做的实际上与支付服务的notify_url非常相似。 IE paypal 接收付款,然后通过长 URL 通知来源。
如何验证正在传递的数据。有什么有用的库吗?有什么链接可以让我开始吗?
谢谢!
The situation is this:
A payment is made to one server, and on completion, it must notify another server securely. What I am trying to do is actually quite similar to a notify_url of a payment service. I.E. paypal receives a payment, and then notifies the origin through a long URL.
How does one verify the data being passed. Any useful libraries? Any links to get me started?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
HMAC 是确保 URL 未被未经授权的一方生成或篡改的好方法以任何方式。 这里是一个简单的教程。
如果 URL(或其返回的内容)包含任何敏感信息,那么您还需要确保收件人服务器启用了 SSL。
为了进一步提高安全性,您可以对收件人服务器进行硬编码,以拒绝任何不是来自已知发件人的 IP 地址的连接。
HMAC is a good way to ensure that the URL has not been generated by an unauthorized party or tampered with in any way. Here is a simple tutorial.
If the URL (or the content it returns) contains any sensitive information, then you'll also want to make sure that the recipient server is SSL enabled.
And for a further layer of security, you could hard-code the recipient server to reject any connections that aren't from the IP address(es) of your known sender(s).