<#4949 [BUG] Flyte assumes that blob storage ETag ...
# flyte-github
c
#4949 [BUG] Flyte assumes that blob storage ETag fields are MD5 Issue created by ddl-ebrown ### Describe the bug As we're working through adding support for SSE-KMS support in S3 for encryption-at-rest, we're realizing that some of the assumptions Flyte makes about the use of ETags are no longer valid. One such place is in https://github.com/flyteorg/flyteadmin/pull/587/files#diff-726a8de39c15fd1e7ec1180b8fe68ba664346a82b878fb7f910bf6549230e64eR81-R83 The S3 docs have this to say:
Copy code
An entity tag (ETag) that represents a specific version of an object. For objects that are not uploaded as a multipart upload and are either unencrypted or encrypted by server-side encryption with Amazon S3 managed keys (SSE-S3), the ETag is an MD5 digest of the data.
In other words, a client generated MD5 != ETag when using
SSE-KMS
. So basic checks around "is this the same file content" will never work properly in Flyte. I wouldn't be surprised if Azure blob has the same issue with encryption enabled. Anyone have thoughts about this? Does anyone know off the top of their head what sort of problems we're going to run into without ETags always being MD5? ### Expected behavior It seems like a custom header controlled by clients should be used instead like
x-flyte-checksum-md5
. Looking at API docs -- S3, Azure Blob Storage, GCS and Minio all support custom metadata (though some may require specific header prefixes, so
x-flyte
probably will not work). I'm wondering if there's a path to addressing this problem with client controlled checksums? Maintaining backwards compat with this approach seems tricky ### Additional context to reproduce • Enable SSE-KMS on a given s3 bucket • Use the combination of PRs: flyteorg/stow#11 flyteorg/flytekit#2193 #4897 cc @ddl-rliu ### Screenshots No response ### Are you sure this issue hasn't been raised already? • Yes ### Have you read the Code of Conduct? • Yes flyteorg/flyte