简体   繁体   English

为 Mongo 客户端字段级加密(CSFLE)生成单个数据密钥

[英]Generate single data key for Mongo Client Side Field Level Encryption(CSFLE)

I am using the second example mentioned here for client side field level encryption and it is working as expected.我正在使用此处提到的第二个示例进行客户端字段级加密,并且它按预期工作。 I create a Mongo client bean once and use it through out until my application is stopped.我创建了一个 Mongo 客户端 bean 并一直使用它,直到我的应用程序停止。

I wanted to find if there are better ways of doing the following things and have few doubts:我想找出是否有更好的方法来做以下事情并且几乎没有疑问:

  1. The below commands is run each time I re-start the server:每次我重新启动服务器时都会运行以下命令:
BsonBinary dataKeyId = clientEncryption.createDataKey("local", new DataKeyOptions());

This generates a new key each time and inserts in my key vault collection.这每次都会生成一个新密钥并插入到我的密钥库集合中。 I am curious if there is a way to use the old key itself by fetching it for space optimisation.我很好奇是否有办法通过获取旧密钥本身来进行空间优化。 Is there any advantage in terms of security for either of these approaches?这两种方法在安全性方面有什么优势吗?

  1. If I am using AWS KMS, does my mongo client call keyvault collection and KMS for each fetch/update call?如果我使用的是 AWS KMS,我的 mongo 客户端是否会为每个 fetch/update 调用调用 keyvault 集合和 KMS?

  2. If I enable AWS KMS key rotation, does key rotation cause issue while decrypting old data?如果我启用 AWS KMS 密钥轮换,在解密旧数据时密钥轮换是否会导致问题?

Thanks in advance.提前致谢。

I am using the second example mentioned here for client side field level encryption and it is working as expected.我正在使用此处提到的第二个示例进行客户端字段级加密,并且它按预期工作。 I create a Mongo client bean once and use it through out until my application is stopped.我创建了一个 Mongo 客户端 bean 并一直使用它,直到我的应用程序停止。

I wanted to find if there are better ways of doing the following things and have few doubts:我想找出是否有更好的方法来做以下事情并且几乎没有疑问:

  1. The below commands is run each time I re-start the server:每次我重新启动服务器时都会运行以下命令:
BsonBinary dataKeyId = clientEncryption.createDataKey("local", new DataKeyOptions());

This generates a new key each time and inserts in my key vault collection.这每次都会生成一个新密钥并插入到我的密钥库集合中。 I am curious if there is a way to use the old key itself by fetching it for space optimisation.我很好奇是否有办法通过获取旧密钥本身来进行空间优化。 Is there any advantage in terms of security for either of these approaches?这两种方法在安全性方面有什么优势吗?

  1. If I am using AWS KMS, does my mongo client call keyvault collection and KMS for each fetch/update call?如果我使用的是 AWS KMS,我的 mongo 客户端是否会为每个 fetch/update 调用调用 keyvault 集合和 KMS?

  2. If I enable AWS KMS key rotation, does key rotation cause issue while decrypting old data?如果我启用 AWS KMS 密钥轮换,在解密旧数据时密钥轮换是否会导致问题?

Thanks in advance.提前致谢。

暂无
暂无

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

相关问题 MongoDb 'Client Side Field Level Encryption' (CSFLE) 是否支持在数据库中搜索加密字段? - Does MongoDb 'Client Side Field Level Encryption' (CSFLE) support searching DB for a encryted field? MongoDB 客户端字段级加密 (CSFLE) 限制未加密的操作 Collections - MongoDB Client Side Field Level Encryption (CSFLE) Restricts Operations On Unencrypted Collections 如何在 Mongo 中为客户端字段级加密轮换 kms 加密密钥? - How to rotate kms encryption key for Client-Side Field Level Encryption in Mongo? MongoDB 客户端字段级加密 - NodeJS 驱动程序 - 未在本地密钥库的数据密钥文档中创建 keyAltNames 字段 - MongoDB Client Side Field Level Encryption - NodeJS Driver - The keyAltNames field is not created in the Data Key Document in the local key vault Mongo CSFLE 数据加密密钥一次或批量获取 - Mongo CSFLE Data encryption keys fetched once or in batches Mongoose 客户端字段级加密 - Mongoose Client-Side Field Level Encryption 使用 Quarkus 在本机模式下进行客户端字段级加密 - Client-Side Field Level Encryption in native mode with Quarkus 将 spring 引导执行器与 mongodb 客户端字段级加密一起使用时,自动加密不支持命令 - Command Not Supported for auto encryption when using spring boot actuator with mongodb client-side field-level encryption 无法将 AWS IAM 角色与 KMS 提供程序一起用于 MongoDB 客户端字段级加密? - Can't use AWS IAM Roles with KMS Providers for MongoDB Client Side Field Level Encryption? mongodb 更新客户端加密字段的架构 - mongodb update schema for client side encryption field
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM