简体   繁体   English

是否有在 DynamoDB for nodejs 中加密数据的解决方案

[英]Is there a solution for encrypting data in DynamoDB for nodejs

I'm researching solutions for data encryption in dynamodb.我正在研究 dynamodb 中的数据加密解决方案。
I found that there's a library DynamoDB Encryption Client, but it's only for Java/Python(our project is written in nodejs).我发现有一个库 DynamoDB Encryption Client,但它仅适用于 Java/Python(我们的项目是用 nodejs 编写的)。 Also, there's another package aws encryption SDK which works with AWS KMS.此外,还有另一个与 AWS KMS 一起使用的 package aws 加密 SDK。

The SDK can't encrypt on table level. SDK 无法在表级别加密。 That means I have to traverse through all fields in an item and encrypt each one before storing it in DB.这意味着我必须遍历项目中的所有字段并加密每个字段,然后再将其存储到数据库中。 It doesn't seem to be a great idea.这似乎不是一个好主意。

To achieve what you want, you have to save the encrypted data in DynamoDB and encrypt/decrypt at application layer.要实现您想要的,您必须将加密数据保存在 DynamoDB 中并在应用层进行加密/解密。 Encryption for data from your application layer onwards is also your responsibility.从您的应用程序层开始加密数据也是您的责任。 AWS provides many services which helps us implement the security. AWS 提供了许多帮助我们实施安全性的服务。 So the dataflow will be something like:所以数据流将类似于:

Application(encrypt) -> DynamoDB
DynamoDB -> (decrypt) Application

Examples of encryption using Node (JS) using AWS KMS service can be found here: https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/js-examples.html可以在此处找到使用 AWS KMS 服务使用 Node (JS) 进行加密的示例: https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/js-examples.html

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

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