Web应用程序:仅与服务器授权通信
对于 Web 应用程序,我正在寻找仅允许 Web 应用程序与我的服务器通信的通信方式。 由于事物的 URL 可以从 JavaScript 代码中提取,因此可以直接使用 URL 对登录数据进行暴力攻击,或者查询特定用户是否已在系统中注册(仅举几个例子)。
我有一种感觉,在客户端加密数据并在服务器端解密数据是行不通的,因为客户端上的任何加密,无论多么复杂,都会再次通过 JavaScript 代码暴露给攻击者。对于按表单授权,可以发送一次性授权密钥。但是这样的密钥将再次被攻击者获取和使用,那么安全增益是什么呢?
所以这里是实际的问题:如何只授权我的应用程序与服务器通信并拒绝直接调用?
脚注:我有 SSL,因此无需担心传输加密。但这无助于抵御暴力攻击。
For a web application I'm looking for means of communication that will only allow the web application to communicate with my server.
Since URLs of things are extractable from the JavaScript code, one could use the URLs directly for, say, a brute force attack on login data, or query if a particular user is already registered with the system, to give only a few examples.
I have the feeling that encrypting data client side and decrypting them server side won't work because any encryption, however sophisticated, on the client side will again be exposed to an attacker through JavaScript code. For per-form-authorization one could send a throw-away authorization key. But such key would again be obtainable and usable by an attacker, so what's the security gain?
So here's the actual question: How can I authorize only my application to talk to the server and reject direct calls?
Foot note: I have SSL, so transmission encryption is no concern. But that won't help against brute force attacks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一种解决方案是端点身份验证。您可以在 TLS/SSL 中使用相互身份验证。您也可以使用 PSK 变体来实现这一点。
one solution can be end point authentication. You can use mutual authentication in TLS/SSL. you can accomplish that using PSK variation also.