gpt4 book ai didi

google-cloud-platform - 数据流,使用客户提供的加密 key 加载文件

转载 作者:行者123 更新时间:2023-12-02 20:46:36 25 4
gpt4 key购买 nike

尝试使用 CSEK 加载 GCS 文件时,出现数据流错误

[ERROR] The target object is encrypted by a customer-supplied encryption key

我打算尝试在数据流端进行 AES 解密,但我发现如果不传递加密 key ,我什至无法获取文件。

是否有其他方法可以从数据流中加载 CSEK 加密的 Google Cloud Storage 文件?例如使用谷歌云存储API,获取流句柄然后将其传递给数据流?

    // Fails
p.apply("Read from source", TextIO.read().from("gs://my_bucket/myfile")).apply(..);

最佳答案

documentation Cloud Dataflow 目前不支持使用客户提供的加密 key 加密的对象。我开了一个feature request为了实现这一点。

请注意,如果没有该加密 key ,您将无法在 Cloud Storage 中获取使用客户提供的加密 key (CSEK) 上传的文件。

documentation :

If you use customer-supplied encryption keys or client-side encryption, you must securely manage your keys and ensure that they are not lost. If you lose your keys, you are no longer able to read your data, and you continue to be charged for storage of your objects until you delete them.

如果我们仍然拥有 CSE key ,则访问该文件的示例 Java 代码为:

byte[] content = storage.readAllBytes(
bucketName, blobName, BlobSourceOption.decryptionKey(decryptionKey));

描述了使用 CSEK 获取文件的所有其他可能方法 here .

关于google-cloud-platform - 数据流,使用客户提供的加密 key 加载文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51715061/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com