-
Notifications
You must be signed in to change notification settings - Fork 2
support customer-supplied encryption keys #19
Conversation
service.toml
Outdated
|
||
[infos.object.meta.sse_customer_key_sha256] | ||
type = "string" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the content of sse_customer_key_sha256
, a base64 string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
base64-encoded SHA-256 hash of the customer-supplied encryption key for the object
utils.go
Outdated
@@ -277,6 +277,9 @@ func (s *Storage) formatFileObject(v *gs.ObjectAttrs) (o *typ.Object, err error) | |||
if value := v.StorageClass; value != "" { | |||
sm[MetadataStorageClass] = value | |||
} | |||
if value := v.CustomerKeySHA256; value != "" { | |||
sm[MetadataSseCustomerKeySha256] = value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about keeping the naming style with SDK?
sse_customer_key
=>customer_key
sse_customer_key_sha256
=>customer_key_sha256
Or the naming in GCS's docs:
encryption_key
encryption_key_sha256
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote a RFC about this: beyondstorage/specs#38
I haven't completely understand how to use gcs' KMS. It seems we don't need to do anything here? |
Yes. |
part of beyondstorage/go-storage#523
ref: https://cloud.google.com/storage/docs/encryption
copy
for gcs yet.