mirror of
https://github.com/minio/minio.git
synced 2025-11-07 04:42:56 -05:00
sse-kms: set KMS key ID response header (#12316)
This commit adds the `X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id` response header to the GET, HEAD, PUT and Download API. Based on AWS documentation [1] AWS S3 returns the KMS key ID as part of the response headers. [1] https://docs.aws.amazon.com/AmazonS3/latest/userguide/specifying-kms-encryption.html Signed-off-by: Andreas Auernhammer <aead@mail.de>
This commit is contained in:
committed by
GitHub
parent
a70e0da19e
commit
82c53ac260
@@ -1499,6 +1499,7 @@ func (web *webAPIHandlers) Download(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set(xhttp.AmzServerSideEncryption, xhttp.AmzEncryptionAES)
|
||||
case crypto.S3KMS:
|
||||
w.Header().Set(xhttp.AmzServerSideEncryption, xhttp.AmzEncryptionKMS)
|
||||
w.Header().Set(xhttp.AmzServerSideEncryptionKmsID, objInfo.UserDefined[crypto.MetaKeyID])
|
||||
if kmsCtx, ok := objInfo.UserDefined[crypto.MetaContext]; ok {
|
||||
w.Header().Set(xhttp.AmzServerSideEncryptionKmsContext, kmsCtx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user