Jasypt StandardPBEStringEncryptor 在 spring bean 配置文件中设置密码
当使用 Jasypt 的 StandardPBEStringEncryptor 时,我们必须在 spring bean 配置文件中显式设置密码。将密码放在 bean 配置文件中是否可以且安全?存储加密器密码是否会导致 PCI 合规性出现问题?
When using Jasypt's StandardPBEStringEncryptor we have to set password explicitly in spring bean configuration file. Is it ok and secure to have the password in the bean configuration file? Will it be a problem in PCI Compliance to store the encryptor password?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这不符合 PCI 标准。数据加密密钥不能以明文形式存储。具体点是3.5.2,即:
您可能还会遇到有关密钥管理领域的其他问题,例如 3.6.6(密钥分割知识和双重控制)
密钥管理是 PCI 合规性中最具挑战性的部分。您可能需要考虑使用(已符合 PCI 标准)第三方来管理您的卡数据。如果您自己实施,那么我建议您尽早寻求 QSA(PCI 合格安全评估员)的帮助来评估您计划实施的安全性。最终,您需要说服 QSA 才能通过 PCI 要求,他们会非常乐意提供建议。
This will not be PCI compliant. Data encrypting keys cannot be stored in plaintext. The specific point is 3.5.2 which is:
You would probably also have other issues around the key management area, such as 3.6.6 (Split knowledge and dual control of keys)
Key management is the most challenging part of PCI compliance. You may want to consider using a (already PCI compliant) 3rd party to manage your card data. If you are rolling your own then I would advise that you bring in the assistance of a QSA (PCI Qualified Security Assesor) at the earliest opportunity to evaluate the security you're planning on implementing. ultimately it will be the QSA that you need to convince in order to pass your PCI requirements, and they will be more than happy to advise.
您需要将对称密钥存储在某处。配置文件是一个好地方,只要没有人可以访问它。
You need to store the symmetric key somewhere. A configuration file is a good place, as long as no one has access to it.
我有一个想法,
您可以使用 keystore.jks 的 keyPair 加密所有纯密码。您知道 keystore.jks 有自己的密码。您可以记住该密码,并在程序启动时在控制台上输入该密码。例如,当您的程序启动时:
当您返回密钥对时,您可以使用它来加密您的密码。
好运
I have an idea
you can encrypt all of your plain password with keyPair of keystore.jks. You know that the keystore.jks has its own password. you can remember that password and when your program get started enter it on console. for example when your program start:
when you return the keypair you can uses it for encrypt your password.
goodluck