简体   繁体   English

HTML5本地存储对信用卡信息的安全隐患是什么?

[英]What are the security implications of HTML5 local storage for credit card info

Storing credit card info in web servers under my company's control creates severe security risk. 在我公司控制下的网络服务器中存储信用卡信息会产生严重的安全风险。 It is an incentive to break in. It forces us to guard acces to our our database with great care. 这是一种闯入的动机。它迫使我们非常谨慎地保护对我们数据库的访问。 It is a legal liability. 这是一种法律责任。

Obviously this would only really be useful to users who are on the same browser from one session to another, so there is a UX hit. 显然,这对于从一个会话到另一个会话在同一浏览器上的用户才真正有用,因此有一个UX命中。

Would it be a security improvement to put this info in HTML5 local storage? 将此信息放在HTML5本地存储中是否会提高安全性?

POSSIBLY 或者

By storing the credit card details on an individual's machine, you reduce the chance that a successful hack of a single server (or 'system') leads to the credit details of many (hundreds/thousands of) users being compromised. 通过将信用卡详细信息存储在个人计算机上,可以降低单个服务器(或“系统”)成功破解导致许多(数百/数千)用户受损的信用详细信息的可能性。 An ideal solution would entail a similar (or lower) risk as storing things on the server, but distribute the attack surface and hence massively reduce the impact. 一个理想的解决方案会带来类似(或更低)的风险,如在服务器上存储东西,但分布攻击面,从而大大减少影响。

Here is the summary of a suggested approach (which I've posed fully as a SO question HERE , with no 'poo-poos' as of yet): 以下是建议方法的摘要(我在这里完全提出了一个问题,没有'poo-poos'):

  • Retrieve an encryption key from the server over HTTPS. 通过HTTPS从服务器检索加密密钥。

  • Use it (in javascript) to encrypt the credit card details in local storage at the same time as they are being entered by the user. 使用它(在javascript中)在用户输入的同时加密本地存储中的信用卡详细信息。

  • Throw the key away when the user navigates away from the page. 当用户离开页面时,将钥匙扔掉。

  • If the user returns later, they can retrieve the same key from the server, as well as a new key with which to cache the details going forward (to avoid the same key being used again and again). 如果用户稍后返回,他们可以从服务器检索相同的密钥,以及用于缓存未来详细信息的新密钥(以避免同时使用相同的密钥)。

  • The server doesn't have to keep a copy of the credit card details, and a hacker would need to gain a level of access such that they could anyway see the details being entered on the page by the user. 服务器不必保留信用卡详细信息的副本,并且黑客需要获得访问级别,以便他们无论如何都能看到用户在页面上输入的详细信息。

No. 没有。

Because then anyone could come to the computer and get the unencrypted credit card information. 因为那时任何人都可以来到电脑并获得未加密的信用卡信息。 Local storage is not encrypted on the computer. 本地存储未在计算机上加密。 Storing it encrypted on a secured server is a better option (even with the legal issues). 将其加密存储在安全的服务器上是一个更好的选择(即使有法律问题)。

But the best option is to not store it at all. 但最好的选择是不要存储它。 That reduces the legal and financial issues for everyone. 这减少了每个人的法律和财务问题。 If people are upset with the user experience, explain to them that not storing their credit card number is for their protection. 如果人们对用户体验感到不满,请向他们解释不存储他们的信用卡号码是为了保护他们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM