首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >BigQuery AEAD函数密钥集管理的最佳实践

BigQuery AEAD函数密钥集管理的最佳实践
EN

Stack Overflow用户
提问于 2020-10-17 16:05:43
回答 1查看 812关注 0票数 0

我的目标是构建一个基于BigQuery的安全解决方案。我使用由CMEK保护的BigQuery表。另外,我有一个数据流作业,它可以在表中写入数据。它用一个AEAD函数加密一些值。函数我用Tableau从BigQuery读取数据。并使用AEAD函数解密一些值。

我需要一种安全可靠的方法,用于与AEAD一起使用的密钥集管理。加密期间,应该为数据流提供密钥集。此外,密钥集应该可以在Tableau中进行解密。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-10-22 20:40:56

作为我理解的简短说明,您的用例包括将数据保存在CMEK和AEAD中,在那里Cloud和Tableau等外部工具可以访问数据。

我认为市长的问题是,关键管理没有像标准文件中所说的那样由AEAD来解决。

虽然AEAD算法非常有用,但它们不能解决密钥生成和密钥管理问题。

然而,我可以想到以下几种方法:

  1. 要管理CMEK,可以使用云KMS

云数据流可以通过代码Java或Python访问CMEK。但是,您需要检查Tableau文档,以了解如何在KMS中配置/连接到CMEK。

  1. 从您共享的链接中,我可以以字节表示形式读取AEAD键集,或者以纯文本形式读取json文件;因此,我可以可视化两条路径来管理密钥集:
代码语言:javascript
复制
- If you want to take them outside of BigQuery (jsons), you can manage them as secrets and use tools like [Secret Manager](https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets) that allow you use Java or Python to manage the secrets, you can use those languages to integrate with Cloud Dataflow. It's not clear to me how Tableau can use this approach though.
代码语言:javascript
复制
- You can keep the keysets in BigQuery close to their data and perform configurations let your apps access only the data they are authorized to see. In this scenario, [Authorized Views](https://cloud.google.com/bigquery/docs/share-access-views) in BiQuery would help you. You will need to perform additional configuration in BA and build sql queries to create the Views. Then, Dataflow and Tableau can connect and read from the Authorized View transparently.

作为第二点的示例,您可以使用此查询创建一个授权视图customers_pii,该查询访问键集:

代码语言:javascript
复制
  SELECT
  ecd.customer_id as customer_id,
  AEAD.DECRYPT_BYTES(
    (SELECT ck.keyset
     FROM aead.CustomerKeysets AS ck
     WHERE ecd.customer_id = ck.customer_id),
    ecd.encrypted_animal,
    CAST(ecd.customer_id AS STRING)
  ) AS favorite_animal
FROM aead.EncryptedCustomerData AS ecd;

然后,用户/应用程序无法访问密钥集,他们应该以这种方式查询视图中的数据:

代码语言:javascript
复制
SELECT customer_id from customers_pii;
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64404492

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档